diff options
| author | bors <bors@rust-lang.org> | 2018-01-07 22:48:16 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-01-07 22:48:16 +0000 |
| commit | a29461f322974cd6ff2e7bf058588db2adf35228 (patch) | |
| tree | bcc9cf06aeb27646b551c59dd66520788aab4032 /src/liballoc_jemalloc | |
| parent | ee220daca345302c3277befee2732b6b2a5a711c (diff) | |
| parent | f7aed3eb27888af72703da15a6b93e51e020f5fd (diff) | |
| download | rust-a29461f322974cd6ff2e7bf058588db2adf35228.tar.gz rust-a29461f322974cd6ff2e7bf058588db2adf35228.zip | |
Auto merge of #47171 - estebank:numeric-literal-suggestion, r=nikomatsakis
Provide suggestion when trying to use method on numeric literal
New output:
```
error[E0688]: can't call method `powi` on ambiguous numeric type `{float}`
--> $DIR/method-on-ambiguous-numeric-type.rs:12:17
|
12 | let x = 2.0.powi(2);
| ^^^^
help: you must specify a concrete type for this numeric value, like `f32`
|
12 | let x = 2.0_f32.powi(2);
| ^^^^^^^
```
Previous output:
```
error[E0599]: no method named `powi` found for type `{float}` in the current scope
--> src/main.rs:12:17
|
12 | let x = 2.0.powi(2);
| ^^^^
|
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope, perhaps add a `use` for it:
|
11 | use core::num::Float;
|
```
Fix #40985.
Diffstat (limited to 'src/liballoc_jemalloc')
0 files changed, 0 insertions, 0 deletions
