mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-28 01:34:21 +00:00
28 lines
477 B
Rust
28 lines
477 B
Rust
// only-x86_64
|
|
|
|
#![feature(target_feature_11)]
|
|
|
|
trait Foo {
|
|
fn foo(&self);
|
|
unsafe fn unsf_foo(&self);
|
|
}
|
|
|
|
struct Bar;
|
|
|
|
impl Foo for Bar {
|
|
#[target_feature(enable = "sse2")]
|
|
//~^ ERROR cannot be applied to safe trait method
|
|
fn foo(&self) {}
|
|
|
|
#[target_feature(enable = "sse2")]
|
|
unsafe fn unsf_foo(&self) {}
|
|
}
|
|
|
|
trait Qux {
|
|
#[target_feature(enable = "sse2")]
|
|
//~^ ERROR cannot be applied to safe trait method
|
|
fn foo(&self) {}
|
|
}
|
|
|
|
fn main() {}
|