2020-05-01 15:32:28 +02:00
|
|
|
// only-x86_64
|
|
|
|
|
2023-03-02 13:41:17 +01:00
|
|
|
#![feature(target_feature_11)]
|
|
|
|
|
2020-05-01 15:32:28 +02:00
|
|
|
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) {}
|
|
|
|
}
|
|
|
|
|
2023-03-10 13:50:51 +01:00
|
|
|
trait Qux {
|
|
|
|
#[target_feature(enable = "sse2")]
|
|
|
|
//~^ ERROR cannot be applied to safe trait method
|
|
|
|
fn foo(&self) {}
|
|
|
|
}
|
|
|
|
|
2020-05-01 15:32:28 +02:00
|
|
|
fn main() {}
|