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 11- Feature Name: closure_to_fn_coercion
22- 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 )
55
66# Summary
77[ summary ] : #summary
@@ -153,13 +153,13 @@ and by circumstance later need to capture a variable. The required change from `
153153be a breaking change.
154154
155155We 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:
157157
158158``` rust
159159fn func_specific <'a >(& 'a self ) -> impl Fn () -> u32 {
160160 move || return self . field
161161}
162-
162+
163163fn func_general <'a >(& 'a mut self ) -> impl FnMut () -> u32 {
164164 move || { self . field += 1 ; return self . field; }
165165}
You can’t perform that action at this time.
0 commit comments