mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 22:01:37 +00:00
Fix need-mut large span in closures and a false positive
This commit is contained in:
parent
0289dfa261
commit
0c621065fb
4 changed files with 69 additions and 29 deletions
|
@ -105,6 +105,20 @@ fn nested_closures() {
|
|||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn capture_specific_fields2() {
|
||||
size_and_align_expr! {
|
||||
minicore: copy;
|
||||
stmts: [
|
||||
let x = &mut 2;
|
||||
]
|
||||
|| {
|
||||
*x = 5;
|
||||
&x;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn capture_specific_fields() {
|
||||
size_and_align_expr! {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue