diff options
author | Vladyslav Katasonov <[email protected]> | 2021-02-03 20:45:03 +0000 |
---|---|---|
committer | Vladyslav Katasonov <[email protected]> | 2021-02-03 20:45:03 +0000 |
commit | f102616aaea2894508f8f078cfb20ceef5411d12 (patch) | |
tree | fe2f951fd8fe9d3ed9aa7e92db9f467a8bb7fc66 /crates/syntax/src | |
parent | 82787febdee3e7dfe5a96c94aee03cd726f642f9 (diff) |
allow modifications of vars from outer scope inside extracted function
It currently allows only directly setting variable.
No `&mut` references or methods.
Diffstat (limited to 'crates/syntax/src')
-rw-r--r-- | crates/syntax/src/ast/make.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/syntax/src/ast/make.rs b/crates/syntax/src/ast/make.rs index b755c9692..1da5a125e 100644 --- a/crates/syntax/src/ast/make.rs +++ b/crates/syntax/src/ast/make.rs | |||
@@ -487,7 +487,7 @@ pub mod tokens { | |||
487 | use crate::{ast, AstNode, Parse, SourceFile, SyntaxKind::*, SyntaxToken}; | 487 | use crate::{ast, AstNode, Parse, SourceFile, SyntaxKind::*, SyntaxToken}; |
488 | 488 | ||
489 | pub(super) static SOURCE_FILE: Lazy<Parse<SourceFile>> = | 489 | pub(super) static SOURCE_FILE: Lazy<Parse<SourceFile>> = |
490 | Lazy::new(|| SourceFile::parse("const C: <()>::Item = (1 != 1, 2 == 2, !true)\n;\n\n")); | 490 | Lazy::new(|| SourceFile::parse("const C: <()>::Item = (1 != 1, 2 == 2, !true, *p)\n;\n\n")); |
491 | 491 | ||
492 | pub fn single_space() -> SyntaxToken { | 492 | pub fn single_space() -> SyntaxToken { |
493 | SOURCE_FILE | 493 | SOURCE_FILE |