Merge pull request #1189 from Pursuit92/master
Quick fix for "impl Trait"
This commit is contained in:
commit
171d917888
@ -618,9 +618,8 @@ fn rewrite(&self, context: &RewriteContext, width: usize, offset: Indent) -> Opt
|
|||||||
ast::TyKind::Mac(..) |
|
ast::TyKind::Mac(..) |
|
||||||
ast::TyKind::Typeof(..) => unreachable!(),
|
ast::TyKind::Typeof(..) => unreachable!(),
|
||||||
ast::TyKind::ImplicitSelf => Some(String::from("")),
|
ast::TyKind::ImplicitSelf => Some(String::from("")),
|
||||||
ast::TyKind::ImplTrait(..) => {
|
ast::TyKind::ImplTrait(ref it) => {
|
||||||
// FIXME(#1154) Implement impl Trait
|
it.rewrite(context, width, offset).map(|it_str| format!("impl {}", it_str))
|
||||||
Some(String::from("impl TODO"))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,3 +14,7 @@ struct F {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn issue_1006(def_id_to_string: for<'a, 'b> unsafe fn(TyCtxt<'b, 'tcx, 'tcx>, DefId) -> String) {}
|
fn issue_1006(def_id_to_string: for<'a, 'b> unsafe fn(TyCtxt<'b, 'tcx, 'tcx>, DefId) -> String) {}
|
||||||
|
|
||||||
|
fn impl_trait_fn_1() -> impl Fn(i32) -> Option<u8> {}
|
||||||
|
|
||||||
|
fn impl_trait_fn_2<E>() -> impl Future<Item=&'a i64,Error=E> {}
|
||||||
|
@ -23,3 +23,7 @@ struct F {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn issue_1006(def_id_to_string: for<'a, 'b> unsafe fn(TyCtxt<'b, 'tcx, 'tcx>, DefId) -> String) {}
|
fn issue_1006(def_id_to_string: for<'a, 'b> unsafe fn(TyCtxt<'b, 'tcx, 'tcx>, DefId) -> String) {}
|
||||||
|
|
||||||
|
fn impl_trait_fn_1() -> impl Fn(i32) -> Option<u8> {}
|
||||||
|
|
||||||
|
fn impl_trait_fn_2<E>() -> impl Future<Item = &'a i64, Error = E> {}
|
||||||
|
Loading…
Reference in New Issue
Block a user