Skip to content

Commit

Permalink
Merge pull request rust-lang#3404 from matthiaskrgr/rustup
Browse files Browse the repository at this point in the history
  • Loading branch information
phansch authored Nov 3, 2018
2 parents 486300b + b59b60c commit 71ec4ff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion clippy_lints/src/map_unit_fn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/needless_pass_by_value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 71ec4ff

Please sign in to comment.