We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8c5dafd commit 7698807Copy full SHA for 7698807
compiler/rustc_resolve/src/late.rs
@@ -2268,7 +2268,7 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
2268
2269
ExprKind::Break(None, Some(ref e)) => {
2270
// We use this instead of `visit::walk_expr` to keep the parent expr around for
2271
- // better
+ // better diagnostics.
2272
self.resolve_expr(e, Some(&expr));
2273
}
2274
src/tools/clippy/clippy_lints/src/needless_continue.rs
@@ -221,7 +221,7 @@ where
221
{
222
if let ast::ExprKind::While(_, loop_block, label)
223
| ast::ExprKind::ForLoop(_, _, loop_block, label)
224
- | ast::ExprKind::Loop(loop_block, label, _) = &expr.kind
+ | ast::ExprKind::Loop(loop_block, label, ..) = &expr.kind
225
226
func(loop_block, label.as_ref());
227
src/tools/clippy/clippy_lints/src/utils/author.rs
@@ -317,7 +317,7 @@ impl<'tcx> Visitor<'tcx> for PrintVisitor {
317
self.current = cast_pat;
318
self.visit_expr(expr);
319
},
320
- ExprKind::Loop(ref body, _, desugaring) => {
+ ExprKind::Loop(ref body, _, desugaring, _) => {
321
let body_pat = self.next("body");
322
let des = loop_desugaring_name(desugaring);
323
let label_pat = self.next("label");
src/tools/clippy/clippy_lints/src/utils/higher.rs
@@ -142,7 +142,7 @@ pub fn for_loop<'tcx>(
142
if let hir::ExprKind::Match(ref iterexpr, ref arms, hir::MatchSource::ForLoopDesugar) = expr.kind;
143
if let hir::ExprKind::Call(_, ref iterargs) = iterexpr.kind;
144
if iterargs.len() == 1 && arms.len() == 1 && arms[0].guard.is_none();
145
- if let hir::ExprKind::Loop(ref block, _, _) = arms[0].body.kind;
+ if let hir::ExprKind::Loop(ref block, ..) = arms[0].body.kind;
146
if block.expr.is_none();
147
if let [ _, _, ref let_stmt, ref body ] = *block.stmts;
148
if let hir::StmtKind::Local(ref local) = let_stmt.kind;
@@ -158,7 +158,7 @@ pub fn for_loop<'tcx>(
158
/// `while cond { body }` becomes `(cond, body)`.
159
pub fn while_loop<'tcx>(expr: &'tcx hir::Expr<'tcx>) -> Option<(&'tcx hir::Expr<'tcx>, &'tcx hir::Expr<'tcx>)> {
160
if_chain! {
161
- if let hir::ExprKind::Loop(block, _, hir::LoopSource::While) = &expr.kind;
+ if let hir::ExprKind::Loop(block, _, hir::LoopSource::While, _) = &expr.kind;
162
if let hir::Block { expr: Some(expr), .. } = &**block;
163
if let hir::ExprKind::Match(cond, arms, hir::MatchSource::WhileDesugar) = &expr.kind;
164
if let hir::ExprKind::DropTemps(cond) = &cond.kind;
src/tools/clippy/clippy_lints/src/utils/hir_utils.rs
@@ -123,7 +123,7 @@ impl<'a, 'tcx> SpanlessEq<'a, 'tcx> {
123
self.eq_expr(lc, rc) && self.eq_expr(&**lt, &**rt) && both(le, re, |l, r| self.eq_expr(l, r))
124
125
(&ExprKind::Lit(ref l), &ExprKind::Lit(ref r)) => l.node == r.node,
126
- (&ExprKind::Loop(ref lb, ref ll, ref lls), &ExprKind::Loop(ref rb, ref rl, ref rls)) => {
+ (&ExprKind::Loop(ref lb, ref ll, ref lls, _), &ExprKind::Loop(ref rb, ref rl, ref rls, _)) => {
127
lls == rls && self.eq_block(lb, rb) && both(ll, rl, |l, r| l.ident.name == r.ident.name)
128
129
(&ExprKind::Match(ref le, ref la, ref ls), &ExprKind::Match(ref re, ref ra, ref rs)) => {
@@ -560,7 +560,7 @@ impl<'a, 'tcx> SpanlessHash<'a, 'tcx> {
560
ExprKind::Lit(ref l) => {
561
l.node.hash(&mut self.s);
562
563
- ExprKind::Loop(ref b, ref i, _) => {
+ ExprKind::Loop(ref b, ref i, ..) => {
564
self.hash_block(b);
565
if let Some(i) = *i {
566
self.hash_name(i.ident.name);
0 commit comments