summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-25901.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/issues/issue-25901.stderr')
-rw-r--r--src/test/ui/issues/issue-25901.stderr22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-25901.stderr b/src/test/ui/issues/issue-25901.stderr
new file mode 100644
index 000000000..e933745c4
--- /dev/null
+++ b/src/test/ui/issues/issue-25901.stderr
@@ -0,0 +1,22 @@
+error[E0015]: cannot perform deref coercion on `A` in statics
+ --> $DIR/issue-25901.rs:4:24
+ |
+LL | static S: &'static B = &A;
+ | ^^
+ |
+ = note: attempting to deref into `B`
+note: deref defined here
+ --> $DIR/issue-25901.rs:10:5
+ |
+LL | type Target = B;
+ | ^^^^^^^^^^^
+note: impl defined here, but it is not `const`
+ --> $DIR/issue-25901.rs:9:1
+ |
+LL | impl Deref for A {
+ | ^^^^^^^^^^^^^^^^
+ = note: calls in statics are limited to constant functions, tuple structs and tuple variants
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0015`.