You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error: `for<...>` may only modify trait bounds, not lifetime bounds
2
+
--> $DIR/erroneous-lifetime-bound.rs:1:25
3
+
|
4
+
LL | fn foo<T>() where T: for<'a> 'a {}
5
+
| ^^^^
6
+
7
+
error[E0261]: use of undeclared lifetime name `'a`
8
+
--> $DIR/erroneous-lifetime-bound.rs:1:30
9
+
|
10
+
LL | fn foo<T>() where T: for<'a> 'a {}
11
+
| ^^ undeclared lifetime
12
+
|
13
+
= note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html
14
+
help: consider making the bound lifetime-generic with a new `'a` lifetime
15
+
|
16
+
LL | fn foo<T>() where for<'a> T: for<'a> 'a {}
17
+
| +++++++
18
+
help: consider introducing lifetime `'a` here
19
+
|
20
+
LL | fn foo<'a, T>() where T: for<'a> 'a {}
21
+
| +++
22
+
23
+
error: aborting due to 2 previous errors
24
+
25
+
For more information about this error, try `rustc --explain E0261`.
= note: see issue #62290 <https://github.com/rust-lang/rust/issues/62290> for more information
56
+
= help: add `#![feature(async_closure)]` to the crate attributes to enable
57
+
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
58
+
= help: to use an async block, remove the `||`: `async {`
= note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information
67
+
= help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
68
+
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
69
+
70
+
warning: relaxing a default bound only does something for `?Sized`; all other traits are not bound by default
71
+
--> $DIR/bound-modifiers.rs:5:31
72
+
|
73
+
LL | fn polarity() -> impl Sized + ?use<> {}
74
+
| ^^^^^^
75
+
76
+
warning: relaxing a default bound only does something for `?Sized`; all other traits are not bound by default
77
+
--> $DIR/bound-modifiers.rs:5:31
78
+
|
79
+
LL | fn polarity() -> impl Sized + ?use<> {}
80
+
| ^^^^^^
81
+
|
82
+
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
83
+
84
+
error: aborting due to 10 previous errors; 2 warnings emitted
85
+
86
+
Some errors have detailed explanations: E0405, E0658.
87
+
For more information about an error, try `rustc --explain E0405`.
0 commit comments