blob: 50952a859508c84d93002197d896d101936b5302 [file]
//! Regression test for https://github.com/rust-lang/rust/issues/25901
//!
struct A;
struct B;
static S: &'static B = &A;
//~^ ERROR cannot perform non-const deref coercion
use std::ops::Deref;
impl Deref for A {
type Target = B;
fn deref(&self) -> &B {
static B_: B = B;
&B_
}
}
fn main() {}