2023-12-18 17:55:55 +01:00
|
|
|
error: const trait bounds are not allowed in trait object types
|
|
|
|
|
--> $DIR/const-trait-bounds-trait-objects.rs:8:17
|
|
|
|
|
|
|
|
|
|
|
LL | let _: &dyn const Trait;
|
|
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
2024-01-03 09:24:42 +01:00
|
|
|
error: `~const` is not allowed here
|
|
|
|
|
--> $DIR/const-trait-bounds-trait-objects.rs:9: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:14:25
|
|
|
|
|
|
|
|
|
|
|
LL | const fn handle(_: &dyn const NonConst) {}
|
|
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
|
error: `~const` is not allowed here
|
|
|
|
|
--> $DIR/const-trait-bounds-trait-objects.rs:16:23
|
|
|
|
|
|
|
|
|
|
|
LL | const fn take(_: &dyn ~const NonConst) {}
|
|
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
|
|
|
= note: trait objects cannot have `~const` trait bounds
|
|
|
|
|
|
2024-06-21 12:22:29 +00:00
|
|
|
warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes
|
|
|
|
|
--> $DIR/const-trait-bounds-trait-objects.rs:1:30
|
|
|
|
|
|
|
|
|
|
|
LL | #![feature(const_trait_impl, effects)]
|
|
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
|
|
|
= note: see issue #102090 <https://github.com/rust-lang/rust/issues/102090> for more information
|
|
|
|
|
= note: `#[warn(incomplete_features)]` on by default
|
|
|
|
|
|
|
|
|
|
error: aborting due to 4 previous errors; 1 warning emitted
|
2023-12-18 17:55:55 +01:00
|
|
|
|