-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix diagnostic suggests adding type
[type error]
Fixes #79040 Unresolved questions: Why does this change output the diagnostic twice? Why does the CI fail when the errors are pointed out (UI tests)?
- Loading branch information
1 parent
1279b3b
commit d9d6921
Showing
5 changed files
with
27 additions
and
21 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 @@ | ||
fn main() { | ||
const FOO = "hello" + 1; | ||
//^~ ERROR cannot add `{integer}` to `&str` | ||
println!("{}", FOO); | ||
} |
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,19 @@ | ||
error[E0369]: cannot add `{integer}` to `&str` | ||
--> $DIR/79040.rs:2:25 | ||
| | ||
LL | const FOO = "hello" + 1; | ||
| ------- ^ - {integer} | ||
| | | ||
| &str | ||
|
||
error[E0369]: cannot add `{integer}` to `&str` | ||
--> $DIR/79040.rs:2:25 | ||
| | ||
LL | const FOO = "hello" + 1; | ||
| ------- ^ - {integer} | ||
| | | ||
| &str | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0369`. |
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