get_attr should check that no duplicates are allowed
This commit is contained in:
parent
676afc5149
commit
00b10a5552
7 changed files with 38 additions and 5 deletions
|
@ -386,7 +386,8 @@ pub fn from_fn_attrs<'ll, 'tcx>(
|
|||
) {
|
||||
let span = cx
|
||||
.tcx
|
||||
.get_attr(instance.def_id(), sym::target_feature)
|
||||
.get_attrs(instance.def_id(), sym::target_feature)
|
||||
.next()
|
||||
.map_or_else(|| cx.tcx.def_span(instance.def_id()), |a| a.span);
|
||||
let msg = format!(
|
||||
"the target features {} must all be either enabled or disabled together",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue