Skip to content

Commit f6ae4a4

Browse files
committedSep 7, 2019
Always validate HIR ID for TypeckTables
...and not only with `debug_assertions` compiled in
1 parent ef54f57 commit f6ae4a4

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)