Rustup to rust-lang/rust#66936
This commit is contained in:
parent
b0c4744d57
commit
e2636729ec
109 changed files with 735 additions and 655 deletions
|
@ -29,7 +29,7 @@ declare_clippy_lint! {
|
|||
declare_lint_pass!(UselessVec => [USELESS_VEC]);
|
||||
|
||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UselessVec {
|
||||
fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx Expr) {
|
||||
fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx Expr<'_>) {
|
||||
// search for `&vec![_]` expressions where the adjusted type is `&[_]`
|
||||
if_chain! {
|
||||
if let ty::Ref(_, ty, _) = cx.tables.expr_ty_adjusted(expr).kind;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue