diff options
| author | bors <bors@rust-lang.org> | 2022-04-17 12:56:19 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-04-17 12:56:19 +0000 |
| commit | cb1924a42a27937760ad4c24daa6745c89700f92 (patch) | |
| tree | 08d80892c4ea1be618c879f21e1daf4da581bdcb /tests | |
| parent | cc25cbd24341d9e96c03756c09e841d504f6f4ef (diff) | |
| parent | e4110cf6333bcf6174b9277669a9b71aede2e67e (diff) | |
| download | rust-cb1924a42a27937760ad4c24daa6745c89700f92.tar.gz rust-cb1924a42a27937760ad4c24daa6745c89700f92.zip | |
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`
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ui/unused_unit.stderr | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/ui/unused_unit.stderr b/tests/ui/unused_unit.stderr index 02038b5fb6b..0d2cb77855b 100644 --- a/tests/ui/unused_unit.stderr +++ b/tests/ui/unused_unit.stderr @@ -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 @@ -11,16 +11,16 @@ LL | #![deny(clippy::unused_unit)] | ^^^^^^^^^^^^^^^^^^^ error: unneeded unit return type - --> $DIR/unused_unit.rs:20:18 + --> $DIR/unused_unit.rs:19:28 | -LL | where G: Fn() -> () { - | ^^^^^^ help: remove the `-> ()` +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:19:58 + --> $DIR/unused_unit.rs:20:18 | -LL | pub fn get_unit<F: Fn() -> (), G>(&self, f: F, _g: G) -> () - | ^^^^^^ help: remove the `-> ()` +LL | where G: Fn() -> () { + | ^^^^^^ help: remove the `-> ()` error: unneeded unit return type --> $DIR/unused_unit.rs:21:26 |
