summaryrefslogtreecommitdiffstats
path: root/tests/ui/unsafe/issue-3080.rs
blob: 2b5269dda8fa6b05ef0b156e46f41bf993f056c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
// revisions: mir thir
// [thir]compile-flags: -Z thir-unsafeck

struct X(());
impl X {
    pub unsafe fn with(&self) { }
}

fn main() {
    X(()).with(); //~ ERROR requires unsafe function or block
}