forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
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#75319 - estebank:format-ice, r=eddyb
Fix ICE rust-lang#75307 in `format` Remove usages of `unwrap` (even when some are safe today). Fix rust-lang#75307.
- Loading branch information
Showing
3 changed files
with
26 additions
and
20 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,3 @@ | ||
fn main() { | ||
format!(r"{}{}{}", named_arg=1); //~ ERROR invalid reference to positional arguments 1 and 2 | ||
} |
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,10 @@ | ||
error: invalid reference to positional arguments 1 and 2 (there is 1 argument) | ||
--> $DIR/issue-75307.rs:2:13 | ||
| | ||
LL | format!(r"{}{}{}", named_arg=1); | ||
| ^^^^^^^^^ | ||
| | ||
= note: positional arguments are zero-based | ||
|
||
error: aborting due to previous error | ||
|