diff --git a/src/librustc/ty/context.rs b/src/librustc/ty/context.rs index 2ef65a26b4ba1..6e8a7ca35a842 100644 --- a/src/librustc/ty/context.rs +++ b/src/librustc/ty/context.rs @@ -226,8 +226,7 @@ pub struct LocalTableInContext<'a, V: 'a> { fn validate_hir_id_for_typeck_tables(local_id_root: Option, hir_id: hir::HirId, mut_access: bool) { - #[cfg(debug_assertions)] - { + if cfg!(debug_assertions) { if let Some(local_id_root) = local_id_root { if hir_id.owner != local_id_root.index { ty::tls::with(|tcx| {