missing value to delay_span_bug
This commit is contained in:
parent
6b139c5b3e
commit
93a17c8aea
1 changed files with 6 additions and 2 deletions
|
@ -171,9 +171,13 @@ fn resolve_associated_item<'tcx>(
|
|||
return Ok(None);
|
||||
}
|
||||
|
||||
// If the item does not have a value, then we cannot return an instance.
|
||||
// Any final impl is required to define all associated items.
|
||||
if !leaf_def.item.defaultness(tcx).has_value() {
|
||||
return Ok(None);
|
||||
let guard = tcx.sess.delay_span_bug(
|
||||
tcx.def_span(leaf_def.item.def_id),
|
||||
"missing value for assoc item in impl",
|
||||
);
|
||||
return Err(guard);
|
||||
}
|
||||
|
||||
let substs = tcx.erase_regions(substs);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue