mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-08-22 11:24:24 +00:00
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:
parent
82787febde
commit
f102616aae
2 changed files with 336 additions and 45 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue