Skip to content

Commit 52c4478

Browse files
committed
trait_sel: stash {Meta,Pointee}Sized errors
`Sized` errors are currently stashed to improve diagnostics and this must happen with `{Meta,Pointee}Sized` too to maintain diagnostic output.
1 parent ff13dd5 commit 52c4478

File tree

1 file changed

+4
-1
lines changed
  • compiler/rustc_trait_selection/src/error_reporting/traits

1 file changed

+4
-1
lines changed

compiler/rustc_trait_selection/src/error_reporting/traits/ambiguity.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,10 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
201201
// avoid inundating the user with unnecessary errors, but we now
202202
// check upstream for type errors and don't add the obligations to
203203
// begin with in those cases.
204-
if self.tcx.is_lang_item(trait_pred.def_id(), LangItem::Sized) {
204+
if self.tcx.is_lang_item(trait_pred.def_id(), LangItem::Sized)
205+
|| self.tcx.is_lang_item(trait_pred.def_id(), LangItem::MetaSized)
206+
|| self.tcx.is_lang_item(trait_pred.def_id(), LangItem::PointeeSized)
207+
{
205208
match self.tainted_by_errors() {
206209
None => {
207210
let err = self.emit_inference_failure_err(

0 commit comments

Comments
 (0)