Remove unneeded ImportItem on glob ones
This commit is contained in:
parent
6bea76f175
commit
e3b1be3b62
@ -2260,17 +2260,7 @@ impl Clean<Vec<Item>> for doctree::Import<'_> {
|
||||
let inner = if self.glob {
|
||||
if !denied {
|
||||
let mut visited = FxHashSet::default();
|
||||
if let Some(mut items) = inline::try_inline_glob(cx, path.res, &mut visited) {
|
||||
items.push(Item {
|
||||
name: None,
|
||||
attrs: self.attrs.clean(cx),
|
||||
source: self.span.clean(cx),
|
||||
def_id: cx.tcx.hir().local_def_id(self.id).to_def_id(),
|
||||
visibility: self.vis.clean(cx),
|
||||
stability: None,
|
||||
deprecation: None,
|
||||
inner: ImportItem(Import::new_glob(resolve_use_source(cx, path), false)),
|
||||
});
|
||||
if let Some(items) = inline::try_inline_glob(cx, path.res, &mut visited) {
|
||||
return items;
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,5 @@
|
||||
#![deny(broken_intra_doc_links)]
|
||||
|
||||
/// [somewhere]
|
||||
//~^ ERROR unresolved link to `somewhere`
|
||||
pub use std::str::*;
|
||||
/// [aloha]
|
||||
//~^ ERROR unresolved link to `aloha`
|
||||
pub use std::task::RawWakerVTable;
|
||||
|
@ -1,4 +1,4 @@
|
||||
error: unresolved link to `somewhere`
|
||||
error: unresolved link to `aloha`
|
||||
--> $DIR/pub-export-lint.rs:3:6
|
||||
|
|
||||
LL | /// [aloha]
|
||||
@ -11,13 +11,5 @@ LL | #![deny(broken_intra_doc_links)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
|
||||
|
||||
error: unresolved link to `aloha`
|
||||
--> $DIR/pub-export-lint.rs:6:6
|
||||
|
|
||||
LL | /// [aloha]
|
||||
| ^^^^^ the module `pub_export_lint` contains no item named `aloha`
|
||||
|
|
||||
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -7,5 +7,3 @@ pub use std::i32;
|
||||
// @!has 'foo/index.html' '//code' 'pub use self::string::String;'
|
||||
// @has 'foo/index.html' '//tr[@class="module-item"]' 'String'
|
||||
pub use std::string::String;
|
||||
// @!has 'foo/index.html' '//code' 'pub use self::string::*;'
|
||||
pub use std::string::*;
|
||||
|
Loading…
Reference in New Issue
Block a user