Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions compiler/rustc_middle/src/ty/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,7 @@ impl<'tcx> FallibleTypeFolder<TyCtxt<'tcx>> for MakeSuggestableFolder<'tcx> {
}

Closure(..)
| CoroutineClosure(..)
| FnDef(..)
| Infer(..)
| Coroutine(..)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//@ edition: 2024

struct T<'g>();
//~^ ERROR lifetime parameter `'g` is never used

fn ord<a>() -> _ {
//~^ WARN type parameter `a` should have an upper camel case name
//~| ERROR the placeholder `_` is not allowed within types on item signatures for return types
async || {}
}

fn main() {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
warning: type parameter `a` should have an upper camel case name
--> $DIR/ice-async-closure-variance-issue-148488.rs:6:8
|
LL | fn ord<a>() -> _ {
| ^ help: convert the identifier to upper camel case: `A`
|
= note: `#[warn(non_camel_case_types)]` (part of `#[warn(nonstandard_style)]`) on by default

error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
--> $DIR/ice-async-closure-variance-issue-148488.rs:6:16
|
LL | fn ord<a>() -> _ {
| ^ not allowed in type signatures

error[E0392]: lifetime parameter `'g` is never used
--> $DIR/ice-async-closure-variance-issue-148488.rs:3:10
|
LL | struct T<'g>();
| ^^ unused lifetime parameter
|
= help: consider removing `'g`, referring to it in a field, or using a marker such as `PhantomData`

error: aborting due to 2 previous errors; 1 warning emitted

Some errors have detailed explanations: E0121, E0392.
For more information about an error, try `rustc --explain E0121`.
Loading