rust/tests/ui/traits/const-traits/const-trait-bounds-trait-objects.stderr
Michael Goulet e91267f3f0 Move tests
2024-10-22 00:03:09 +00:00

31 lines
908 B
Plaintext

error: const trait bounds are not allowed in trait object types
--> $DIR/const-trait-bounds-trait-objects.rs:9:17
|
LL | let _: &dyn const Trait;
| ^^^^^^^^^^^
error: `~const` is not allowed here
--> $DIR/const-trait-bounds-trait-objects.rs:10:17
|
LL | let _: &dyn ~const Trait;
| ^^^^^^
|
= note: trait objects cannot have `~const` trait bounds
error: const trait bounds are not allowed in trait object types
--> $DIR/const-trait-bounds-trait-objects.rs:15:25
|
LL | const fn handle(_: &dyn const NonConst) {}
| ^^^^^^^^^^^^^^
error: `~const` is not allowed here
--> $DIR/const-trait-bounds-trait-objects.rs:17:23
|
LL | const fn take(_: &dyn ~const NonConst) {}
| ^^^^^^
|
= note: trait objects cannot have `~const` trait bounds
error: aborting due to 4 previous errors