Skip to content

Commit

Permalink
revert nightly rustfmt formatting that accidentally slipped in
Browse files Browse the repository at this point in the history
  • Loading branch information
fasterthanlime committed Jul 26, 2022
1 parent 957f3b9 commit c6f23b7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
6 changes: 5 additions & 1 deletion src/tools/rust-analyzer/crates/hir-def/src/import_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,11 @@ fn collect_import_map(db: &dyn DefDatabase, krate: CrateId) -> ImportMap {

let visible_items = mod_data.scope.entries().filter_map(|(name, per_ns)| {
let per_ns = per_ns.filter_visibility(|vis| vis == Visibility::Public);
if per_ns.is_none() { None } else { Some((name, per_ns)) }
if per_ns.is_none() {
None
} else {
Some((name, per_ns))
}
});

for (name, per_ns) in visible_items {
Expand Down
6 changes: 5 additions & 1 deletion src/tools/rust-analyzer/crates/hir-def/src/nameres.rs
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,11 @@ impl DefMap {

pub(crate) fn crate_root(&self, db: &dyn DefDatabase) -> ModuleId {
self.with_ancestor_maps(db, self.root, &mut |def_map, _module| {
if def_map.block.is_none() { Some(def_map.module_id(def_map.root)) } else { None }
if def_map.block.is_none() {
Some(def_map.module_id(def_map.root))
} else {
None
}
})
.expect("DefMap chain without root")
}
Expand Down
3 changes: 1 addition & 2 deletions src/tools/rust-analyzer/crates/proc-macro-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ fn main() {
Command::new(toolchain::cargo())
};

cmd
.current_dir(&staging_dir)
cmd.current_dir(&staging_dir)
.args(&["build", "-p", "proc-macro-test-impl", "--message-format", "json"])
// Explicit override the target directory to avoid using the same one which the parent
// cargo is using, or we'll deadlock.
Expand Down

0 comments on commit c6f23b7

Please sign in to comment.