2023-12-18 16:55:55 +00:00
|
|
|
error: `~const` can only be applied to `#[const_trait]` traits
|
2024-10-26 20:54:38 +00:00
|
|
|
--> $DIR/const-bounds-non-const-trait.rs:6:21
|
2023-12-18 16:55:55 +00:00
|
|
|
|
|
|
|
|
LL | const fn perform<T: ~const NonConst>() {}
|
2024-12-09 19:34:43 +00:00
|
|
|
| ^^^^^^ can't be applied to `NonConst`
|
|
|
|
|
|
|
|
|
help: mark `NonConst` as `#[const_trait]` to allow it to have `const` implementations
|
|
|
|
|
|
|
|
|
LL | #[const_trait] trait NonConst {}
|
|
|
|
| ++++++++++++++
|
2023-12-18 16:55:55 +00:00
|
|
|
|
2024-10-20 19:49:11 +00:00
|
|
|
error: `~const` can only be applied to `#[const_trait]` traits
|
2024-10-26 20:54:38 +00:00
|
|
|
--> $DIR/const-bounds-non-const-trait.rs:6:21
|
2024-10-20 19:49:11 +00:00
|
|
|
|
|
|
|
|
LL | const fn perform<T: ~const NonConst>() {}
|
2024-12-09 19:34:43 +00:00
|
|
|
| ^^^^^^ can't be applied to `NonConst`
|
2024-10-20 19:49:11 +00:00
|
|
|
|
|
|
|
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
2024-12-09 19:34:43 +00:00
|
|
|
help: mark `NonConst` as `#[const_trait]` to allow it to have `const` implementations
|
|
|
|
|
|
|
|
|
LL | #[const_trait] trait NonConst {}
|
|
|
|
| ++++++++++++++
|
2024-10-20 19:49:11 +00:00
|
|
|
|
2023-12-18 16:55:55 +00:00
|
|
|
error: `const` can only be applied to `#[const_trait]` traits
|
2024-10-26 20:54:38 +00:00
|
|
|
--> $DIR/const-bounds-non-const-trait.rs:10:15
|
2023-12-18 16:55:55 +00:00
|
|
|
|
|
|
|
|
LL | fn operate<T: const NonConst>() {}
|
2024-12-09 19:34:43 +00:00
|
|
|
| ^^^^^ can't be applied to `NonConst`
|
|
|
|
|
|
|
|
|
help: mark `NonConst` as `#[const_trait]` to allow it to have `const` implementations
|
|
|
|
|
|
|
|
|
LL | #[const_trait] trait NonConst {}
|
|
|
|
| ++++++++++++++
|
2023-12-18 16:55:55 +00:00
|
|
|
|
2024-10-30 18:03:44 +00:00
|
|
|
error: aborting due to 3 previous errors
|
2023-12-18 16:55:55 +00:00
|
|
|
|