Merge pull request #3404 from matthiaskrgr/rustup

rustup https://github.com/rust-lang/rust/pull/55330/
This commit is contained in:
Philipp Hansch 2018-11-03 20:06:48 +01:00 committed by GitHub
commit 71ec4ff636
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -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());
}
}

View file

@ -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)