Improve hygiene of newtype_index

Also add unit tests
This commit is contained in:
Matthew Jasper 2020-01-05 15:01:00 +00:00
parent ebbb2bf37a
commit 9462c8babb
13 changed files with 80 additions and 52 deletions

View file

@ -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 { .. }

View file

@ -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};