-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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 #95918 - compiler-errors:issue-95878, r=cjgillot
Delay a bug when we see SelfCtor in ref pattern Fixes #95878
- Loading branch information
Showing
3 changed files
with
29 additions
and
0 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,12 @@ | ||
struct Foo<'a>(&'a ()); | ||
|
||
impl<'a> Foo<'a> { | ||
fn spam(&mut self, baz: &mut Vec<u32>) { | ||
match 15 { | ||
ref Self => (), | ||
//~^ ERROR expected identifier, found keyword `Self` | ||
} | ||
} | ||
} | ||
|
||
fn main() {} |
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,8 @@ | ||
error: expected identifier, found keyword `Self` | ||
--> $DIR/issue-95878.rs:6:17 | ||
| | ||
LL | ref Self => (), | ||
| ^^^^ expected identifier, found keyword | ||
|
||
error: aborting due to previous error | ||
|