granite-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
Text
Raw Normal View History

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