Files
rust/tests/ui/impl-trait
Esteban Küber a49d4d7713 Special case detecting 'static lifetime requirement coming from -> Box<dyn Trait>
```
error[E0310]: the parameter type `R` may not live long enough
  --> $DIR/implicit-static-lifetime-in-dyn-trait-return-type.rs:10:5
   |
LL | fn bb<R>(r: R) -> Box<dyn Foo> {
   |                       ------- this `dyn Trait` has an implicit `'static` lifetime bound
LL |     Box::new(Bar(r))
   |     ^^^^^^^^^^^^^^^^
   |     |
   |     the parameter type `R` must be valid for the static lifetime...
   |     ...so that the type `R` will meet its required lifetime bounds
   |
help: consider adding an explicit lifetime bound
   |
LL | fn bb<R: 'static>(r: R) -> Box<dyn Foo> {
   |        +++++++++
```
2025-11-04 22:33:13 +00:00
..
2025-05-09 02:35:18 +00:00
2025-09-26 16:33:15 +02:00
2025-09-28 20:55:35 +00:00
2025-04-03 11:13:10 +02:00
2025-06-30 11:50:19 +05:00
2024-06-13 10:41:52 +00:00
2024-04-08 15:00:03 +00:00
2024-08-17 12:43:25 -04:00
2024-06-19 08:28:31 +00:00
2024-06-19 08:28:31 +00:00
2024-06-19 08:40:29 +00:00
2025-08-20 11:10:38 +02:00
2025-09-21 17:26:39 -04:00