rustc: Fix ICE with #[target_feature]
on module
This commit fixes an ICE in rustc when `#[target_feature]` was applied to items other than functions due to the way the feature was validated.
This commit is contained in:
parent
5430c0c5c0
commit
4bde92c176
4 changed files with 22 additions and 2 deletions
|
@ -29,6 +29,10 @@ unsafe fn foo() {}
|
|||
//~^ ERROR: can only be applied to `unsafe` function
|
||||
fn bar() {}
|
||||
|
||||
#[target_feature(enable = "sse2")]
|
||||
//~^ ERROR: should be applied to a function
|
||||
mod another {}
|
||||
|
||||
fn main() {
|
||||
unsafe {
|
||||
foo();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue