2023-02-23 10:27:06 -07:00
|
|
|
error[E0107]: associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
|
2022-10-07 21:10:08 +09:00
|
|
|
--> $DIR/issue-102768.rs:9:30
|
|
|
|
|
|
|
|
|
|
|
LL | fn f2<'a>(arg: Box<dyn X<Y<1> = &'a ()>>) {}
|
|
|
|
|
| ^ expected 1 lifetime argument
|
|
|
|
|
|
|
|
|
|
|
note: associated type defined here, with 1 lifetime parameter: `'a`
|
|
|
|
|
--> $DIR/issue-102768.rs:5:10
|
|
|
|
|
|
|
|
|
|
|
LL | type Y<'a>;
|
|
|
|
|
| ^ --
|
|
|
|
|
help: add missing lifetime argument
|
|
|
|
|
|
|
2022-11-06 09:45:34 +00:00
|
|
|
LL | fn f2<'a>(arg: Box<dyn X<Y<'_, 1> = &'a ()>>) {}
|
2022-10-07 21:10:08 +09:00
|
|
|
| +++
|
|
|
|
|
|
2023-02-23 10:27:06 -07:00
|
|
|
error[E0107]: associated type takes 0 generic arguments but 1 generic argument was supplied
|
2022-10-07 21:10:08 +09:00
|
|
|
--> $DIR/issue-102768.rs:9:30
|
|
|
|
|
|
|
|
|
|
|
LL | fn f2<'a>(arg: Box<dyn X<Y<1> = &'a ()>>) {}
|
2024-07-22 22:51:53 +00:00
|
|
|
| ^--- help: remove the unnecessary generics
|
|
|
|
|
| |
|
|
|
|
|
| expected 0 generic arguments
|
2022-10-07 21:10:08 +09:00
|
|
|
|
|
|
|
|
|
note: associated type defined here, with 0 generic parameters
|
|
|
|
|
--> $DIR/issue-102768.rs:5:10
|
|
|
|
|
|
|
|
|
|
|
LL | type Y<'a>;
|
|
|
|
|
| ^
|
|
|
|
|
|
2023-10-31 13:45:26 +00:00
|
|
|
error[E0107]: associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
|
|
|
|
|
--> $DIR/issue-102768.rs:9:30
|
|
|
|
|
|
|
|
|
|
|
LL | fn f2<'a>(arg: Box<dyn X<Y<1> = &'a ()>>) {}
|
|
|
|
|
| ^ expected 1 lifetime argument
|
|
|
|
|
|
|
|
|
|
|
note: associated type defined here, with 1 lifetime parameter: `'a`
|
|
|
|
|
--> $DIR/issue-102768.rs:5:10
|
|
|
|
|
|
|
|
|
|
|
LL | type Y<'a>;
|
|
|
|
|
| ^ --
|
|
|
|
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
|
|
|
|
help: add missing lifetime argument
|
|
|
|
|
|
|
|
|
|
|
LL | fn f2<'a>(arg: Box<dyn X<Y<'_, 1> = &'a ()>>) {}
|
|
|
|
|
| +++
|
|
|
|
|
|
|
|
|
|
error[E0107]: associated type takes 0 generic arguments but 1 generic argument was supplied
|
|
|
|
|
--> $DIR/issue-102768.rs:9:30
|
|
|
|
|
|
|
|
|
|
|
LL | fn f2<'a>(arg: Box<dyn X<Y<1> = &'a ()>>) {}
|
2024-07-22 22:51:53 +00:00
|
|
|
| ^--- help: remove the unnecessary generics
|
|
|
|
|
| |
|
|
|
|
|
| expected 0 generic arguments
|
2023-10-31 13:45:26 +00:00
|
|
|
|
|
|
|
|
|
note: associated type defined here, with 0 generic parameters
|
|
|
|
|
--> $DIR/issue-102768.rs:5:10
|
|
|
|
|
|
|
|
|
|
|
LL | type Y<'a>;
|
|
|
|
|
| ^
|
|
|
|
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
|
|
|
|
|
|
|
|
|
error[E0107]: associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
|
|
|
|
|
--> $DIR/issue-102768.rs:9:30
|
|
|
|
|
|
|
|
|
|
|
LL | fn f2<'a>(arg: Box<dyn X<Y<1> = &'a ()>>) {}
|
|
|
|
|
| ^ expected 1 lifetime argument
|
|
|
|
|
|
|
|
|
|
|
note: associated type defined here, with 1 lifetime parameter: `'a`
|
|
|
|
|
--> $DIR/issue-102768.rs:5:10
|
|
|
|
|
|
|
|
|
|
|
LL | type Y<'a>;
|
|
|
|
|
| ^ --
|
|
|
|
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
|
|
|
|
help: add missing lifetime argument
|
|
|
|
|
|
|
|
|
|
|
LL | fn f2<'a>(arg: Box<dyn X<Y<'_, 1> = &'a ()>>) {}
|
|
|
|
|
| +++
|
|
|
|
|
|
|
|
|
|
error[E0107]: associated type takes 0 generic arguments but 1 generic argument was supplied
|
|
|
|
|
--> $DIR/issue-102768.rs:9:30
|
|
|
|
|
|
|
|
|
|
|
LL | fn f2<'a>(arg: Box<dyn X<Y<1> = &'a ()>>) {}
|
2024-07-22 22:51:53 +00:00
|
|
|
| ^--- help: remove the unnecessary generics
|
|
|
|
|
| |
|
|
|
|
|
| expected 0 generic arguments
|
2023-10-31 13:45:26 +00:00
|
|
|
|
|
|
|
|
|
note: associated type defined here, with 0 generic parameters
|
|
|
|
|
--> $DIR/issue-102768.rs:5:10
|
|
|
|
|
|
|
|
|
|
|
LL | type Y<'a>;
|
|
|
|
|
| ^
|
|
|
|
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
|
|
|
|
|
2024-11-20 14:19:36 -08:00
|
|
|
error[E0038]: the trait `X` is not dyn compatible
|
2023-10-31 13:45:26 +00:00
|
|
|
--> $DIR/issue-102768.rs:9:24
|
|
|
|
|
|
|
|
|
|
|
LL | fn f2<'a>(arg: Box<dyn X<Y<1> = &'a ()>>) {}
|
2024-11-20 14:19:36 -08:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^ `X` is not dyn compatible
|
2023-10-31 13:45:26 +00:00
|
|
|
|
|
2024-11-20 14:19:36 -08:00
|
|
|
note: for a trait to be dyn compatible it needs to allow building a vtable
|
2025-01-22 05:14:07 +01:00
|
|
|
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
|
2023-10-31 13:45:26 +00:00
|
|
|
--> $DIR/issue-102768.rs:5:10
|
|
|
|
|
|
|
|
|
|
|
LL | trait X {
|
2024-11-20 14:19:36 -08:00
|
|
|
| - this trait is not dyn compatible...
|
2023-10-31 13:45:26 +00:00
|
|
|
LL | type Y<'a>;
|
|
|
|
|
| ^ ...because it contains the generic associated type `Y`
|
|
|
|
|
= help: consider moving `Y` to another trait
|
|
|
|
|
|
|
|
|
|
error: aborting due to 7 previous errors
|
2022-10-07 21:10:08 +09:00
|
|
|
|
2023-10-31 13:45:26 +00:00
|
|
|
Some errors have detailed explanations: E0038, E0107.
|
|
|
|
|
For more information about an error, try `rustc --explain E0038`.
|