Skip to content

Commit 3e442fc

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 5b8bc56 commit 3e442fc

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-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

+3
Original file line numberDiff line numberDiff line change
@@ -952,6 +952,9 @@ fn report_non_exhaustive_match<'p, 'tcx>(
952952
// Look at the first witness.
953953
collect_non_exhaustive_tys(cx, &witnesses[0], &mut non_exhaustive_tys);
954954

955+
// The items are only used to add notes to an err, so the order does not
956+
// affect query stability.
957+
#[allow(rustc::potential_query_instability)]
955958
for ty in non_exhaustive_tys {
956959
if ty.is_ptr_sized_integral() {
957960
if ty == cx.tcx.types.usize {

0 commit comments

Comments
 (0)