Allow internal untranslatable diagnostic

This commit is contained in:
clubby789
2023-09-15 01:07:28 +00:00
parent 6e2adbf6a3
commit 9edeb19f96
+3
View File
@@ -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);