You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error[E0689]: can't call method `pow` on ambiguous numeric type `{float}`
--> src/main.rs:2:19
|
2 | let a = (1.0).pow(1.0);
| ^^^
help: you must specify a concrete type for this numeric value, like `f32`
|
2 | let a = (1.0)_f32.pow(1.0);
| ^^^^^^^^^
@euclio feel free to reach out for any help you might need!
I believe that you should verify if changing the span being used in the AST for literals changes the suggestion output. If it doesn't, it means that the problem is not at the parser level, but when lowering to HIR. If that is the case, we need to dig deeper, but I'll be here to help you with that.
Activity
estebank commentedon Jun 28, 2018
The literal's span should point inside the parenthesis. Probably needs a change to
parse_lit_tokeninlibsyntax/parser/parse.rs.euclio commentedon Jun 29, 2018
I'm interested in working on this.
estebank commentedon Jun 29, 2018
@euclio feel free to reach out for any help you might need!
I believe that you should verify if changing the span being used in the AST for literals changes the suggestion output. If it doesn't, it means that the problem is not at the parser level, but when lowering to HIR. If that is the case, we need to dig deeper, but I'll be here to help you with that.
https://forge.rust-lang.org/x-py.html
use literal span for concrete type suggestion
Rollup merge of rust-lang#51920 - euclio:concrete-type-suggestion, r=…
Rollup merge of rust-lang#51920 - euclio:concrete-type-suggestion, r=…
Rollup merge of rust-lang#51920 - euclio:concrete-type-suggestion, r=…
Rollup merge of rust-lang#51920 - euclio:concrete-type-suggestion, r=…