Skip to content

Commit

Permalink
Rollup merge of rust-lang#48124 - alexcrichton:clean-up-debugging, r=…
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
kennytm committed Feb 10, 2018
2 parents 18d7be3 + 3a96767 commit b37c602
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/librustc_resolve/resolve_imports.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1026,9 +1026,14 @@ fn import_path_to_string(names: &[SpannedIdent],
if names.is_empty() {
import_directive_subclass_to_string(subclass)
} else {
let x = format!("{}::{}",
names_to_string(names),
import_directive_subclass_to_string(subclass));
// Note that this code looks a little wonky, it's currently here to
// hopefully help debug #48116, but otherwise isn't intended to
// cause any problems.
let x = format!(
"{}::{}",
names_to_string(names),
import_directive_subclass_to_string(subclass),
);
assert!(!names.is_empty());
assert!(!x.starts_with("::"));
return x
Expand Down

0 comments on commit b37c602

Please sign in to comment.