summaryrefslogtreecommitdiffstats
path: root/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/const-bound-on-not-const-associated-fn.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/rfcs/rfc-2632-const-trait-impl/effects/const-bound-on-not-const-associated-fn.stderr')
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/effects/const-bound-on-not-const-associated-fn.stderr26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/const-bound-on-not-const-associated-fn.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/const-bound-on-not-const-associated-fn.stderr
new file mode 100644
index 000000000..9210f6427
--- /dev/null
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/const-bound-on-not-const-associated-fn.stderr
@@ -0,0 +1,26 @@
+error: `~const` is not allowed here
+ --> $DIR/const-bound-on-not-const-associated-fn.rs:9:40
+ |
+LL | fn do_something_else() where Self: ~const MyTrait;
+ | ^^^^^^^^^^^^^^
+ |
+note: this function is not `const`, so it cannot have `~const` trait bounds
+ --> $DIR/const-bound-on-not-const-associated-fn.rs:9:8
+ |
+LL | fn do_something_else() where Self: ~const MyTrait;
+ | ^^^^^^^^^^^^^^^^^
+
+error: `~const` is not allowed here
+ --> $DIR/const-bound-on-not-const-associated-fn.rs:20:32
+ |
+LL | pub fn foo(&self) where T: ~const MyTrait {
+ | ^^^^^^^^^^^^^^
+ |
+note: this function is not `const`, so it cannot have `~const` trait bounds
+ --> $DIR/const-bound-on-not-const-associated-fn.rs:20:12
+ |
+LL | pub fn foo(&self) where T: ~const MyTrait {
+ | ^^^
+
+error: aborting due to 2 previous errors
+