summaryrefslogtreecommitdiffstats
path: root/tests/ui/rfcs/rfc-2396-target_feature-11/trait-impl.rs
blob: 9108f27b5f7f8297d687f2dfc056d12e25b89ca0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// 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() {}