about summary refs log tree commit diff
path: root/src/librustc
diff options
context:
space:
mode:
authorMatthew Jasper <mjjasper1@gmail.com>2020-01-05 15:01:00 +0000
committerMatthew Jasper <mjjasper1@gmail.com>2020-01-06 20:43:10 +0000
commit9462c8babb8743a12ffa467dfc10f7b03a2f77c8 (patch)
treed21f54b512001a0ad5a75e590988e0f8e625bdc0 /src/librustc
parentebbb2bf37aedaaa64dfaa52ba337ca6efb6b9093 (diff)
downloadrust-9462c8babb8743a12ffa467dfc10f7b03a2f77c8.tar.gz
rust-9462c8babb8743a12ffa467dfc10f7b03a2f77c8.zip
Improve hygiene of `newtype_index`
Also add unit tests
Diffstat (limited to 'src/librustc')
-rw-r--r--src/librustc/dep_graph/serialized.rs2
-rw-r--r--src/librustc/middle/region.rs1
2 files changed, 1 insertions, 2 deletions
diff --git a/src/librustc/dep_graph/serialized.rs b/src/librustc/dep_graph/serialized.rs
index 640877d3d55..45ef52dbf39 100644
--- a/src/librustc/dep_graph/serialized.rs
+++ b/src/librustc/dep_graph/serialized.rs
@@ -2,7 +2,7 @@
 
 use crate::dep_graph::DepNode;
 use crate::ich::Fingerprint;
-use rustc_index::vec::{Idx, IndexVec};
+use rustc_index::vec::IndexVec;
 
 rustc_index::newtype_index! {
     pub struct SerializedDepNodeIndex { .. }
diff --git a/src/librustc/middle/region.rs b/src/librustc/middle/region.rs
index b2a5efca92d..9e9c8bd8464 100644
--- a/src/librustc/middle/region.rs
+++ b/src/librustc/middle/region.rs
@@ -14,7 +14,6 @@ use rustc_hir::Node;
 
 use rustc_data_structures::fx::FxHashMap;
 use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
-use rustc_index::vec::Idx;
 use rustc_macros::HashStable;
 use rustc_span::{Span, DUMMY_SP};