1
Fork 0

Auto merge of #99231 - Dylan-DPC:rollup-0tl8c0o, r=Dylan-DPC

Rollup of 5 pull requests

Successful merges:

 - #97720 (Always create elided lifetime parameters for functions)
 - #98315 (Stabilize `core::ffi:c_*` and rexport in `std::ffi`)
 - #98705 (Implement `for<>` lifetime binder for closures)
 - #99126 (remove allow(rustc::potential_query_instability) in rustc_span)
 - #99139 (Give a better error when `x dist` fails for an optional tool)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
This commit is contained in:
bors 2022-07-14 11:00:30 +00:00
commit f1a8854f9b
116 changed files with 1024 additions and 271 deletions

View file

@ -57,7 +57,13 @@ impl<'a, 'hir> Visitor<'hir> for CheckLoopVisitor<'a, 'hir> {
hir::ExprKind::Loop(ref b, _, source, _) => {
self.with_context(Loop(source), |v| v.visit_block(&b));
}
hir::ExprKind::Closure { ref fn_decl, body, fn_decl_span, movability, .. } => {
hir::ExprKind::Closure(&hir::Closure {
ref fn_decl,
body,
fn_decl_span,
movability,
..
}) => {
let cx = if let Some(Movability::Static) = movability {
AsyncClosure(fn_decl_span)
} else {

View file

@ -273,7 +273,10 @@ impl<'tcx> ReachableContext<'tcx> {
}
hir::ImplItemKind::TyAlias(_) => {}
},
Node::Expr(&hir::Expr { kind: hir::ExprKind::Closure { body, .. }, .. }) => {
Node::Expr(&hir::Expr {
kind: hir::ExprKind::Closure(&hir::Closure { body, .. }),
..
}) => {
self.visit_nested_body(body);
}
// Nothing to recurse on for these