rust/tests/ui/issues/issue-25901.rs
2023-01-11 09:32:08 +00:00

15 lines
203 B
Rust

struct A;
struct B;
static S: &'static B = &A;
//~^ ERROR the trait bound
use std::ops::Deref;
impl Deref for A {
type Target = B;
fn deref(&self)->&B { static B_: B = B; &B_ }
}
fn main(){}