parent
7308c22c6a
commit
939c2b6313
4 changed files with 53 additions and 3 deletions
5
src/test/ui/type/missing-let-in-binding.fixed
Normal file
5
src/test/ui/type/missing-let-in-binding.fixed
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
// run-rustfix
|
||||
fn main() {
|
||||
let mut _foo: i32 = 1;
|
||||
let _foo: i32 = 4; //~ ERROR type ascription is experimental
|
||||
}
|
||||
5
src/test/ui/type/missing-let-in-binding.rs
Normal file
5
src/test/ui/type/missing-let-in-binding.rs
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
// run-rustfix
|
||||
fn main() {
|
||||
let mut _foo: i32 = 1;
|
||||
_foo: i32 = 4; //~ ERROR type ascription is experimental
|
||||
}
|
||||
16
src/test/ui/type/missing-let-in-binding.stderr
Normal file
16
src/test/ui/type/missing-let-in-binding.stderr
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
error[E0658]: type ascription is experimental
|
||||
--> $DIR/missing-let-in-binding.rs:4:5
|
||||
|
|
||||
LL | _foo: i32 = 4;
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: see issue #23416 <https://github.com/rust-lang/rust/issues/23416> for more information
|
||||
= help: add `#![feature(type_ascription)]` to the crate attributes to enable
|
||||
help: you might have meant to introduce a new binding
|
||||
|
|
||||
LL | let _foo: i32 = 4;
|
||||
| +++
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0658`.
|
||||
Loading…
Add table
Add a link
Reference in a new issue