rust/tests/ui/unsafe/issue-3080.rs

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

12 lines
201 B
Rust
Raw Normal View History

// revisions: mir thir
// [thir]compile-flags: -Z thir-unsafeck
struct X(());
impl X {
2013-09-02 13:30:00 +00:00
pub unsafe fn with(&self) { }
2012-12-07 00:13:40 +00:00
}
fn main() {
X(()).with(); //~ ERROR requires unsafe function or block
2012-12-07 00:13:40 +00:00
}