allow modifications of vars from outer scope inside extracted function

It currently allows only directly setting variable.
No `&mut` references or methods.
This commit is contained in:
Vladyslav Katasonov 2021-02-03 23:45:03 +03:00
parent 82787febde
commit f102616aae
2 changed files with 336 additions and 45 deletions

View file

@ -487,7 +487,7 @@ pub mod tokens {
use crate::{ast, AstNode, Parse, SourceFile, SyntaxKind::*, SyntaxToken};
pub(super) static SOURCE_FILE: Lazy<Parse<SourceFile>> =
Lazy::new(|| SourceFile::parse("const C: <()>::Item = (1 != 1, 2 == 2, !true)\n;\n\n"));
Lazy::new(|| SourceFile::parse("const C: <()>::Item = (1 != 1, 2 == 2, !true, *p)\n;\n\n"));
pub fn single_space() -> SyntaxToken {
SOURCE_FILE