mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 13:13:34 +00:00
Auto merge of #95779 - cjgillot:ast-lifetimes-undeclared, r=petrochenkov
Report undeclared lifetimes during late resolution. First step in https://github.com/rust-lang/rust/pull/91557 We reuse the rib design of the current resolution framework. Specific `LifetimeRib` and `LifetimeRibKind` types are introduced. The most important variant is `LifetimeRibKind::Generics`, which happens each time we encounter something which may introduce generic lifetime parameters. It can be an item or a `for<...>` binder. The `LifetimeBinderKind` specifies how this rib behaves with respect to in-band lifetimes. r? `@petrochenkov`
This commit is contained in:
commit
cb1924a42a
1 changed files with 8 additions and 8 deletions
|
@ -1,8 +1,8 @@
|
|||
error: unneeded unit return type
|
||||
--> $DIR/unused_unit.rs:19:28
|
||||
--> $DIR/unused_unit.rs:19:58
|
||||
|
|
||||
LL | pub fn get_unit<F: Fn() -> (), G>(&self, f: F, _g: G) -> ()
|
||||
| ^^^^^^ help: remove the `-> ()`
|
||||
| ^^^^^^ help: remove the `-> ()`
|
||||
|
|
||||
note: the lint level is defined here
|
||||
--> $DIR/unused_unit.rs:12:9
|
||||
|
@ -10,18 +10,18 @@ note: the lint level is defined here
|
|||
LL | #![deny(clippy::unused_unit)]
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: unneeded unit return type
|
||||
--> $DIR/unused_unit.rs:19:28
|
||||
|
|
||||
LL | pub fn get_unit<F: Fn() -> (), G>(&self, f: F, _g: G) -> ()
|
||||
| ^^^^^^ help: remove the `-> ()`
|
||||
|
||||
error: unneeded unit return type
|
||||
--> $DIR/unused_unit.rs:20:18
|
||||
|
|
||||
LL | where G: Fn() -> () {
|
||||
| ^^^^^^ help: remove the `-> ()`
|
||||
|
||||
error: unneeded unit return type
|
||||
--> $DIR/unused_unit.rs:19:58
|
||||
|
|
||||
LL | pub fn get_unit<F: Fn() -> (), G>(&self, f: F, _g: G) -> ()
|
||||
| ^^^^^^ help: remove the `-> ()`
|
||||
|
||||
error: unneeded unit return type
|
||||
--> $DIR/unused_unit.rs:21:26
|
||||
|
|
||||
|
|
Loading…
Reference in a new issue