rust/tests/ui/traits/const-traits/const-bound-on-not-const-associated-fn.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

27 lines
903 B
Plaintext
Raw Normal View History

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
|
LL | fn do_something_else() where Self: ~const MyTrait;
2023-11-24 08:32:05 -06: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
|
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
|
LL | pub fn foo(&self) where T: ~const MyTrait {
2023-11-24 08:32:05 -06: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
|
LL | pub fn foo(&self) where T: ~const MyTrait {
| ^^^
2024-10-21 14:37:48 -05:00
error: aborting due to 2 previous errors