forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#100111 - estebank:missing-let, r=compiler-e…
…rrors Provide suggestion on missing `let` in binding statement Fix rust-lang#78907. Fallout from the type ascription syntax.
- Loading branch information
Showing
4 changed files
with
53 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// run-rustfix | ||
fn main() { | ||
let mut _foo: i32 = 1; | ||
let _foo: i32 = 4; //~ ERROR type ascription is experimental | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// run-rustfix | ||
fn main() { | ||
let mut _foo: i32 = 1; | ||
_foo: i32 = 4; //~ ERROR type ascription is experimental | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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`. |