diff options
| author | Philipp Hansch <dev@phansch.net> | 2018-11-03 20:06:48 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-11-03 20:06:48 +0100 |
| commit | 71ec4ff636b9315cfaadd30e45338a077ed98a9b (patch) | |
| tree | f5dff82c9181b1ea15928c6e1f58ecdf58cc8711 | |
| parent | 486300b89dd6b06f53061a193d3477ceb3740dee (diff) | |
| parent | b59b60c8ae2c3702069ad47c05023563636a21ef (diff) | |
| download | rust-71ec4ff636b9315cfaadd30e45338a077ed98a9b.tar.gz rust-71ec4ff636b9315cfaadd30e45338a077ed98a9b.zip | |
Merge pull request #3404 from matthiaskrgr/rustup
rustup https://github.com/rust-lang/rust/pull/55330/
| -rw-r--r-- | clippy_lints/src/map_unit_fn.rs | 2 | ||||
| -rw-r--r-- | clippy_lints/src/needless_pass_by_value.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/clippy_lints/src/map_unit_fn.rs b/clippy_lints/src/map_unit_fn.rs index 503a2ee7032..373cf1fbf38 100644 --- a/clippy_lints/src/map_unit_fn.rs +++ b/clippy_lints/src/map_unit_fn.rs @@ -106,7 +106,7 @@ fn is_unit_function(cx: &LateContext<'_, '_>, expr: &hir::Expr) -> bool { let ty = cx.tables.expr_ty(expr); if let ty::FnDef(id, _) = ty.sty { - if let Some(fn_type) = cx.tcx.fn_sig(id).no_late_bound_regions() { + if let Some(fn_type) = cx.tcx.fn_sig(id).no_bound_vars() { return is_unit_type(fn_type.output()); } } diff --git a/clippy_lints/src/needless_pass_by_value.rs b/clippy_lints/src/needless_pass_by_value.rs index 39f519ac586..d4257fd1aa9 100644 --- a/clippy_lints/src/needless_pass_by_value.rs +++ b/clippy_lints/src/needless_pass_by_value.rs @@ -125,7 +125,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for NeedlessPassByValue { .filter(|p| !p.is_global()) .filter_map(|pred| { if let ty::Predicate::Trait(poly_trait_ref) = pred { - if poly_trait_ref.def_id() == sized_trait || poly_trait_ref.skip_binder().has_escaping_regions() { + if poly_trait_ref.def_id() == sized_trait || poly_trait_ref.skip_binder().has_escaping_bound_vars() { return None; } Some(poly_trait_ref) |
