Do not set visibility to true automatically (#4591)

Adding it by default grows the size of the visibility structure a lot.
This commit is contained in:
Jakub Žádník 2022-02-21 23:42:31 +02:00 committed by GitHub
parent 359bb6eebe
commit 739e403cd5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 2 deletions

View File

@ -328,6 +328,7 @@ pub fn parse_def(
let block = call.positional.get(2).expect("def call already checked"); let block = call.positional.get(2).expect("def call already checked");
let mut error = None; let mut error = None;
if let (Some(name), Some(mut signature), Some(block_id)) = if let (Some(name), Some(mut signature), Some(block_id)) =
(&name_expr.as_string(), sig.as_signature(), block.as_block()) (&name_expr.as_string(), sig.as_signature(), block.as_block())
{ {

View File

@ -743,7 +743,6 @@ impl<'a> StateWorkingSet<'a> {
.expect("internal error: missing required scope frame"); .expect("internal error: missing required scope frame");
scope_frame.decls.insert(name, decl_id); scope_frame.decls.insert(name, decl_id);
scope_frame.visibility.use_decl_id(&decl_id);
decl_id decl_id
} }
@ -790,7 +789,6 @@ impl<'a> StateWorkingSet<'a> {
if let Some(decl_id) = scope_frame.predecls.remove(name) { if let Some(decl_id) = scope_frame.predecls.remove(name) {
scope_frame.decls.insert(name.into(), decl_id); scope_frame.decls.insert(name.into(), decl_id);
scope_frame.visibility.use_decl_id(&decl_id);
return Some(decl_id); return Some(decl_id);
} }