Skip to content

Commit

Permalink
[move-ide] Fix IDE getting stuck (#18060)
Browse files Browse the repository at this point in the history
## Description 

Very short PR to fix IDE getting stuck due to a forgotten `println`
call. Additional assertion removal is temporary until proper enum
support lands (soon) but at the moment I am chasing a perf problem which
takes priority.

## Test plan 

All tests must pass
  • Loading branch information
awelc authored Jun 4, 2024
1 parent 9139118 commit 3bb229a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ impl TypingAnalysisContext<'_> {

let mut use_defs = std::mem::replace(&mut self.use_defs, UseDefMap::new());
let mut refs = std::mem::take(self.references);
if add_struct_use_def(
add_struct_use_def(
self.mod_outer_defs,
self.files(),
self.file_mapping(),
Expand All @@ -355,11 +355,7 @@ impl TypingAnalysisContext<'_> {
self.def_info,
&mut use_defs,
self.alias_lengths,
)
.is_none()
{
debug_assert!(false);
}
);
let _ = std::mem::replace(&mut self.use_defs, use_defs);
let _ = std::mem::replace(self.references, refs);
}
Expand Down Expand Up @@ -596,7 +592,6 @@ impl<'a> TypingVisitorContext for TypingAnalysisContext<'a> {
ident_type_def_loc,
),
);
// scope must be passed here but it's not expected to be populated
self.visit_exp(&mut cdef.value);
}

Expand Down
1 change: 0 additions & 1 deletion external-crates/move/crates/move-analyzer/src/symbols.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2536,7 +2536,6 @@ pub fn add_struct_use_def(
debug_assert!(false);
return None;
};
println!("name_start: {mod_ident_str:?}");
if let Some(def) = mod_defs.structs.get(use_name) {
let def_fhash = mod_outer_defs.get(&mod_ident_str).unwrap().fhash;
let struct_info = def_info
Expand Down

0 comments on commit 3bb229a

Please sign in to comment.