Auto merge of #121285 - nnethercote:delayed_bug-audit, r=lcnr
Delayed bug audit I went through all the calls to `delayed_bug` and `span_delayed_bug` and found a few places where they could be avoided. r? `@compiler-errors`
This commit is contained in:
commit
9afdb8d1d5
12 changed files with 97 additions and 93 deletions
|
@ -760,7 +760,7 @@ fn convert_enum_variant_types(tcx: TyCtxt<'_>, def_id: DefId) {
|
|||
let wrapped_discr = prev_discr.map_or(initial, |d| d.wrap_incr(tcx));
|
||||
prev_discr = Some(
|
||||
if let ty::VariantDiscr::Explicit(const_def_id) = variant.discr {
|
||||
def.eval_explicit_discr(tcx, const_def_id)
|
||||
def.eval_explicit_discr(tcx, const_def_id).ok()
|
||||
} else if let Some(discr) = repr_type.disr_incr(tcx, prev_discr) {
|
||||
Some(discr)
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue