File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
1
- Feature Name: closure_to_fn_coercion
2
2
- Start Date: 2016-03-25
3
- - RFC PR: (leave this empty )
4
- - Rust Issue: (leave this empty )
3
+ - RFC PR: [ rust-lang/rfcs # 1558 ] ( https://github.com/rust-lang/rfcs/pull/1558 )
4
+ - Rust Issue: [ rust-lang/rust # 39817 ] ( https://github.com/rust-lang/rust/issues/39817 )
5
5
6
6
# Summary
7
7
[ summary ] : #summary
@@ -153,13 +153,13 @@ and by circumstance later need to capture a variable. The required change from `
153
153
be a breaking change.
154
154
155
155
We do expect crate authors to measure their API's flexibility in other areas, however, as when
156
- determining whether to take ` &self ` or ` &mut self ` . Taking a similar situation to the above:
156
+ determining whether to take ` &self ` or ` &mut self ` . Taking a similar situation to the above:
157
157
158
158
``` rust
159
159
fn func_specific <'a >(& 'a self ) -> impl Fn () -> u32 {
160
160
move || return self . field
161
161
}
162
-
162
+
163
163
fn func_general <'a >(& 'a mut self ) -> impl FnMut () -> u32 {
164
164
move || { self . field += 1 ; return self . field; }
165
165
}
You can’t perform that action at this time.
0 commit comments