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#109403 - chenyukang:yukang/fix-109396, r=es…
…tebank Avoid ICE of attempt to add with overflow in emitter Fixes rust-lang#109396 r? `@estebank`
- Loading branch information
Showing
3 changed files
with
47 additions
and
1 deletion.
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,12 @@ | ||
fn main() { | ||
{ | ||
let mut mutex = std::mem::zeroed( | ||
//~^ ERROR this function takes 0 arguments but 4 arguments were supplied | ||
file.as_raw_fd(), | ||
//~^ ERROR expected value, found macro `file` | ||
0, | ||
0, | ||
0, | ||
); | ||
} | ||
} |
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,34 @@ | ||
error[E0423]: expected value, found macro `file` | ||
--> $DIR/issue-109396.rs:5:13 | ||
| | ||
LL | file.as_raw_fd(), | ||
| ^^^^ not a value | ||
|
||
error[E0061]: this function takes 0 arguments but 4 arguments were supplied | ||
--> $DIR/issue-109396.rs:3:25 | ||
| | ||
LL | let mut mutex = std::mem::zeroed( | ||
| ^^^^^^^^^^^^^^^^ | ||
LL | | ||
LL | file.as_raw_fd(), | ||
| ---------------- unexpected argument | ||
LL | | ||
LL | 0, | ||
| - unexpected argument of type `{integer}` | ||
LL | 0, | ||
| - unexpected argument of type `{integer}` | ||
LL | 0, | ||
| - unexpected argument of type `{integer}` | ||
| | ||
note: function defined here | ||
--> $SRC_DIR/core/src/mem/mod.rs:LL:COL | ||
help: remove the extra arguments | ||
| | ||
LL - file.as_raw_fd(), | ||
LL + , | ||
| | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
Some errors have detailed explanations: E0061, E0423. | ||
For more information about an error, try `rustc --explain E0061`. |