rust/tests/ui/issues/issue-25901.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
203 B
Rust
Raw Normal View History

struct A;
struct B;
static S: &'static B = &A;
2022-08-28 06:27:31 +00:00
//~^ 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(){}