forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 7
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#118057 - bvanjoi:fix-118048, r=cjgillot dedup for duplicate suggestions Fixes rust-lang#118048 An easy fix.
- Loading branch information
Showing
3 changed files
with
36 additions
and
4 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,10 @@ | ||
macro_rules! foo { | ||
($ty:ty) => { | ||
fn foo(_: $ty, _: $ty) {} | ||
} | ||
} | ||
|
||
foo!(_); | ||
//~^ ERROR the placeholder `_` is not allowed within types on item signatures for 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,21 @@ | ||
error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions | ||
--> $DIR/issue-118048.rs:7:6 | ||
| | ||
LL | foo!(_); | ||
| ^ | ||
| | | ||
| not allowed in type signatures | ||
| not allowed in type signatures | ||
| | ||
help: use type parameters instead | ||
| | ||
LL ~ fn foo<T>(_: $ty, _: $ty) {} | ||
LL | } | ||
LL | } | ||
LL | | ||
LL ~ foo!(T); | ||
| | ||
|
||
error: aborting due to 1 previous error | ||
|
||
For more information about this error, try `rustc --explain E0121`. |