Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Dec 2018 03:24:51 +0000 (UTC)
From:      Jan Beich <jbeich@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r488649 - head/lang/rust-nightly/files
Message-ID:  <201812290324.wBT3OpeR099697@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Sat Dec 29 03:24:51 2018
New Revision: 488649
URL: https://svnweb.freebsd.org/changeset/ports/488649

Log:
  lang/rust-nightly: unbreak after r488641
  
  error[E0061]: this function takes 4 parameters but 2 parameters were supplied
     --> src/tools/clippy/clippy_lints/src/write.rs:295:26
      |
  295 |     let mut fmt_parser = Parser::new(&tmp, None);
      |                          ^^^^^^^^^^^^^^^^^^^^^^^ expected 4 parameters

Added:
  head/lang/rust-nightly/files/patch-clippy   (contents, props changed)

Added: head/lang/rust-nightly/files/patch-clippy
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/rust-nightly/files/patch-clippy	Sat Dec 29 03:24:51 2018	(r488649)
@@ -0,0 +1,82 @@
+https://github.com/rust-lang/rust-clippy/commit/99454bc9a1d5
+https://github.com/rust-lang/rust-clippy/commit/909bfd3cd843
+
+--- src/tools/clippy/clippy_lints/src/loops.rs.orig	2018-12-28 20:04:28 UTC
++++ src/tools/clippy/clippy_lints/src/loops.rs
+@@ -751,7 +751,8 @@ fn never_loop_expr(expr: &Expr, main_loop_id: NodeId) 
+         | ExprKind::Closure(_, _, _, _, _)
+         | ExprKind::InlineAsm(_, _, _)
+         | ExprKind::Path(_)
+-        | ExprKind::Lit(_) => NeverLoopResult::Otherwise,
++        | ExprKind::Lit(_)
++        | ExprKind::Err => NeverLoopResult::Otherwise,
+     }
+ }
+ 
+--- src/tools/clippy/clippy_lints/src/utils/author.rs.orig	2018-12-28 20:04:28 UTC
++++ src/tools/clippy/clippy_lints/src/utils/author.rs
+@@ -504,6 +504,9 @@ impl<'tcx> Visitor<'tcx> for PrintVisitor {
+                 self.current = value_pat;
+                 self.visit_expr(value);
+             },
++            ExprKind::Err => {
++                println!("Err = {}", current);
++            },
+         }
+     }
+ 
+--- src/tools/clippy/clippy_lints/src/utils/hir_utils.rs.orig	2018-12-28 20:04:28 UTC
++++ src/tools/clippy/clippy_lints/src/utils/hir_utils.rs
+@@ -615,6 +615,7 @@ impl<'a, 'tcx: 'a> SpanlessHash<'a, 'tcx> {
+                     self.hash_name(l.ident.name);
+                 }
+             },
++            ExprKind::Err => {},
+         }
+     }
+ 
+--- src/tools/clippy/clippy_lints/src/utils/inspector.rs.orig	2018-12-28 20:04:28 UTC
++++ src/tools/clippy/clippy_lints/src/utils/inspector.rs
+@@ -347,6 +347,9 @@ fn print_expr(cx: &LateContext<'_, '_>, expr: &hir::Ex
+             println!("{}repeat count:", ind);
+             print_expr(cx, &cx.tcx.hir().body(anon_const.body).value, indent + 1);
+         },
++        hir::ExprKind::Err => {
++            println!("{}Err", ind);
++        },
+     }
+ }
+ 
+--- src/tools/clippy/clippy_lints/src/utils/sugg.rs.orig	2018-12-28 20:04:28 UTC
++++ src/tools/clippy/clippy_lints/src/utils/sugg.rs
+@@ -79,7 +79,8 @@ impl<'a> Sugg<'a> {
+                 | hir::ExprKind::Ret(..)
+                 | hir::ExprKind::Struct(..)
+                 | hir::ExprKind::Tup(..)
+-                | hir::ExprKind::While(..) => Sugg::NonParen(snippet),
++                | hir::ExprKind::While(..)
++                | hir::ExprKind::Err => Sugg::NonParen(snippet),
+                 hir::ExprKind::Assign(..) => Sugg::BinOp(AssocOp::Assign, snippet),
+                 hir::ExprKind::AssignOp(op, ..) => Sugg::BinOp(hirbinop2assignop(op), snippet),
+                 hir::ExprKind::Binary(op, ..) => Sugg::BinOp(AssocOp::from_ast_binop(higher::binop(op.node)), snippet),
+@@ -158,7 +159,8 @@ impl<'a> Sugg<'a> {
+             | ast::ExprKind::Tup(..)
+             | ast::ExprKind::Array(..)
+             | ast::ExprKind::While(..)
+-            | ast::ExprKind::WhileLet(..) => Sugg::NonParen(snippet),
++            | ast::ExprKind::WhileLet(..)
++            | ast::ExprKind::Err => Sugg::NonParen(snippet),
+             ast::ExprKind::Range(.., RangeLimits::HalfOpen) => Sugg::BinOp(AssocOp::DotDot, snippet),
+             ast::ExprKind::Range(.., RangeLimits::Closed) => Sugg::BinOp(AssocOp::DotDotEq, snippet),
+             ast::ExprKind::Assign(..) => Sugg::BinOp(AssocOp::Assign, snippet),
+--- src/tools/clippy/clippy_lints/src/write.rs.orig	2018-12-28 20:04:28 UTC
++++ src/tools/clippy/clippy_lints/src/write.rs
+@@ -292,7 +292,7 @@ fn check_tts<'a>(cx: &EarlyContext<'a>, tts: &ThinToke
+     };
+     let tmp = fmtstr.clone();
+     let mut args = vec![];
+-    let mut fmt_parser = Parser::new(&tmp, None);
++    let mut fmt_parser = Parser::new(&tmp, None, Vec::new(), false);
+     while let Some(piece) = fmt_parser.next() {
+         if !fmt_parser.errors.is_empty() {
+             return (None, expr);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201812290324.wBT3OpeR099697>