}
},
ExprKind::Struct(_, _, None)
- | ExprKind::Yield(_)
+ | ExprKind::Yield(_, _)
| ExprKind::Closure(_, _, _, _, _)
| ExprKind::InlineAsm(_, _, _)
| ExprKind::Path(_)
false
}
-fn is_end_eq_array_len(cx: &LateContext<'_, '_>, end: &Expr, limits: ast::RangeLimits, indexed_ty: Ty<'_>) -> bool {
+fn is_end_eq_array_len<'tcx>(
+ cx: &LateContext<'_, 'tcx>,
+ end: &Expr,
+ limits: ast::RangeLimits,
+ indexed_ty: Ty<'tcx>,
+) -> bool {
if_chain! {
if let ExprKind::Lit(ref lit) = end.node;
if let ast::LitKind::Int(end_int, _) = lit.node;
match_type(cx, ty, &paths::BTREESET)
}
-fn is_iterable_array(ty: Ty<'_>, cx: &LateContext<'_, '_>) -> bool {
+fn is_iterable_array<'tcx>(ty: Ty<'tcx>, cx: &LateContext<'_, 'tcx>) -> bool {
// IntoIterator is currently only implemented for array sizes <= 32 in rustc
match ty.sty {
ty::Array(_, n) => (0..=32).contains(&n.assert_usize(cx.tcx).expect("array length")),
expr: &'tcx hir::Expr,
ty: Ty<'tcx>,
) -> Option<&'tcx hir::Expr> {
- fn may_slice(cx: &LateContext<'_, '_>, ty: Ty<'_>) -> bool {
+ fn may_slice<'a>(cx: &LateContext<'_, 'a>, ty: Ty<'a>) -> bool {
match ty.sty {
ty::Slice(_) => true,
ty::Adt(def, _) if def.is_box() => may_slice(cx, ty.boxed_ty()),
println!("Closure(ref capture_clause, ref func, _, _, _) = {};", current);
println!(" // unimplemented: `ExprKind::Closure` is not further destructured at the moment");
},
- ExprKind::Yield(ref sub) => {
+ ExprKind::Yield(ref sub, _) => {
let sub_pat = self.next("sub");
println!("Yield(ref sub) = {};", current);
self.current = sub_pat;
println!("{}Closure", ind);
println!("{}clause: {:?}", ind, clause);
},
- hir::ExprKind::Yield(ref sub) => {
+ hir::ExprKind::Yield(ref sub, _) => {
println!("{}Yield", ind);
print_expr(cx, sub, indent + 1);
},