mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 02:33:55 +00:00
23 lines
377 B
Rust
23 lines
377 B
Rust
// test for #115714
|
|
|
|
struct Misplaced;
|
|
|
|
impl Misplaced {
|
|
unsafe const fn from_u32(val: u32) {}
|
|
//~^ ERROR expected one of `extern` or `fn`
|
|
fn oof(self){}
|
|
}
|
|
|
|
struct Duplicated;
|
|
|
|
impl Duplicated {
|
|
unsafe unsafe fn from_u32(val: u32) {}
|
|
//~^ ERROR expected one of `extern` or `fn`
|
|
fn oof(self){}
|
|
}
|
|
|
|
fn main() {
|
|
Misplaced.oof();
|
|
Duplicated.oof();
|
|
}
|