File tree 2 files changed +6
-2
lines changed
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -178,6 +178,7 @@ fn test_redundant_closure_with_another_closure() {
178
178
let a = Some(1u8).map(closure);
179
179
}
180
180
181
+ <<<<<<< HEAD
181
182
<<<<<<< HEAD
182
183
fn call<F: FnOnce(&mut String) -> String>(f: F) -> String {
183
184
f(&mut "Hello".to_owned())
@@ -198,6 +199,9 @@ fn test_deref_with_trait_method() {
198
199
let _ = [Bar].iter().map(|s| s.to_string()).collect::<Vec<_>>();;
199
200
=======
200
201
fn make_lazy(f: fn() -> fn(u8) -> u8) -> impl Fn(u8) -> u8 {
202
+ =======
203
+ fn make_lazy(f: impl Fn() -> fn(u8) -> u8) -> impl Fn(u8) -> u8 {
204
+ >>>>>>> Workaround for rust-lang/rustfmt#3615
201
205
// Currently f is called when result of make_lazy is called.
202
206
// If the closure is removed, f will be called when make_lazy itself is
203
207
// called. This changes semantics, so the closure must stay.
Original file line number Diff line number Diff line change @@ -178,7 +178,6 @@ fn test_redundant_closure_with_another_closure() {
178
178
let a = Some ( 1u8 ) . map ( |a| closure ( a) ) ;
179
179
}
180
180
181
- <<<<<<< HEAD
182
181
fn call < F : FnOnce ( & mut String ) -> String > ( f : F ) -> String {
183
182
f ( & mut "Hello" . to_owned ( ) )
184
183
}
@@ -196,7 +195,8 @@ impl std::ops::Deref for Bar {
196
195
197
196
fn test_deref_with_trait_method( ) {
198
197
let _ = [ Bar ] . iter ( ) . map ( |s| s. to_string ( ) ) . collect :: < Vec < _ > > ( ) ; ;
199
- fn make_lazy ( f : fn ( ) -> fn ( u8 ) -> u8 ) -> impl Fn ( u8 ) -> u8 {
198
+
199
+ fn make_lazy ( f : impl Fn ( ) -> fn ( u8 ) -> u8 ) -> impl Fn ( u8 ) -> u8 {
200
200
// Currently f is called when result of make_lazy is called.
201
201
// If the closure is removed, f will be called when make_lazy itself is
202
202
// called. This changes semantics, so the closure must stay.
You can’t perform that action at this time.
0 commit comments