rust/tests/ui/lifetimes
Matthias Krüger a3637032db unused-lifetimes: don't warn about lifetimes originating from expanded code
previously, we would warn like this:

````
warning: lifetime parameter `'s` never used
 --> /tmp/unusedlif/code.rs:6:62
  |
5 | #[derive(Clone)]
  |          - help: elide the unused lifetime
6 | struct ShimMethod4<T: Trait2 + 'static>(pub &'static dyn for<'s> Fn(&'s mut T::As));
  |                                                              ^^
  |
  = note: requested on the command line with `-W unused-lifetimes`
````

Fixes #104432
2023-02-03 21:18:34 +01:00
..
auxiliary
lifetime-errors
bare-trait-object-borrowck.rs
bare-trait-object.rs
borrowck-let-suggestion.rs
borrowck-let-suggestion.stderr
conflicting-bounds.rs
conflicting-bounds.stderr
copy_modulo_regions.rs
copy_modulo_regions.stderr
elided-lifetime-in-param-pat.rs
elided-lifetime-in-path-in-impl-Fn.rs
elided-lifetime-in-path-in-pat.rs
elided-lifetime-in-path-in-type-relative-expression.rs
fullwidth-ampersand.rs
fullwidth-ampersand.stderr
issue-17728.rs
issue-17728.stderr Modify primary span label for E0308 2023-01-30 20:12:19 +00:00
issue-26638.rs
issue-26638.stderr Modify primary span label for E0308 2023-01-30 20:12:19 +00:00
issue-34979.rs
issue-34979.stderr
issue-54378.rs
issue-55796.rs
issue-55796.stderr
issue-64173-unused-lifetimes.rs
issue-64173-unused-lifetimes.stderr
issue-67498.rs
issue-70917-lifetimes-in-fn-def.rs
issue-76168-hr-outlives-2.rs
issue-76168-hr-outlives.rs
issue-77175.rs
issue-79187-2.rs
issue-79187-2.stderr
issue-79187.rs
issue-79187.stderr
issue-83737-binders-across-types.rs
issue-83737-erasing-bound-vars.rs
issue-83753-invalid-associated-type-supertrait-hrtb.rs
issue-83753-invalid-associated-type-supertrait-hrtb.stderr
issue-83907-invalid-fn-like-path.rs
issue-83907-invalid-fn-like-path.stderr
issue-84398.rs
issue-84604.rs
issue-90170-elision-mismatch.fixed
issue-90170-elision-mismatch.rs
issue-90170-elision-mismatch.stderr
issue-90600-expected-return-static-indirect.rs
issue-90600-expected-return-static-indirect.stderr Tweak E0597 2023-01-15 19:46:20 +00:00
issue-91763.rs
issue-91763.stderr
issue-95023.rs
issue-95023.stderr
issue-97193.rs
issue-97193.stderr
issue-97194.rs
issue-97194.stderr
issue-103582-hint-for-missing-lifetime-bound-on-trait-object-using-type-alias.fixed Add hint for missing lifetime bound on trait object when type alias is used 2023-01-23 09:54:45 -08:00
issue-103582-hint-for-missing-lifetime-bound-on-trait-object-using-type-alias.rs Add hint for missing lifetime bound on trait object when type alias is used 2023-01-23 09:54:45 -08:00
issue-103582-hint-for-missing-lifetime-bound-on-trait-object-using-type-alias.stderr Add hint for missing lifetime bound on trait object when type alias is used 2023-01-23 09:54:45 -08:00
issue-104432-unused-lifetimes-in-expansion.rs unused-lifetimes: don't warn about lifetimes originating from expanded code 2023-02-03 21:18:34 +01:00
issue-105227.fixed
issue-105227.rs
issue-105227.stderr
issue-105507.fixed Add 'static lifetime suggestion when GAT implied 'static requirement from HRTB 2023-01-17 11:52:45 -08:00
issue-105507.rs Add 'static lifetime suggestion when GAT implied 'static requirement from HRTB 2023-01-17 11:52:45 -08:00
issue-105507.stderr Add 'static lifetime suggestion when GAT implied 'static requirement from HRTB 2023-01-17 11:52:45 -08:00
lifetime-bound-will-change-warning.rs
lifetime-bound-will-change-warning.stderr
lifetime-doesnt-live-long-enough.rs
lifetime-doesnt-live-long-enough.stderr
lifetime-elision-return-type-requires-explicit-lifetime.rs
lifetime-elision-return-type-requires-explicit-lifetime.stderr
lifetime-elision-return-type-trait.rs
lifetime-elision-return-type-trait.stderr
lifetime-mismatch-between-trait-and-impl.rs
lifetime-mismatch-between-trait-and-impl.stderr
lifetime-no-keyword.rs
lifetime-no-keyword.stderr
missing-lifetime-in-alias.rs
missing-lifetime-in-alias.stderr
nested-binder-print.rs
nested-binder-print.stderr
nested.rs
re-empty-in-error.rs
re-empty-in-error.stderr
shadow.rs
shadow.stderr
suggest-introducing-and-adding-missing-lifetime.fixed
suggest-introducing-and-adding-missing-lifetime.rs
suggest-introducing-and-adding-missing-lifetime.stderr
undeclared-lifetime-used-in-debug-macro-issue-70152.rs
undeclared-lifetime-used-in-debug-macro-issue-70152.stderr
unnamed-closure-doesnt-life-long-enough-issue-67634.rs
unnamed-closure-doesnt-life-long-enough-issue-67634.stderr
unusual-rib-combinations.rs
unusual-rib-combinations.stderr