rust/src/test/ui/attributes/multiple-invalid.rs
David Wood e79036d17f
hir: Disallow target_feature on constants
This commit fixes an ICE when `target_feature` is applied to constants.

Signed-off-by: David Wood <david@davidtw.co>
2019-09-26 16:55:52 +01:00

10 lines
312 B
Rust

// This test checks that all expected errors occur when there are multiple invalid attributes
// on an item.
#[inline]
//~^ ERROR attribute should be applied to function or closure [E0518]
#[target_feature(enable = "sse2")]
//~^ ERROR attribute should be applied to a function
const FOO: u8 = 0;
fn main() { }