Skip to content

Commit d61b254

Browse files
committed
Auto merge of #3786 - rust-lang:rustup, r=Manishearth
Rustup to rustc master (32471f7 2019-02-19) None
2 parents 6c10620 + 68476e1 commit d61b254

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

clippy_lints/src/lifetimes.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ fn check_fn_inner<'a, 'tcx>(
113113
let mut bounds_lts = Vec::new();
114114
let types = generics.params.iter().filter(|param| match param.kind {
115115
GenericParamKind::Type { .. } => true,
116-
GenericParamKind::Lifetime { .. } => false,
116+
_ => false,
117117
});
118118
for typ in types {
119119
for bound in &typ.bounds {
@@ -133,7 +133,7 @@ fn check_fn_inner<'a, 'tcx>(
133133
if let Some(ref params) = *params {
134134
let lifetimes = params.args.iter().filter_map(|arg| match arg {
135135
GenericArg::Lifetime(lt) => Some(lt),
136-
GenericArg::Type(_) => None,
136+
_ => None,
137137
});
138138
for bound in lifetimes {
139139
if bound.name != LifetimeName::Static && !bound.is_elided() {
@@ -316,7 +316,7 @@ impl<'v, 't> RefVisitor<'v, 't> {
316316
if !last_path_segment.parenthesized
317317
&& !last_path_segment.args.iter().any(|arg| match arg {
318318
GenericArg::Lifetime(_) => true,
319-
GenericArg::Type(_) => false,
319+
_ => false,
320320
})
321321
{
322322
let hir_id = self.cx.tcx.hir().node_to_hir_id(ty.id);

clippy_lints/src/needless_pass_by_value.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for NeedlessPassByValue {
234234
.and_then(|ps| ps.args.as_ref())
235235
.map(|params| params.args.iter().find_map(|arg| match arg {
236236
GenericArg::Type(ty) => Some(ty),
237-
GenericArg::Lifetime(_) => None,
237+
_ => None,
238238
}).unwrap());
239239
then {
240240
let slice_ty = format!("&[{}]", snippet(cx, elem_ty.span, "_"));

clippy_lints/src/ptr.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ fn check_fn(cx: &LateContext<'_, '_>, decl: &FnDecl, fn_id: NodeId, opt_body_id:
235235
if !params.parenthesized;
236236
if let Some(inner) = params.args.iter().find_map(|arg| match arg {
237237
GenericArg::Type(ty) => Some(ty),
238-
GenericArg::Lifetime(_) => None,
238+
_ => None,
239239
});
240240
then {
241241
let replacement = snippet_opt(cx, inner.span);

clippy_lints/src/transmute.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ fn get_type_snippet(cx: &LateContext<'_, '_>, path: &QPath, to_ref_ty: Ty<'_>) -
498498
if !params.parenthesized;
499499
if let Some(to_ty) = params.args.iter().filter_map(|arg| match arg {
500500
GenericArg::Type(ty) => Some(ty),
501-
GenericArg::Lifetime(_) => None,
501+
_ => None,
502502
}).nth(1);
503503
if let TyKind::Rptr(_, ref to_ty) = to_ty.node;
504504
then {

clippy_lints/src/types.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ fn match_type_parameter(cx: &LateContext<'_, '_>, qpath: &QPath, path: &[&str])
223223
if !params.parenthesized;
224224
if let Some(ty) = params.args.iter().find_map(|arg| match arg {
225225
GenericArg::Type(ty) => Some(ty),
226-
GenericArg::Lifetime(_) => None,
226+
_ => None,
227227
});
228228
if let TyKind::Path(ref qpath) = ty.node;
229229
if let Some(did) = opt_def_id(cx.tables.qpath_def(qpath, cx.tcx.hir().node_to_hir_id(ty.id)));
@@ -267,7 +267,7 @@ fn check_ty(cx: &LateContext<'_, '_>, hir_ty: &hir::Ty, is_local: bool) {
267267
if let Some(ref last) = last_path_segment(qpath).args;
268268
if let Some(ty) = last.args.iter().find_map(|arg| match arg {
269269
GenericArg::Type(ty) => Some(ty),
270-
GenericArg::Lifetime(_) => None,
270+
_ => None,
271271
});
272272
// ty is now _ at this point
273273
if let TyKind::Path(ref ty_qpath) = ty.node;
@@ -278,7 +278,7 @@ fn check_ty(cx: &LateContext<'_, '_>, hir_ty: &hir::Ty, is_local: bool) {
278278
if let Some(ref last) = last_path_segment(ty_qpath).args;
279279
if let Some(boxed_ty) = last.args.iter().find_map(|arg| match arg {
280280
GenericArg::Type(ty) => Some(ty),
281-
GenericArg::Lifetime(_) => None,
281+
_ => None,
282282
});
283283
then {
284284
let ty_ty = hir_ty_to_ty(cx.tcx, boxed_ty);
@@ -327,7 +327,7 @@ fn check_ty(cx: &LateContext<'_, '_>, hir_ty: &hir::Ty, is_local: bool) {
327327
.map_or_else(|| [].iter(), |params| params.args.iter())
328328
.filter_map(|arg| match arg {
329329
GenericArg::Type(ty) => Some(ty),
330-
GenericArg::Lifetime(_) => None,
330+
_ => None,
331331
})
332332
}) {
333333
check_ty(cx, ty, is_local);
@@ -340,7 +340,7 @@ fn check_ty(cx: &LateContext<'_, '_>, hir_ty: &hir::Ty, is_local: bool) {
340340
.map_or_else(|| [].iter(), |params| params.args.iter())
341341
.filter_map(|arg| match arg {
342342
GenericArg::Type(ty) => Some(ty),
343-
GenericArg::Lifetime(_) => None,
343+
_ => None,
344344
})
345345
}) {
346346
check_ty(cx, ty, is_local);
@@ -351,7 +351,7 @@ fn check_ty(cx: &LateContext<'_, '_>, hir_ty: &hir::Ty, is_local: bool) {
351351
if let Some(ref params) = seg.args {
352352
for ty in params.args.iter().filter_map(|arg| match arg {
353353
GenericArg::Type(ty) => Some(ty),
354-
GenericArg::Lifetime(_) => None,
354+
_ => None,
355355
}) {
356356
check_ty(cx, ty, is_local);
357357
}
@@ -387,7 +387,7 @@ fn check_ty_rptr(cx: &LateContext<'_, '_>, hir_ty: &hir::Ty, is_local: bool, lt:
387387
if !params.parenthesized;
388388
if let Some(inner) = params.args.iter().find_map(|arg| match arg {
389389
GenericArg::Type(ty) => Some(ty),
390-
GenericArg::Lifetime(_) => None,
390+
_ => None,
391391
});
392392
then {
393393
if is_any_trait(inner) {
@@ -2138,7 +2138,7 @@ impl<'tcx> ImplicitHasherType<'tcx> {
21382138
.iter()
21392139
.filter_map(|arg| match arg {
21402140
GenericArg::Type(ty) => Some(ty),
2141-
GenericArg::Lifetime(_) => None,
2141+
_ => None,
21422142
})
21432143
.collect();
21442144
let params_len = params.len();

clippy_lints/src/use_self.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UseSelf {
181181
let should_check = if let Some(ref params) = *parameters {
182182
!params.parenthesized && !params.args.iter().any(|arg| match arg {
183183
GenericArg::Lifetime(_) => true,
184-
GenericArg::Type(_) => false,
184+
_ => false,
185185
})
186186
} else {
187187
true

0 commit comments

Comments
 (0)