diff options
| author | bors <bors@rust-lang.org> | 2024-11-09 07:11:33 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-11-09 07:11:33 +0000 |
| commit | 62bb2ac03e775110d2c889f5d4a01a71e7334ff0 (patch) | |
| tree | 4ebb6a8a5150b100bb846c3c70c11e4872e80b8d /compiler/rustc_trait_selection/src | |
| parent | 012ae13d6ac41fb4df649d39979f39b08241a290 (diff) | |
| parent | c4922f12fd155d50f3e10389c6835ab872b50be2 (diff) | |
| download | rust-62bb2ac03e775110d2c889f5d4a01a71e7334ff0.tar.gz rust-62bb2ac03e775110d2c889f5d4a01a71e7334ff0.zip | |
Auto merge of #132798 - workingjubilee:rollup-qxvmmqo, r=workingjubilee
Rollup of 5 pull requests Successful merges: - #132755 (Do not reveal opaques in the param-env, we got lazy norm instead) - #132757 (Get rid of `check_opaque_type_well_formed`) - #132760 (Don't suggest `.into_iter()` on iterators) - #132778 (update io::Error::into_inner to acknowledge io::Error::other) - #132780 (use verbose for path separator suggestion) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_trait_selection/src')
| -rw-r--r-- | compiler/rustc_trait_selection/src/error_reporting/traits/suggestions.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/compiler/rustc_trait_selection/src/error_reporting/traits/suggestions.rs b/compiler/rustc_trait_selection/src/error_reporting/traits/suggestions.rs index 86fd4c230f6..a5e364d49f7 100644 --- a/compiler/rustc_trait_selection/src/error_reporting/traits/suggestions.rs +++ b/compiler/rustc_trait_selection/src/error_reporting/traits/suggestions.rs @@ -2953,6 +2953,22 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { // We hold the `DefId` of the item introducing the obligation, but displaying it // doesn't add user usable information. It always point at an associated item. } + ObligationCauseCode::OpaqueTypeBound(span, definition_def_id) => { + err.span_note(span, "required by a bound in an opaque type"); + if let Some(definition_def_id) = definition_def_id + // If there are any stalled coroutine obligations, then this + // error may be due to that, and not because the body has more + // where-clauses. + && self.tcx.typeck(definition_def_id).coroutine_stalled_predicates.is_empty() + { + // FIXME(compiler-errors): We could probably point to something + // specific here if we tried hard enough... + err.span_note( + tcx.def_span(definition_def_id), + "this definition site has more where clauses than the opaque type", + ); + } + } ObligationCauseCode::Coercion { source, target } => { let source = tcx.short_ty_string(self.resolve_vars_if_possible(source), long_ty_file); |
