Skip to content

Commit b37c602

Browse files
committed
Rollup merge of rust-lang#48124 - alexcrichton:clean-up-debugging, r=kennytm
Explain unusual debugging code in librustc Introduced in rust-lang#47828 to help track down some bugs, it landed a bit hastily so this is intended on cleaning it up a bit.
2 parents 18d7be3 + 3a96767 commit b37c602

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/librustc_resolve/resolve_imports.rs

+8-3
Original file line numberDiff line numberDiff line change
@@ -1026,9 +1026,14 @@ fn import_path_to_string(names: &[SpannedIdent],
10261026
if names.is_empty() {
10271027
import_directive_subclass_to_string(subclass)
10281028
} else {
1029-
let x = format!("{}::{}",
1030-
names_to_string(names),
1031-
import_directive_subclass_to_string(subclass));
1029+
// Note that this code looks a little wonky, it's currently here to
1030+
// hopefully help debug #48116, but otherwise isn't intended to
1031+
// cause any problems.
1032+
let x = format!(
1033+
"{}::{}",
1034+
names_to_string(names),
1035+
import_directive_subclass_to_string(subclass),
1036+
);
10321037
assert!(!names.is_empty());
10331038
assert!(!x.starts_with("::"));
10341039
return x

0 commit comments

Comments
 (0)