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 Move /src/test to /tests 2023-01-11 09:32:08 +00:00
lifetime-errors Move /src/test to /tests 2023-01-11 09:32:08 +00:00
bare-trait-object-borrowck.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
bare-trait-object.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
borrowck-let-suggestion.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
borrowck-let-suggestion.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
conflicting-bounds.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
conflicting-bounds.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
copy_modulo_regions.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
copy_modulo_regions.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
elided-lifetime-in-param-pat.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
elided-lifetime-in-path-in-impl-Fn.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
elided-lifetime-in-path-in-pat.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
elided-lifetime-in-path-in-type-relative-expression.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
fullwidth-ampersand.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
fullwidth-ampersand.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-17728.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-17728.stderr Modify primary span label for E0308 2023-01-30 20:12:19 +00:00
issue-26638.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-26638.stderr Modify primary span label for E0308 2023-01-30 20:12:19 +00:00
issue-34979.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-34979.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-54378.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-55796.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-55796.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-64173-unused-lifetimes.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-64173-unused-lifetimes.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-67498.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-70917-lifetimes-in-fn-def.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-76168-hr-outlives-2.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-76168-hr-outlives.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-77175.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-79187-2.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-79187-2.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-79187.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-79187.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-83737-binders-across-types.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-83737-erasing-bound-vars.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-83753-invalid-associated-type-supertrait-hrtb.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-83753-invalid-associated-type-supertrait-hrtb.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-83907-invalid-fn-like-path.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-83907-invalid-fn-like-path.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-84398.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-84604.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-90170-elision-mismatch.fixed Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-90170-elision-mismatch.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-90170-elision-mismatch.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-90600-expected-return-static-indirect.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-90600-expected-return-static-indirect.stderr Tweak E0597 2023-01-15 19:46:20 +00:00
issue-91763.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-91763.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-95023.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-95023.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-97193.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-97193.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-97194.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-97194.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
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 Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-105227.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-105227.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
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 Move /src/test to /tests 2023-01-11 09:32:08 +00:00
lifetime-bound-will-change-warning.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
lifetime-doesnt-live-long-enough.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
lifetime-doesnt-live-long-enough.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
lifetime-elision-return-type-requires-explicit-lifetime.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
lifetime-elision-return-type-requires-explicit-lifetime.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
lifetime-elision-return-type-trait.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
lifetime-elision-return-type-trait.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
lifetime-mismatch-between-trait-and-impl.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
lifetime-mismatch-between-trait-and-impl.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
lifetime-no-keyword.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
lifetime-no-keyword.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
missing-lifetime-in-alias.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
missing-lifetime-in-alias.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
nested-binder-print.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
nested-binder-print.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
nested.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
re-empty-in-error.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
re-empty-in-error.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
shadow.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
shadow.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
suggest-introducing-and-adding-missing-lifetime.fixed Fix invalid syntax in impl Trait parameter type suggestions for E0311 2023-01-11 14:49:55 -08:00
suggest-introducing-and-adding-missing-lifetime.rs Fix invalid syntax in impl Trait parameter type suggestions for E0311 2023-01-11 14:49:55 -08:00
suggest-introducing-and-adding-missing-lifetime.stderr Fix invalid syntax in impl Trait parameter type suggestions for E0311 2023-01-11 14:49:55 -08:00
undeclared-lifetime-used-in-debug-macro-issue-70152.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
undeclared-lifetime-used-in-debug-macro-issue-70152.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unnamed-closure-doesnt-life-long-enough-issue-67634.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unnamed-closure-doesnt-life-long-enough-issue-67634.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unusual-rib-combinations.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unusual-rib-combinations.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00