Open mrmonday opened 7 years ago
The error message is now different:
error[E0308]: mismatched types
--> src/main.rs:7:22
|
7 | BigRational::pow(BigRational::one(), 23);
| ^^^^^^^^^^^^^^^^^^
| |
| expected `&Ratio<BigInt>`, found struct `Ratio`
| help: consider borrowing here: `&BigRational::one()`
|
= note: expected reference `&Ratio<BigInt>`
found struct `Ratio<BigInt>`
While it does give a nice (and correct) suggestion, it still doesn't substitute the type alias for the actual type, which I think would be a nice touch.
The following code: https://play.rust-lang.org/?gist=3a06bcc680135c042135ca45984379f7&version=stable
Gives the following error:
This is poor for several reasons:
num::rational::Ratio<num::BigInt>
when the code usesBigRational
- to a new user it isn't clear that this is a type alias