Commit be1789a
authored
Rollup merge of rust-lang#107648 - matthiaskrgr:unused_lifetime_104432_fix, r=cjgillot
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 rust-lang#104432File tree
2 files changed
+28
-12
lines changed- compiler/rustc_resolve/src/late
- tests/ui/lifetimes
2 files changed
+28
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2244 | 2244 | | |
2245 | 2245 | | |
2246 | 2246 | | |
2247 | | - | |
2248 | 2247 | | |
2249 | | - | |
2250 | | - | |
2251 | | - | |
2252 | | - | |
2253 | | - | |
2254 | | - | |
2255 | | - | |
2256 | | - | |
2257 | | - | |
2258 | | - | |
2259 | | - | |
| 2248 | + | |
| 2249 | + | |
| 2250 | + | |
| 2251 | + | |
| 2252 | + | |
| 2253 | + | |
| 2254 | + | |
| 2255 | + | |
| 2256 | + | |
| 2257 | + | |
| 2258 | + | |
| 2259 | + | |
| 2260 | + | |
| 2261 | + | |
| 2262 | + | |
| 2263 | + | |
2260 | 2264 | | |
2261 | 2265 | | |
2262 | 2266 | | |
| |||
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
0 commit comments