only_local: always check for misuse
This commit is contained in:
parent
fc128b6764
commit
6c8265dc56
36 changed files with 343 additions and 382 deletions
|
@ -568,11 +568,8 @@ impl<T> Trait<T> for X {
|
|||
}
|
||||
}
|
||||
TargetFeatureCast(def_id) => {
|
||||
let attrs = self.get_attrs(*def_id);
|
||||
let target_spans = attrs
|
||||
.iter()
|
||||
.filter(|attr| attr.has_name(sym::target_feature))
|
||||
.map(|attr| attr.span);
|
||||
let target_spans =
|
||||
self.get_attrs(*def_id, sym::target_feature).map(|attr| attr.span);
|
||||
diag.note(
|
||||
"functions with `#[target_feature]` can only be coerced to `unsafe` function pointers"
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue