Rustup to rustc 1.41.0-nightly (e87a205c2 2019-11-27)#4846
Rustup to rustc 1.41.0-nightly (e87a205c2 2019-11-27)#4846bors merged 8 commits intorust-lang:masterfrom
Conversation
| error: use of `ok_or` followed by a function call | ||
| --> $DIR/or_fun_call.rs:74:17 | ||
| | | ||
| LL | let _ = opt.ok_or(format!("{} world.", hello)); | ||
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| format!("{} world.", hello))` |
There was a problem hiding this comment.
format! now expands to a block. While format is explicitly handled in expect_fun_call, it is not in or_fun_call.
cc @matthewjasper -- simply doing |
|
Ah thanks, good point! |
| // | ||
| // TODO: fix this | ||
| ExprKind::AddrOf(_, _) => { | ||
| ExprKind::AddrOf(_, _, _) => { |
| } | ||
| }, | ||
| Assign(ref target, _) | AssignOp(_, ref target, _) | AddrOf(hir::Mutability::Mutable, ref target) => { | ||
| Assign(ref target, _) | AssignOp(_, ref target, _) | AddrOf(_, hir::Mutability::Mutable, ref target) => { |
| if conditions.len() == 2; | ||
| then { | ||
| if let ExprKind::AddrOf(_, ref lhs) = conditions[0].kind { | ||
| if let ExprKind::AddrOf(_, _, ref lhs) = conditions[0].kind { |
There was a problem hiding this comment.
Maybe the ones in this file?
There was a problem hiding this comment.
eh, i think this is edge casey enough to leave it focused on Ref.
| | ExprKind::Unary(_, ref inner) | ||
| | ExprKind::Field(ref inner, _) | ||
| | ExprKind::AddrOf(_, ref inner) | ||
| | ExprKind::AddrOf(_, _, ref inner) |
There was a problem hiding this comment.
The ones in this file
| if_chain! { | ||
| if let ExprKind::Unary(UnOp::Deref, ref deref_target) = e.kind; | ||
| if let ExprKind::AddrOf(_, ref addrof_target) = without_parens(deref_target).kind; | ||
| if let ExprKind::AddrOf(_, _, ref addrof_target) = without_parens(deref_target).kind; |
There was a problem hiding this comment.
The ones in this file
| }, | ||
| ExprKind::Unary(_, ref e) | ||
| | ExprKind::Field(ref e, _) | ||
| | ExprKind::AddrOf(_, _, ref e) |
There was a problem hiding this comment.
The ones in this file
clippy_lints/src/utils/hir_utils.rs
Outdated
|
|
||
| match (&left.kind, &right.kind) { | ||
| (&ExprKind::AddrOf(l_mut, ref le), &ExprKind::AddrOf(r_mut, ref re)) => { | ||
| (&ExprKind::AddrOf(_, l_mut, ref le), &ExprKind::AddrOf(_, r_mut, ref re)) => { |
There was a problem hiding this comment.
This should compare the BorrowKinds
clippy_lints/src/utils/hir_utils.rs
Outdated
|
|
||
| match e.kind { | ||
| ExprKind::AddrOf(m, ref e) => { | ||
| ExprKind::AddrOf(_, m, ref e) => { |
There was a problem hiding this comment.
This should hash the BorrowKind
clippy_lints/src/utils/inspector.rs
Outdated
| println!("{}seg: {:?}", ind, seg); | ||
| }, | ||
| hir::ExprKind::AddrOf(ref muta, ref e) => { | ||
| hir::ExprKind::AddrOf(_, ref muta, ref e) => { |
There was a problem hiding this comment.
This should print out the BorrowKind
|
Updated, added some more fixes @bors r+ |
|
📌 Commit ef05061 has been approved by |
Rustup Rustups: - rust-lang/rust#66671 (Ast address-of) - rust-lang/rust#64856 (Scope format! temporaries) changelog: none
|
💔 Test failed - status-appveyor |
|
@bors r+ |
|
📌 Commit 9aa58ed has been approved by |
Rustup to rustc 1.41.0-nightly (e87a205 2019-11-27) Rustups: - rust-lang/rust#66671 (Ast address-of) - rust-lang/rust#64856 (Scope format! temporaries) - http://github.com/rust-lang/rust/pull/66719 changelog: none
|
💔 Test failed - status-appveyor |
|
@bors r+ |
|
📌 Commit 40c91ec has been approved by |
Rustup to rustc 1.41.0-nightly (e87a205 2019-11-27) Rustups: - rust-lang/rust#66671 (Ast address-of) - rust-lang/rust#64856 (Scope format! temporaries) - http://github.com/rust-lang/rust/pull/66719 changelog: none
|
☀️ Test successful - checks-travis, status-appveyor |
|
Thanks! Hadn't had access to my dev machine the last 2 days! |
Rustups:
changelog: none