fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0015]: cannot perform deref coercion on `A` in statics 2 --> $DIR/issue-25901.rs:4:24 3 | 4LL | static S: &'static B = &A; 5 | ^^ 6 | 7 = note: attempting to deref into `B` 8note: deref defined here 9 --> $DIR/issue-25901.rs:10:5 10 | 11LL | type Target = B; 12 | ^^^^^^^^^^^ 13note: impl defined here, but it is not `const` 14 --> $DIR/issue-25901.rs:9:1 15 | 16LL | impl Deref for A { 17 | ^^^^^^^^^^^^^^^^ 18 = note: calls in statics are limited to constant functions, tuple structs and tuple variants 19 = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable 20 = note: consider wrapping this expression in `Lazy::new(|| ...)` from the `once_cell` crate: https://crates.io/crates/once_cell 21 22error: aborting due to previous error 23 24For more information about this error, try `rustc --explain E0015`.