From 9edeb19f9609ba82e4a0401e70dd704abddea4bc Mon Sep 17 00:00:00 2001 From: clubby789 Date: Fri, 15 Sep 2023 01:07:28 +0000 Subject: [PATCH] Allow internal untranslatable diagnostic --- compiler/rustc_hir_typeck/src/callee.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/compiler/rustc_hir_typeck/src/callee.rs b/compiler/rustc_hir_typeck/src/callee.rs index c5b2aaf2361e..8c47eed05e9c 100644 --- a/compiler/rustc_hir_typeck/src/callee.rs +++ b/compiler/rustc_hir_typeck/src/callee.rs @@ -380,6 +380,9 @@ fn confirm_builtin_call( // Unit testing: function items annotated with // `#[rustc_evaluate_where_clauses]` trigger special output // to let us test the trait evaluation system. + // Untranslatable diagnostics are okay for rustc internals + #[allow(rustc::untranslatable_diagnostic)] + #[allow(rustc::diagnostic_outside_of_impl)] if self.tcx.has_attr(def_id, sym::rustc_evaluate_where_clauses) { let predicates = self.tcx.predicates_of(def_id); let predicates = predicates.instantiate(self.tcx, args);