Skip to content

Commit 684082b

Browse files
committed
auto merge of #19254 : nick29581/rust/dxr-glob, r=pcwalton
There is also some work here to make resolve a bit more stable - it no longer overwrites a specific import with a glob import. r?
2 parents c0b2885 + d874894 commit 684082b

File tree

24 files changed

+270
-79
lines changed

24 files changed

+270
-79
lines changed

Diff for: src/libgraphviz/maybe_owned_vec.rs

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ pub use self::MaybeOwnedVector::*;
1414

1515
use std::default::Default;
1616
use std::fmt;
17-
use std::iter::FromIterator;
1817
use std::path::BytesContainer;
1918
use std::slice;
2019

Diff for: src/librustc/metadata/csearch.rs

+7
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,13 @@ pub fn get_impl_or_trait_item<'tcx>(tcx: &ty::ctxt<'tcx>, def: ast::DefId)
148148
tcx)
149149
}
150150

151+
pub fn get_trait_name(cstore: &cstore::CStore, def: ast::DefId) -> ast::Name {
152+
let cdata = cstore.get_crate_data(def.krate);
153+
decoder::get_trait_name(cstore.intr.clone(),
154+
&*cdata,
155+
def.node)
156+
}
157+
151158
pub fn get_trait_item_name_and_kind(cstore: &cstore::CStore, def: ast::DefId)
152159
-> (ast::Name, resolve::TraitItemKind) {
153160
let cdata = cstore.get_crate_data(def.krate);

Diff for: src/librustc/metadata/decoder.rs

+8
Original file line numberDiff line numberDiff line change
@@ -784,6 +784,14 @@ pub fn get_impl_items(cdata: Cmd, impl_id: ast::NodeId)
784784
impl_items
785785
}
786786

787+
pub fn get_trait_name(intr: Rc<IdentInterner>,
788+
cdata: Cmd,
789+
id: ast::NodeId)
790+
-> ast::Name {
791+
let doc = lookup_item(id, cdata.data());
792+
item_name(&*intr, doc)
793+
}
794+
787795
pub fn get_trait_item_name_and_kind(intr: Rc<IdentInterner>,
788796
cdata: Cmd,
789797
id: ast::NodeId)

0 commit comments

Comments
 (0)