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

fn main() {}