1 error[E0015]: cannot perform deref coercion on `A` in statics
2 --> $DIR/issue-25901.rs:4:24
4 LL | static S: &'static B = &A;
7 = note: attempting to deref into `B`
8 note: deref defined here
9 --> $DIR/issue-25901.rs:10:5
13 note: impl defined here, but it is not `const`
14 --> $DIR/issue-25901.rs:9:1
16 LL | impl Deref for A {
18 = note: calls in statics are limited to constant functions, tuple structs and tuple variants
20 error: aborting due to previous error
22 For more information about this error, try `rustc --explain E0015`.