Auto merge of #122454 - matthiaskrgr:rollup-xbmufdc, r=matthiaskrgr
Rollup of 11 pull requests Successful merges: - #122422 (compiletest: Allow `only-unix` in test headers) - #122424 (fix: typos) - #122425 (Increase timeout for new bors bot) - #122426 (Fix StableMIR `WrappingRange::is_full` computation) - #122429 (Add Exploit Mitigations PG to triagebot.toml) - #122430 (Generate link to `Local` in `hir::Let` documentation) - #122434 (pattern analysis: rename a few types) - #122437 (pattern analysis: remove `MaybeInfiniteInt::JustAfterMax`) - #122438 (Safe Transmute: Require that source referent is smaller than destination) - #122442 (extend docs of -Zprint-mono-items) - #122449 (Delay a bug for stranded opaques) r? `@ghost` `@rustbot` modify labels: rollup
This commit is contained in:
commit
6f3eb1ce3d
31 changed files with 374 additions and 174 deletions
|
@ -381,11 +381,17 @@ fn check_opaque_meets_bounds<'tcx>(
|
|||
match ocx.eq(&misc_cause, param_env, opaque_ty, hidden_ty) {
|
||||
Ok(()) => {}
|
||||
Err(ty_err) => {
|
||||
// Some types may be left "stranded" if they can't be reached
|
||||
// from an astconv'd bound but they're mentioned in the HIR. This
|
||||
// will happen, e.g., when a nested opaque is inside of a non-
|
||||
// existent associated type, like `impl Trait<Missing = impl Trait>`.
|
||||
// See <tests/ui/impl-trait/stranded-opaque.rs>.
|
||||
let ty_err = ty_err.to_string(tcx);
|
||||
tcx.dcx().span_bug(
|
||||
let guar = tcx.dcx().span_delayed_bug(
|
||||
span,
|
||||
format!("could not unify `{hidden_ty}` with revealed type:\n{ty_err}"),
|
||||
);
|
||||
return Err(guar);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue