Skip to content

Commit 9c6d5d1

Browse files
committed
rustc_mir_build: Enforce rustc::potential_query_instability lint
Stop allowing `rustc::potential_query_instability` on all of `rustc_mir_build` and instead allow it on a case-by-case basis if it is safe to do so. In this crate there was only one instance of the lint, and it was safe to allow.
1 parent 416dad5 commit 9c6d5d1

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

compiler/rustc_mir_build/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//! Construction of MIR from HIR.
22
//!
33
//! This crate also contains the match exhaustiveness and usefulness checking.
4-
#![allow(rustc::potential_query_instability)]
54
#![feature(assert_matches)]
65
#![feature(associated_type_bounds)]
76
#![feature(box_patterns)]

compiler/rustc_mir_build/src/thir/pattern/check_match.rs

+2
Original file line numberDiff line numberDiff line change
@@ -955,6 +955,8 @@ fn report_non_exhaustive_match<'p, 'tcx>(
955955
// Make order of diagnostics deterministic.
956956
non_exhaustive_tys.sort();
957957

958+
// We just sorted.
959+
#[allow(rustc::potential_query_instability)]
958960
for ty in non_exhaustive_tys {
959961
if ty.is_ptr_sized_integral() {
960962
if ty == cx.tcx.types.usize {

0 commit comments

Comments
 (0)