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
|
@ -1459,7 +1459,7 @@ fn check_enum<'tcx>(tcx: TyCtxt<'tcx>, vs: &'tcx [hir::Variant<'tcx>], def_id: L
|
|||
def.destructor(tcx); // force the destructor to be evaluated
|
||||
|
||||
if vs.is_empty() {
|
||||
if let Some(attr) = tcx.get_attr(def_id.to_def_id(), sym::repr) {
|
||||
if let Some(attr) = tcx.get_attrs(def_id.to_def_id(), sym::repr).next() {
|
||||
struct_span_err!(
|
||||
tcx.sess,
|
||||
attr.span,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue