about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Woerister <michaelwoerister@posteo>2017-08-14 14:56:35 +0200
committerMichael Woerister <michaelwoerister@posteo>2017-08-14 14:56:35 +0200
commit3b92b97bfb98456cf2c1c0b87237a6eac8857e42 (patch)
tree5c47513af125c5bc18c2759382aae476a0e2feba
parent6fd7d8586c606e3ca03511bd915946a8e75c2db7 (diff)
downloadrust-3b92b97bfb98456cf2c1c0b87237a6eac8857e42.tar.gz
rust-3b92b97bfb98456cf2c1c0b87237a6eac8857e42.zip
Fix unused variable warnings in builds disabled debug-assertions.
-rw-r--r--src/librustc/ty/context.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/librustc/ty/context.rs b/src/librustc/ty/context.rs
index 2ef65a26b4b..6e8a7ca35a8 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<DefId>,
                                      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| {