2023-12-18 16:55:55 +00:00
|
|
|
error: const trait bounds are not allowed in trait object types
|
2024-06-25 07:52:44 +00:00
|
|
|
--> $DIR/const-trait-bounds-trait-objects.rs:9:17
|
2023-12-18 16:55:55 +00:00
|
|
|
|
|
|
|
|
LL | let _: &dyn const Trait;
|
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
2024-01-03 08:24:42 +00:00
|
|
|
error: `~const` is not allowed here
|
2024-06-25 07:52:44 +00:00
|
|
|
--> $DIR/const-trait-bounds-trait-objects.rs:10:17
|
2024-01-03 08:24:42 +00:00
|
|
|
|
|
|
|
|
LL | let _: &dyn ~const Trait;
|
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
|
= note: trait objects cannot have `~const` trait bounds
|
|
|
|
|
|
|
|
error: const trait bounds are not allowed in trait object types
|
2024-06-25 07:52:44 +00:00
|
|
|
--> $DIR/const-trait-bounds-trait-objects.rs:15:25
|
2024-01-03 08:24:42 +00:00
|
|
|
|
|
|
|
|
LL | const fn handle(_: &dyn const NonConst) {}
|
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: `~const` is not allowed here
|
2024-06-25 07:52:44 +00:00
|
|
|
--> $DIR/const-trait-bounds-trait-objects.rs:17:23
|
2024-01-03 08:24:42 +00:00
|
|
|
|
|
|
|
|
LL | const fn take(_: &dyn ~const NonConst) {}
|
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
|
= note: trait objects cannot have `~const` trait bounds
|
|
|
|
|
2024-06-25 07:52:44 +00:00
|
|
|
error: aborting due to 4 previous errors
|
2023-12-18 16:55:55 +00:00
|
|
|
|