2023-09-27 16:25:31 -05:00
|
|
|
error: `~const` is not allowed here
|
2024-10-30 13:03:44 -05:00
|
|
|
--> $DIR/const-bound-on-not-const-associated-fn.rs:11:40
|
2023-09-27 16:25:31 -05:00
|
|
|
|
|
|
|
|
LL | fn do_something_else() where Self: ~const MyTrait;
|
2023-11-24 08:32:05 -06:00
|
|
|
| ^^^^^^
|
2023-09-27 16:25:31 -05:00
|
|
|
|
|
|
|
|
note: this function is not `const`, so it cannot have `~const` trait bounds
|
2024-10-30 13:03:44 -05:00
|
|
|
--> $DIR/const-bound-on-not-const-associated-fn.rs:11:8
|
2023-09-27 16:25:31 -05:00
|
|
|
|
|
|
|
|
LL | fn do_something_else() where Self: ~const MyTrait;
|
|
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: `~const` is not allowed here
|
2024-10-30 13:03:44 -05:00
|
|
|
--> $DIR/const-bound-on-not-const-associated-fn.rs:22:32
|
2023-09-27 16:25:31 -05:00
|
|
|
|
|
|
|
|
LL | pub fn foo(&self) where T: ~const MyTrait {
|
2023-11-24 08:32:05 -06:00
|
|
|
| ^^^^^^
|
2023-09-27 16:25:31 -05:00
|
|
|
|
|
|
|
|
note: this function is not `const`, so it cannot have `~const` trait bounds
|
2024-10-30 13:03:44 -05:00
|
|
|
--> $DIR/const-bound-on-not-const-associated-fn.rs:22:12
|
2023-09-27 16:25:31 -05:00
|
|
|
|
|
|
|
|
LL | pub fn foo(&self) where T: ~const MyTrait {
|
|
|
|
| ^^^
|
|
|
|
|
2024-10-21 14:37:48 -05:00
|
|
|
error: aborting due to 2 previous errors
|
2023-09-27 16:25:31 -05:00
|
|
|
|