mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-28 10:39:45 +00:00
Compute closure captures
This commit is contained in:
parent
51d5862caf
commit
59b6f2d9f2
42 changed files with 2537 additions and 433 deletions
|
|
@ -70,8 +70,8 @@ fn infer_pattern() {
|
|||
228..233 '&true': &bool
|
||||
229..233 'true': bool
|
||||
234..236 '{}': ()
|
||||
246..252 'lambda': |u64, u64, i32| -> i32
|
||||
255..287 '|a: u6...b; c }': |u64, u64, i32| -> i32
|
||||
246..252 'lambda': impl Fn(u64, u64, i32) -> i32
|
||||
255..287 '|a: u6...b; c }': impl Fn(u64, u64, i32) -> i32
|
||||
256..257 'a': u64
|
||||
264..265 'b': u64
|
||||
267..268 'c': i32
|
||||
|
|
@ -677,25 +677,25 @@ fn test() {
|
|||
51..58 'loop {}': !
|
||||
56..58 '{}': ()
|
||||
72..171 '{ ... x); }': ()
|
||||
78..81 'foo': fn foo<&(i32, &str), i32, |&(i32, &str)| -> i32>(&(i32, &str), |&(i32, &str)| -> i32) -> i32
|
||||
78..81 'foo': fn foo<&(i32, &str), i32, impl Fn(&(i32, &str)) -> i32>(&(i32, &str), impl Fn(&(i32, &str)) -> i32) -> i32
|
||||
78..105 'foo(&(...y)| x)': i32
|
||||
82..91 '&(1, "a")': &(i32, &str)
|
||||
83..91 '(1, "a")': (i32, &str)
|
||||
84..85 '1': i32
|
||||
87..90 '"a"': &str
|
||||
93..104 '|&(x, y)| x': |&(i32, &str)| -> i32
|
||||
93..104 '|&(x, y)| x': impl Fn(&(i32, &str)) -> i32
|
||||
94..101 '&(x, y)': &(i32, &str)
|
||||
95..101 '(x, y)': (i32, &str)
|
||||
96..97 'x': i32
|
||||
99..100 'y': &str
|
||||
103..104 'x': i32
|
||||
142..145 'foo': fn foo<&(i32, &str), &i32, |&(i32, &str)| -> &i32>(&(i32, &str), |&(i32, &str)| -> &i32) -> &i32
|
||||
142..145 'foo': fn foo<&(i32, &str), &i32, impl Fn(&(i32, &str)) -> &i32>(&(i32, &str), impl Fn(&(i32, &str)) -> &i32) -> &i32
|
||||
142..168 'foo(&(...y)| x)': &i32
|
||||
146..155 '&(1, "a")': &(i32, &str)
|
||||
147..155 '(1, "a")': (i32, &str)
|
||||
148..149 '1': i32
|
||||
151..154 '"a"': &str
|
||||
157..167 '|(x, y)| x': |&(i32, &str)| -> &i32
|
||||
157..167 '|(x, y)| x': impl Fn(&(i32, &str)) -> &i32
|
||||
158..164 '(x, y)': (i32, &str)
|
||||
159..160 'x': &i32
|
||||
162..163 'y': &&str
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue