Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
a113609
keyword docs for else and inkeyword docs for else and in.
gilescope Dec 30, 2019
57f1bb1
clean up E0308 explanation
GuillaumeGomez Feb 13, 2020
64460a1
Update tests
GuillaumeGomez Mar 8, 2020
f5efb68
miri: categorize errors into "unsupported" and "UB"
RalfJung Mar 8, 2020
d02543a
fmt, tweak messages and bless
RalfJung Mar 8, 2020
9a95b01
generalize InvalidNullPointerUsage to InvalidIntPointerUsage
RalfJung Mar 8, 2020
3ebcd78
fmt, and fix rustfmt-induced rebase hickup
RalfJung Mar 8, 2020
2764d3d
start Miri messages lower-case
RalfJung Mar 9, 2020
3e61442
explain why we catch PointerUseAfterFree
RalfJung Mar 9, 2020
d8f8168
avoid boolean inversion
RalfJung Mar 9, 2020
9681422
we are on 2018 edition, use try block
RalfJung Mar 9, 2020
93436d8
make error message less confusing
RalfJung Mar 9, 2020
e219dd4
fmt
RalfJung Mar 11, 2020
b2779d8
Use smaller discriminants for generators
jonas-schievink Mar 9, 2020
4266807
Add a test for generator discriminants
jonas-schievink Mar 9, 2020
49aabd8
Fix rebase fallout
jonas-schievink Mar 14, 2020
73a625b
remove unnecessary hir::map imports
Centril Mar 11, 2020
4392a8b
use direct imports for `rustc::{lint, session}`.
Centril Mar 11, 2020
5a9ccc9
Remove `free_region_map` from `TypeckTables`
matthewjasper Nov 30, 2019
cefd030
Don't use `TypeckTables` in NiceRegionError
matthewjasper Feb 15, 2020
0a7f16e
Erase regions in writeback
matthewjasper Feb 15, 2020
1ee5829
Update tests for erasing regions in typeck
matthewjasper Feb 15, 2020
aa20d96
Don't prepend with space before paren
GuillaumeGomez Mar 17, 2020
429b16e
Make `newtype_index` methods const
ecstatic-morse Mar 10, 2020
7f5a284
Rename `from_u32_const` -> `from_u32`
ecstatic-morse Mar 10, 2020
cc4a577
Add requisite feature gates for const assert
ecstatic-morse Mar 10, 2020
9ac93ee
Hold index of generator `self` arg in `const`
ecstatic-morse Mar 10, 2020
81172d8
Update pretty tests
GuillaumeGomez Mar 17, 2020
9a017da
Update rustdoc test and remove TODO comment
GuillaumeGomez Mar 17, 2020
bc75cba
submod_path_from_attr: simplify & document
Centril Mar 7, 2020
2899a58
extract error_cannot_declare_mod_here
Centril Mar 7, 2020
185c1d3
extract error_decl_mod_in_block
Centril Mar 7, 2020
2db5d49
simplify submod_path
Centril Mar 7, 2020
803de31
submod_path: use id.span
Centril Mar 7, 2020
7108b7f
extract parse_mod
Centril Mar 7, 2020
dfcefa4
extract error_on_circular_module
Centril Mar 7, 2020
ca098b1
detach submod_path from Parser
Centril Mar 8, 2020
53a633f
decouple push_directory from Parser
Centril Mar 8, 2020
98e71cd
decouple eval_src_mod from Parser
Centril Mar 8, 2020
b9e1b26
expand: use push_directory
Centril Mar 8, 2020
8bab88f
de-fatalize outline module parsing
Centril Mar 8, 2020
463995f
extract parse_external_module
Centril Mar 8, 2020
59bf8a0
extract error_on_circular_module
Centril Mar 8, 2020
83a757a
outline modules: parse -> expand.
Centril Mar 8, 2020
f1ca996
parse: module parsing -> item.rs
Centril Mar 8, 2020
ddcc8ec
move Directory -> parser::module
Centril Mar 8, 2020
3796fae
{rustc_parse::parser -> rustc_expand}::module
Centril Mar 8, 2020
31ee8e0
{rustc_parse -> rustc_expand}::config
Centril Mar 8, 2020
a6cb04f
add test for stripped nested outline module
Centril Mar 8, 2020
7d0e5bb
parser/expand: minor cleanup
Centril Mar 9, 2020
fe71342
tweak outline module parsing spans
Centril Mar 9, 2020
41a0b3e
use pretty-compare-only in a test
Centril Mar 10, 2020
5ee4f6f
fix pre-expansion linting infra
Centril Mar 15, 2020
e301291
fix rebase fallout
Centril Mar 15, 2020
8caf688
--bless windows test
Centril Mar 17, 2020
287c4eb
Tidy: fix running rustfmt twice
ehuss Mar 18, 2020
5610684
Rollup merge of #67749 - gilescope:keyword-in, r=Dylan-DPC
Centril Mar 18, 2020
8188b21
Rollup merge of #69139 - GuillaumeGomez:cleanup-e0308, r=Dylan-DPC
Centril Mar 18, 2020
3f583fc
Rollup merge of #69189 - matthewjasper:erase-the-world, r=nikomatsakis
Centril Mar 18, 2020
4118ff6
Rollup merge of #69837 - jonas-schievink:gen-discr-opt, r=tmandry
Centril Mar 18, 2020
23b79d8
Rollup merge of #69838 - Centril:expand-module, r=petrochenkov
Centril Mar 18, 2020
a958314
Rollup merge of #69839 - RalfJung:miri-error-cleanup, r=oli-obk
Centril Mar 18, 2020
2521849
Rollup merge of #69899 - ecstatic-morse:const-idx-methods, r=oli-obk
Centril Mar 18, 2020
292c538
Rollup merge of #69920 - Centril:hir-cleanup, r=Zoxc
Centril Mar 18, 2020
60a2d06
Rollup merge of #70075 - GuillaumeGomez:fix-repr-display, r=petrochenkov
Centril Mar 18, 2020
b6f61a1
Rollup merge of #70106 - ehuss:fix-tidy-fmt-twice, r=Mark-Simulacrum
Centril Mar 18, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove unnecessary hir::map imports
  • Loading branch information
Centril committed Mar 16, 2020
commit 73a625b5fb820964fff4ff85ac0a09b398dbe994
3 changes: 1 addition & 2 deletions src/librustc_ast_lowering/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
use rustc::arena::Arena;
use rustc::dep_graph::DepGraph;
use rustc::hir::map::definitions::{DefKey, DefPathData, Definitions};
use rustc::hir::map::Map;
use rustc::{bug, span_bug};
use rustc_ast::ast;
use rustc_ast::ast::*;
Expand Down Expand Up @@ -1460,7 +1459,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
}

impl<'r, 'a, 'v, 'hir> intravisit::Visitor<'v> for ImplTraitLifetimeCollector<'r, 'a, 'hir> {
type Map = Map<'v>;
type Map = intravisit::ErasedMap<'v>;

fn nested_visit_map(&mut self) -> intravisit::NestedVisitorMap<Self::Map> {
intravisit::NestedVisitorMap::None
Expand Down
19 changes: 19 additions & 0 deletions src/librustc_hir/intravisit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,25 @@ pub trait Map<'hir> {
fn impl_item(&self, id: ImplItemId) -> &'hir ImplItem<'hir>;
}

/// An erased version of `Map<'hir>`, using dynamic dispatch.
/// NOTE: This type is effectively only usable with `NestedVisitorMap::None`.
pub struct ErasedMap<'hir>(&'hir dyn Map<'hir>);

impl<'hir> Map<'hir> for ErasedMap<'hir> {
fn body(&self, id: BodyId) -> &'hir Body<'hir> {
self.0.body(id)
}
fn item(&self, id: HirId) -> &'hir Item<'hir> {
self.0.item(id)
}
fn trait_item(&self, id: TraitItemId) -> &'hir TraitItem<'hir> {
self.0.trait_item(id)
}
fn impl_item(&self, id: ImplItemId) -> &'hir ImplItem<'hir> {
self.0.impl_item(id)
}
}

/// Specifies what nested things a visitor wants to visit. The most
/// common choice is `OnlyBodies`, which will cause the visitor to
/// visit fn bodies for fns that it encounters, but skip over nested
Expand Down
3 changes: 1 addition & 2 deletions src/librustc_lint/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
//! `late_lint_methods!` invocation in `lib.rs`.

use crate::{EarlyContext, EarlyLintPass, LateContext, LateLintPass, LintContext};
use rustc::hir::map::Map;
use rustc::lint::LintDiagnosticBuilder;
use rustc::ty::{self, layout::VariantIdx, Ty, TyCtxt};
use rustc_ast::ast::{self, Expr};
Expand Down Expand Up @@ -1071,7 +1070,7 @@ impl TypeAliasBounds {
err: &'a mut DiagnosticBuilder<'db>,
}
impl<'a, 'db, 'v> Visitor<'v> for WalkAssocTypes<'a, 'db> {
type Map = Map<'v>;
type Map = intravisit::ErasedMap<'v>;

fn nested_visit_map(&mut self) -> intravisit::NestedVisitorMap<Self::Map> {
intravisit::NestedVisitorMap::None
Expand Down
3 changes: 1 addition & 2 deletions src/librustc_mir/transform/check_unsafety.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use rustc::hir::map::Map;
use rustc::lint::builtin::{SAFE_PACKED_BORROWS, UNUSED_UNSAFE};
use rustc::mir::visit::{MutatingUseContext, PlaceContext, Visitor};
use rustc::mir::*;
Expand Down Expand Up @@ -451,7 +450,7 @@ struct UnusedUnsafeVisitor<'a> {
}

impl<'a, 'tcx> intravisit::Visitor<'tcx> for UnusedUnsafeVisitor<'a> {
type Map = Map<'tcx>;
type Map = intravisit::ErasedMap<'tcx>;

fn nested_visit_map(&mut self) -> intravisit::NestedVisitorMap<Self::Map> {
intravisit::NestedVisitorMap::None
Expand Down
3 changes: 1 addition & 2 deletions src/librustc_mir/transform/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use crate::{shim, util};
use rustc::hir::map::Map;
use rustc::mir::{BodyAndCache, ConstQualifs, MirPhase, Promoted};
use rustc::ty::query::Providers;
use rustc::ty::steal::Steal;
Expand Down Expand Up @@ -86,7 +85,7 @@ fn mir_keys(tcx: TyCtxt<'_>, krate: CrateNum) -> &DefIdSet {
}
intravisit::walk_struct_def(self, v)
}
type Map = Map<'tcx>;
type Map = intravisit::ErasedMap<'tcx>;
fn nested_visit_map(&mut self) -> NestedVisitorMap<Self::Map> {
NestedVisitorMap::None
}
Expand Down
5 changes: 2 additions & 3 deletions src/librustc_mir_build/hair/pattern/check_match.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use super::_match::{expand_pattern, is_useful, MatchCheckCtxt, Matrix, PatStack}

use super::{PatCtxt, PatKind, PatternError};

use rustc::hir::map::Map;
use rustc::ty::{self, Ty, TyCtxt};
use rustc_ast::ast::Mutability;
use rustc_errors::{error_code, struct_span_err, Applicability, DiagnosticBuilder};
Expand Down Expand Up @@ -43,7 +42,7 @@ struct MatchVisitor<'a, 'tcx> {
}

impl<'tcx> Visitor<'tcx> for MatchVisitor<'_, 'tcx> {
type Map = Map<'tcx>;
type Map = intravisit::ErasedMap<'tcx>;

fn nested_visit_map(&mut self) -> NestedVisitorMap<Self::Map> {
NestedVisitorMap::None
Expand Down Expand Up @@ -753,7 +752,7 @@ fn check_legality_of_bindings_in_at_patterns(cx: &MatchVisitor<'_, '_>, pat: &Pa
}

impl<'v> Visitor<'v> for AtBindingPatternVisitor<'_, '_, '_> {
type Map = Map<'v>;
type Map = intravisit::ErasedMap<'v>;

fn nested_visit_map(&mut self) -> NestedVisitorMap<Self::Map> {
NestedVisitorMap::None
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_passes/dead.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ impl<'a, 'tcx> MarkSymbolVisitor<'a, 'tcx> {
}

impl<'a, 'tcx> Visitor<'tcx> for MarkSymbolVisitor<'a, 'tcx> {
type Map = Map<'tcx>;
type Map = intravisit::ErasedMap<'tcx>;

fn nested_visit_map(&mut self) -> intravisit::NestedVisitorMap<Self::Map> {
NestedVisitorMap::None
Expand Down
5 changes: 2 additions & 3 deletions src/librustc_passes/intrinsicck.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use rustc::hir::map::Map;
use rustc::ty::layout::{LayoutError, Pointer, SizeSkeleton, VariantIdx};
use rustc::ty::query::Providers;
use rustc::ty::{self, Ty, TyCtxt};
Expand Down Expand Up @@ -122,7 +121,7 @@ impl ExprVisitor<'tcx> {
}

impl Visitor<'tcx> for ItemVisitor<'tcx> {
type Map = Map<'tcx>;
type Map = intravisit::ErasedMap<'tcx>;

fn nested_visit_map(&mut self) -> NestedVisitorMap<Self::Map> {
NestedVisitorMap::None
Expand All @@ -139,7 +138,7 @@ impl Visitor<'tcx> for ItemVisitor<'tcx> {
}

impl Visitor<'tcx> for ExprVisitor<'tcx> {
type Map = Map<'tcx>;
type Map = intravisit::ErasedMap<'tcx>;

fn nested_visit_map(&mut self) -> NestedVisitorMap<Self::Map> {
NestedVisitorMap::None
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_passes/liveness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1359,7 +1359,7 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
// Checking for error conditions

impl<'a, 'tcx> Visitor<'tcx> for Liveness<'a, 'tcx> {
type Map = Map<'tcx>;
type Map = intravisit::ErasedMap<'tcx>;

fn nested_visit_map(&mut self) -> NestedVisitorMap<Self::Map> {
NestedVisitorMap::None
Expand Down
6 changes: 2 additions & 4 deletions src/librustc_passes/reachable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
// makes all other generics or inline functions that it references
// reachable as well.

use rustc::hir::map::Map;
use rustc::middle::codegen_fn_attrs::{CodegenFnAttrFlags, CodegenFnAttrs};
use rustc::middle::privacy;
use rustc::session::config;
Expand All @@ -17,8 +16,7 @@ use rustc_hir as hir;
use rustc_hir::def::{DefKind, Res};
use rustc_hir::def_id::LOCAL_CRATE;
use rustc_hir::def_id::{CrateNum, DefId};
use rustc_hir::intravisit;
use rustc_hir::intravisit::{NestedVisitorMap, Visitor};
use rustc_hir::intravisit::{self, NestedVisitorMap, Visitor};
use rustc_hir::itemlikevisit::ItemLikeVisitor;
use rustc_hir::{HirIdSet, Node};
use rustc_target::spec::abi::Abi;
Expand Down Expand Up @@ -83,7 +81,7 @@ struct ReachableContext<'a, 'tcx> {
}

impl<'a, 'tcx> Visitor<'tcx> for ReachableContext<'a, 'tcx> {
type Map = Map<'tcx>;
type Map = intravisit::ErasedMap<'tcx>;

fn nested_visit_map(&mut self) -> NestedVisitorMap<Self::Map> {
NestedVisitorMap::None
Expand Down
3 changes: 1 addition & 2 deletions src/librustc_passes/region.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
//!
//! [rustc dev guide]: https://rustc-dev-guide.rust-lang.org/borrow_check.html

use rustc::hir::map::Map;
use rustc::middle::region::*;
use rustc::ty::query::Providers;
use rustc::ty::TyCtxt;
Expand Down Expand Up @@ -696,7 +695,7 @@ impl<'tcx> RegionResolutionVisitor<'tcx> {
}

impl<'tcx> Visitor<'tcx> for RegionResolutionVisitor<'tcx> {
type Map = Map<'tcx>;
type Map = intravisit::ErasedMap<'tcx>;

fn nested_visit_map(&mut self) -> NestedVisitorMap<Self::Map> {
NestedVisitorMap::None
Expand Down
5 changes: 2 additions & 3 deletions src/librustc_passes/upvars.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//! Upvar (closure capture) collection from cross-body HIR uses of `Res::Local`s.

use rustc::hir::map::Map;
use rustc::ty::query::Providers;
use rustc::ty::TyCtxt;
use rustc_data_structures::fx::{FxHashSet, FxIndexMap};
Expand Down Expand Up @@ -44,7 +43,7 @@ struct LocalCollector {
}

impl Visitor<'tcx> for LocalCollector {
type Map = Map<'tcx>;
type Map = intravisit::ErasedMap<'tcx>;

fn nested_visit_map(&mut self) -> NestedVisitorMap<Self::Map> {
NestedVisitorMap::None
Expand Down Expand Up @@ -73,7 +72,7 @@ impl CaptureCollector<'_, '_> {
}

impl Visitor<'tcx> for CaptureCollector<'a, 'tcx> {
type Map = Map<'tcx>;
type Map = intravisit::ErasedMap<'tcx>;

fn nested_visit_map(&mut self) -> NestedVisitorMap<Self::Map> {
NestedVisitorMap::None
Expand Down
5 changes: 2 additions & 3 deletions src/librustc_passes/weak_lang_items.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use rustc::middle::lang_items;
use rustc::middle::lang_items::whitelisted;
use rustc::session::config;

use rustc::hir::map::Map;
use rustc::ty::TyCtxt;
use rustc_data_structures::fx::FxHashSet;
use rustc_errors::struct_span_err;
Expand Down Expand Up @@ -85,9 +84,9 @@ impl<'a, 'tcx> Context<'a, 'tcx> {
}

impl<'a, 'tcx, 'v> Visitor<'v> for Context<'a, 'tcx> {
type Map = Map<'v>;
type Map = intravisit::ErasedMap<'v>;

fn nested_visit_map(&mut self) -> NestedVisitorMap<Map<'v>> {
fn nested_visit_map(&mut self) -> NestedVisitorMap<Self::Map> {
NestedVisitorMap::None
}

Expand Down
2 changes: 1 addition & 1 deletion src/librustc_privacy/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1447,7 +1447,7 @@ impl<'a, 'tcx> ObsoleteVisiblePrivateTypesVisitor<'a, 'tcx> {
}

impl<'a, 'b, 'tcx, 'v> Visitor<'v> for ObsoleteCheckTypeForPrivatenessVisitor<'a, 'b, 'tcx> {
type Map = Map<'v>;
type Map = intravisit::ErasedMap<'v>;

fn nested_visit_map(&mut self) -> NestedVisitorMap<Self::Map> {
NestedVisitorMap::None
Expand Down
10 changes: 5 additions & 5 deletions src/librustc_resolve/late/lifetimes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1123,7 +1123,7 @@ fn extract_labels(ctxt: &mut LifetimeContext<'_, '_>, body: &hir::Body<'_>) {
gather.visit_body(body);

impl<'v, 'a, 'tcx> Visitor<'v> for GatherLabels<'a, 'tcx> {
type Map = Map<'v>;
type Map = intravisit::ErasedMap<'v>;

fn nested_visit_map(&mut self) -> NestedVisitorMap<Self::Map> {
NestedVisitorMap::None
Expand Down Expand Up @@ -2172,7 +2172,7 @@ impl<'a, 'tcx> LifetimeContext<'a, 'tcx> {
}

impl<'a> Visitor<'a> for SelfVisitor<'a> {
type Map = Map<'a>;
type Map = intravisit::ErasedMap<'a>;

fn nested_visit_map(&mut self) -> NestedVisitorMap<Self::Map> {
NestedVisitorMap::None
Expand Down Expand Up @@ -2263,7 +2263,7 @@ impl<'a, 'tcx> LifetimeContext<'a, 'tcx> {
}

impl<'v, 'a> Visitor<'v> for GatherLifetimes<'a> {
type Map = Map<'v>;
type Map = intravisit::ErasedMap<'v>;

fn nested_visit_map(&mut self) -> NestedVisitorMap<Self::Map> {
NestedVisitorMap::None
Expand Down Expand Up @@ -2852,7 +2852,7 @@ fn insert_late_bound_lifetimes(
}

impl<'v> Visitor<'v> for ConstrainedCollector {
type Map = Map<'v>;
type Map = intravisit::ErasedMap<'v>;

fn nested_visit_map(&mut self) -> NestedVisitorMap<Self::Map> {
NestedVisitorMap::None
Expand Down Expand Up @@ -2895,7 +2895,7 @@ fn insert_late_bound_lifetimes(
}

impl<'v> Visitor<'v> for AllCollector {
type Map = Map<'v>;
type Map = intravisit::ErasedMap<'v>;

fn nested_visit_map(&mut self) -> NestedVisitorMap<Self::Map> {
NestedVisitorMap::None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1567,7 +1567,7 @@ struct ReturnsVisitor<'v> {
}

impl<'v> Visitor<'v> for ReturnsVisitor<'v> {
type Map = rustc::hir::map::Map<'v>;
type Map = hir::intravisit::ErasedMap<'v>;

fn nested_visit_map(&mut self) -> hir::intravisit::NestedVisitorMap<Self::Map> {
hir::intravisit::NestedVisitorMap::None
Expand Down
3 changes: 1 addition & 2 deletions src/librustc_typeck/check/compare_method.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use rustc::hir::map::Map;
use rustc::ty::error::{ExpectedFound, TypeError};
use rustc::ty::subst::{InternalSubsts, Subst};
use rustc::ty::util::ExplicitSelf;
Expand Down Expand Up @@ -890,7 +889,7 @@ fn compare_synthetic_generics<'tcx>(
}
}
}
type Map = Map<'v>;
type Map = intravisit::ErasedMap<'v>;
fn nested_visit_map(
&mut self,
) -> intravisit::NestedVisitorMap<Self::Map>
Expand Down
3 changes: 1 addition & 2 deletions src/librustc_typeck/check/generator_interior.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
//! types computed here.

use super::FnCtxt;
use rustc::hir::map::Map;
use rustc::middle::region::{self, YieldData};
use rustc::ty::{self, Ty};
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
Expand Down Expand Up @@ -209,7 +208,7 @@ pub fn resolve_interior<'a, 'tcx>(
// librustc/middle/region.rs since `expr_count` is compared against the results
// there.
impl<'a, 'tcx> Visitor<'tcx> for InteriorVisitor<'a, 'tcx> {
type Map = Map<'tcx>;
type Map = intravisit::ErasedMap<'tcx>;

fn nested_visit_map(&mut self) -> NestedVisitorMap<Self::Map> {
NestedVisitorMap::None
Expand Down
3 changes: 1 addition & 2 deletions src/librustc_typeck/check/method/suggest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
use crate::check::FnCtxt;
use crate::middle::lang_items::FnOnceTraitLangItem;
use rustc::hir::map as hir_map;
use rustc::hir::map::Map;
use rustc::ty::print::with_crate_prefix;
use rustc::ty::{self, ToPolyTraitRef, ToPredicate, Ty, TyCtxt, TypeFoldable, WithConstness};
use rustc_ast::ast;
Expand Down Expand Up @@ -1347,7 +1346,7 @@ impl intravisit::Visitor<'tcx> for UsePlacementFinder<'tcx> {
}
}

type Map = Map<'tcx>;
type Map = intravisit::ErasedMap<'tcx>;

fn nested_visit_map(&mut self) -> intravisit::NestedVisitorMap<Self::Map> {
intravisit::NestedVisitorMap::None
Expand Down
3 changes: 1 addition & 2 deletions src/librustc_typeck/check/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ pub mod writeback;
use crate::astconv::{AstConv, GenericArgCountMismatch, PathSeg};
use crate::middle::lang_items;
use rustc::hir::map::blocks::FnLikeNode;
use rustc::hir::map::Map;
use rustc::middle::region;
use rustc::mir::interpret::ConstValue;
use rustc::session::parse::feature_err;
Expand Down Expand Up @@ -1177,7 +1176,7 @@ impl<'a, 'tcx> GatherLocalsVisitor<'a, 'tcx> {
}

impl<'a, 'tcx> Visitor<'tcx> for GatherLocalsVisitor<'a, 'tcx> {
type Map = Map<'tcx>;
type Map = intravisit::ErasedMap<'tcx>;

fn nested_visit_map(&mut self) -> NestedVisitorMap<Self::Map> {
NestedVisitorMap::None
Expand Down
3 changes: 1 addition & 2 deletions src/librustc_typeck/check/regionck.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ use crate::check::dropck;
use crate::check::FnCtxt;
use crate::mem_categorization as mc;
use crate::middle::region;
use rustc::hir::map::Map;
use rustc::ty::adjustment;
use rustc::ty::subst::{GenericArgKind, SubstsRef};
use rustc::ty::{self, Ty};
Expand Down Expand Up @@ -417,7 +416,7 @@ impl<'a, 'tcx> Visitor<'tcx> for RegionCtxt<'a, 'tcx> {
// hierarchy, and in particular the relationships between free
// regions, until regionck, as described in #3238.

type Map = Map<'tcx>;
type Map = intravisit::ErasedMap<'tcx>;

fn nested_visit_map(&mut self) -> NestedVisitorMap<Self::Map> {
NestedVisitorMap::None
Expand Down
Loading