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.
Avoid infinite recursion on error case in
get_path_res
.
Fixes rust-lang#101505.
- Loading branch information
1 parent
78a891d
commit 80845be
Showing
3 changed files
with
19 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,7 @@ | ||
// compile-flags: -Zsave-analysis | ||
|
||
// Check that this doesn't loop infinitely. | ||
|
||
fn a(self) {} //~ ERROR `self` parameter is only allowed in associated functions | ||
|
||
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,10 @@ | ||
error: `self` parameter is only allowed in associated functions | ||
--> $DIR/issue-101505.rs:5:6 | ||
| | ||
LL | fn a(self) {} | ||
| ^^^^ not semantically valid as function parameter | ||
| | ||
= note: associated functions are those in `impl` or `trait` definitions | ||
|
||
error: aborting due to previous error | ||
|