diff options
| author | bors <bors@rust-lang.org> | 2023-02-15 00:03:17 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-02-15 00:03:17 +0000 |
| commit | 003b6f24e6a01a7df79c276d6d41aff6b4845d76 (patch) | |
| tree | eb14d500643ba8e947e8ff2346b3d9eaef9b6cae /src | |
| parent | a6d8057f098ab3cebe5a203eb6ebdbd8ce336acc (diff) | |
| parent | 993482a05d466bf7cfaaac87d1418f5f7b510654 (diff) | |
Auto merge of #108037 - Mark-Simulacrum:beta-next, r=Mark-Simulacrum
[beta] backport * Do not eagerly recover for bad impl Trait types in macros #107813 * Fix infinite loop in rustdoc get_all_import_attributes function #107357 * Bring tests back into rustc source tarball #107239 r? `@Mark-Simulacrum`
Diffstat (limited to 'src')
| -rw-r--r-- | src/bootstrap/dist.rs | 2 | ||||
| -rw-r--r-- | src/librustdoc/clean/mod.rs | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs index 2e4f753965d..6594b23c56b 100644 --- a/src/bootstrap/dist.rs +++ b/src/bootstrap/dist.rs @@ -952,7 +952,7 @@ impl Step for PlainSourceTarball { "Cargo.toml", "Cargo.lock", ]; - let src_dirs = ["src", "compiler", "library"]; + let src_dirs = ["src", "compiler", "library", "tests"]; copy_src_dirs(builder, &builder.src, &src_dirs, &[], &plain_dst_src); diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index 20984696b6c..0f0e16265b4 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -2111,10 +2111,12 @@ fn get_all_import_attributes<'hir>( ) { let hir_map = tcx.hir(); let mut visitor = OneLevelVisitor::new(hir_map, target_hir_id); + let mut visited = FxHashSet::default(); // If the item is an import and has at least a path with two parts, we go into it. while let hir::ItemKind::Use(path, _) = item.kind && path.segments.len() > 1 && - let hir::def::Res::Def(_, def_id) = path.segments[path.segments.len() - 2].res + let hir::def::Res::Def(_, def_id) = path.segments[path.segments.len() - 2].res && + visited.insert(def_id) { if let Some(hir::Node::Item(parent_item)) = hir_map.get_if_local(def_id) { // We add the attributes from this import into the list. |
