aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/issue-2195.rs
blob: fc158c39bb4b83de8bd3b18f109de4f709842bfb (plain)
1
2
3
4
5
6
7
8
9
10
11
#[lang = "sized"]
pub trait Sized {}

struct A<T> {
    // { dg-warning "struct is never constructed" "" { target *-*-* } .-1 }
    f: *const T,
}

pub fn cast<T>(a: A<T>) {
    let z = a.f as *const ();
}