diff options
| author | Léo Lanteri Thauvin <leseulartichaut@gmail.com> | 2023-03-10 13:50:51 +0100 |
|---|---|---|
| committer | Léo Lanteri Thauvin <leseulartichaut@gmail.com> | 2023-03-10 13:50:51 +0100 |
| commit | ad2bcb5c0e7603092011b6a5ca6328ae6c3fa2c0 (patch) | |
| tree | 3b31fafff11f0d611d1fa16126e2182712c8b4c5 /tests/ui/rfcs/rfc-2396-target_feature-11/trait-impl.rs | |
| parent | 104f4300cfddbd956e32820ef202a732f06ec848 (diff) | |
| download | rust-ad2bcb5c0e7603092011b6a5ca6328ae6c3fa2c0.tar.gz rust-ad2bcb5c0e7603092011b6a5ca6328ae6c3fa2c0.zip | |
Forbid `#[target_feature]` on safe default implementations
Diffstat (limited to 'tests/ui/rfcs/rfc-2396-target_feature-11/trait-impl.rs')
| -rw-r--r-- | tests/ui/rfcs/rfc-2396-target_feature-11/trait-impl.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/ui/rfcs/rfc-2396-target_feature-11/trait-impl.rs b/tests/ui/rfcs/rfc-2396-target_feature-11/trait-impl.rs index 7314fa8cced..9108f27b5f7 100644 --- a/tests/ui/rfcs/rfc-2396-target_feature-11/trait-impl.rs +++ b/tests/ui/rfcs/rfc-2396-target_feature-11/trait-impl.rs @@ -18,4 +18,10 @@ impl Foo for Bar { unsafe fn unsf_foo(&self) {} } +trait Qux { + #[target_feature(enable = "sse2")] + //~^ ERROR cannot be applied to safe trait method + fn foo(&self) {} +} + fn main() {} |
