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#69014 - dwrensha:fix-68890, r=Centril
change an instance of span_bug() to struct_span_err() to avoid ICE After rust-lang#67148, the `span_bug()` in `parse_ty_tuple_or_parens()` is reachable because `parse_paren_comma_seq()` can return an `Ok()` even in cases where it encounters an error. This pull request prevents an ICE in such cases by replacing the `span_bug()` with `struct_span_error()`. Fixes rust-lang#68890.
- Loading branch information
Showing
3 changed files
with
28 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,4 @@ | ||
enum e{A((?'a a+?+l))} | ||
//~^ ERROR `?` may only modify trait bounds, not lifetime bounds | ||
//~| ERROR expected one of `)`, `+`, or `,` | ||
//~| ERROR expected trait bound, not lifetime bound |
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,20 @@ | ||
error: `?` may only modify trait bounds, not lifetime bounds | ||
--> $DIR/issue-68890.rs:1:11 | ||
| | ||
LL | enum e{A((?'a a+?+l))} | ||
| ^ | ||
|
||
error: expected one of `)`, `+`, or `,`, found `a` | ||
--> $DIR/issue-68890.rs:1:15 | ||
| | ||
LL | enum e{A((?'a a+?+l))} | ||
| ^ expected one of `)`, `+`, or `,` | ||
|
||
error: expected trait bound, not lifetime bound | ||
--> $DIR/issue-68890.rs:1:11 | ||
| | ||
LL | enum e{A((?'a a+?+l))} | ||
| ^^^ | ||
|
||
error: aborting due to 3 previous errors | ||
|