forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
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#74270 - davidtwco:issue-74086-more-placehol…
…der-type-error, r=estebank typeck: report placeholder type error w/out span Fixes rust-lang#74086. This PR fixes a regression introduced in rust-lang#70369 which meant that an error was not being emitted for invalid placeholder types when there wasn't a span available. r? @estebank
- Loading branch information
Showing
6 changed files
with
103 additions
and
63 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
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 @@ | ||
fn main() { | ||
static BUG: fn(_) -> u8 = |_| 8; | ||
//~^ ERROR the type placeholder `_` is not allowed within types on item signatures [E0121] | ||
} |
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 type placeholder `_` is not allowed within types on item signatures | ||
--> $DIR/issue-74086.rs:2:20 | ||
| | ||
LL | static BUG: fn(_) -> u8 = |_| 8; | ||
| ^ | ||
| | | ||
| not allowed in type signatures | ||
| help: use type parameters instead: `T` | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0121`. |
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
Oops, something went wrong.