Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b5c46dc

Browse files
committedFeb 10, 2024
Auto merge of rust-lang#120862 - matthiaskrgr:rollup-jzfab58, r=matthiaskrgr
Rollup of 6 pull requests Successful merges: - rust-lang#120584 (For a rigid projection, recursively look at the self type's item bounds to fix the `associated_type_bounds` feature) - rust-lang#120596 ([rustdoc] Correctly generate path for non-local items in source code pages) - rust-lang#120629 (Move some test files) - rust-lang#120846 (Update jobserver-rs to 0.1.28) - rust-lang#120850 (ast_lowering: Fix regression in `use ::{}` imports.) - rust-lang#120853 (Avoid a collection and iteration on empty passes) r? `@ghost` `@rustbot` modify labels: rollup
2 parents d44e3b9 + 8e1eadd commit b5c46dc

File tree

68 files changed

+565
-524
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+565
-524
lines changed
 

‎Cargo.lock

+2-2
Original file line numberDiff line numberDiff line change
@@ -2090,9 +2090,9 @@ dependencies = [
20902090

20912091
[[package]]
20922092
name = "jobserver"
2093-
version = "0.1.27"
2093+
version = "0.1.28"
20942094
source = "registry+https://github.com/rust-lang/crates.io-index"
2095-
checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d"
2095+
checksum = "ab46a6e9526ddef3ae7f787c06f0f2600639ba80ea3eade3d8e670a2230f51d6"
20962096
dependencies = [
20972097
"libc",
20982098
]

‎compiler/rustc_ast_lowering/src/item.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,12 @@ impl<'hir> LoweringContext<'_, 'hir> {
569569
});
570570
}
571571

572-
let path = if trees.is_empty() && !prefix.segments.is_empty() {
572+
// Condition should match `build_reduced_graph_for_use_tree`.
573+
let path = if trees.is_empty()
574+
&& !(prefix.segments.is_empty()
575+
|| prefix.segments.len() == 1
576+
&& prefix.segments[0].ident.name == kw::PathRoot)
577+
{
573578
// For empty lists we need to lower the prefix so it is checked for things
574579
// like stability later.
575580
let res = self.lower_import_res(id, span);

0 commit comments

Comments
 (0)