about summary refs log tree commit diff
path: root/src/librustdoc
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-07-03 10:57:39 +0000
committerbors <bors@rust-lang.org>2019-07-03 10:57:39 +0000
commit8c6fb028ca887dff9ec2fe0a90398b6d5bf5fb45 (patch)
tree71228e2259622360b017d90b88686ba181e21856 /src/librustdoc
parent8301de16dafc81a3b5d94aa0707ad83bdb56a599 (diff)
parentc6374cfbe2de22e46b4e7687fa733549114bf070 (diff)
downloadrust-8c6fb028ca887dff9ec2fe0a90398b6d5bf5fb45.tar.gz
rust-8c6fb028ca887dff9ec2fe0a90398b6d5bf5fb45.zip
Auto merge of #61995 - eddyb:hir-sep-ptr, r=petrochenkov
rustc: use a separate copy of P for HIR than for AST.

Note: this currently includes/is based on top of #61987.

Like #61968, but goes one step further and uses a separate `P<...>` for the HIR, with no `Clone`, or the ability to mutate after allocation.
There is still `into_inner`/`into_iter`, but they're only exposed for `hir::lowering`, and they would take more work to untangle.

r? @petrochenkov cc @rust-lang/compiler
Diffstat (limited to 'src/librustdoc')
-rw-r--r--src/librustdoc/clean/mod.rs2
-rw-r--r--src/librustdoc/doctree.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs
index 3fe048a6986..7353c3ec2e5 100644
--- a/src/librustdoc/clean/mod.rs
+++ b/src/librustdoc/clean/mod.rs
@@ -20,6 +20,7 @@ use rustc::mir::interpret::{GlobalId, ConstValue};
 use rustc::hir;
 use rustc::hir::def::{CtorKind, DefKind, Res};
 use rustc::hir::def_id::{CrateNum, DefId, CRATE_DEF_INDEX, LOCAL_CRATE};
+use rustc::hir::ptr::P;
 use rustc::ty::subst::{InternalSubsts, SubstsRef, UnpackedKind};
 use rustc::ty::{self, DefIdTree, TyCtxt, Region, RegionVid, Ty, AdtKind};
 use rustc::ty::fold::TypeFolder;
@@ -29,7 +30,6 @@ use syntax::ast::{self, AttrStyle, Ident};
 use syntax::attr;
 use syntax::ext::base::MacroKind;
 use syntax::source_map::{dummy_spanned, Spanned};
-use syntax::ptr::P;
 use syntax::symbol::{Symbol, kw, sym};
 use syntax::symbol::InternedString;
 use syntax_pos::{self, Pos, FileName};
diff --git a/src/librustdoc/doctree.rs b/src/librustdoc/doctree.rs
index 2557b8d1627..45a3c8a3c22 100644
--- a/src/librustdoc/doctree.rs
+++ b/src/librustdoc/doctree.rs
@@ -6,11 +6,11 @@ use syntax::ast;
 use syntax::ast::{Name, NodeId};
 use syntax::attr;
 use syntax::ext::base::MacroKind;
-use syntax::ptr::P;
 use syntax_pos::{self, Span};
 
 use rustc::hir;
 use rustc::hir::def_id::CrateNum;
+use rustc::hir::ptr::P;
 
 pub struct Module<'hir> {
     pub name: Option<Name>,