-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Yan Chen
committed
Jun 28, 2022
1 parent
94e9374
commit f97326d
Showing
3 changed files
with
26 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,9 @@ | ||
fn main() {} | ||
trait A { | ||
fn a(aa: B) -> Result<_, B> { | ||
//~^ ERROR: the placeholder `_` is not allowed within types on item signatures for return types [E0121] | ||
Ok(()) | ||
} | ||
} | ||
|
||
enum B {} |
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 @@ | ||
error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types | ||
--> $DIR/issue-98260.rs:3:27 | ||
| | ||
LL | fn a(aa: B) -> Result<_, B> { | ||
| -------^---- | ||
| | | | ||
| | not allowed in type signatures | ||
| help: replace with the correct return type: `Result<(), B>` | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0121`. |