Skip to content

Commit 1c025bb

Browse files
committed
Auto merge of #64262 - Xanewok:always-validate-hir-id-for-typeck-tables, r=<try>
[DONT MERGE] Always validate HIR ID for TypeckTables ...and not only with `debug_assertions` compiled in - #64250 (comment). cc @Mark-Simulacrum @michaelwoerister Let's do a try run to see if this impacts perf anyhow? r? @ghost
2 parents ef54f57 + f6ae4a4 commit 1c025bb

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/librustc/ty/context.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ pub struct LocalTableInContext<'a, V> {
207207
fn validate_hir_id_for_typeck_tables(local_id_root: Option<DefId>,
208208
hir_id: hir::HirId,
209209
mut_access: bool) {
210-
if cfg!(debug_assertions) {
210+
// if cfg!(debug_assertions) {
211211
if let Some(local_id_root) = local_id_root {
212212
if hir_id.owner != local_id_root.index {
213213
ty::tls::with(|tcx| {
@@ -228,7 +228,7 @@ fn validate_hir_id_for_typeck_tables(local_id_root: Option<DefId>,
228228
bug!("access to invalid TypeckTables")
229229
}
230230
}
231-
}
231+
// }
232232
}
233233

234234
impl<'a, V> LocalTableInContext<'a, V> {

src/tools/clippy

0 commit comments

Comments
 (0)