]> git.lizzy.rs Git - rust.git/commitdiff
Merge remote-tracking branch 'upstream/master' into rustup
authorPhilipp Krones <hello@philkrones.com>
Thu, 12 Jan 2023 17:59:59 +0000 (18:59 +0100)
committerPhilipp Krones <hello@philkrones.com>
Thu, 12 Jan 2023 17:59:59 +0000 (18:59 +0100)
1  2 
clippy_dev/src/lib.rs
clippy_lints/src/types/mod.rs
clippy_lints/src/utils/internal_lints/metadata_collector.rs
clippy_utils/src/lib.rs

index 80bb83af43b19106469fbee7523e575bf7e9543d,80bb83af43b19106469fbee7523e575bf7e9543d..e70488165b99bb2dec1fc07cb0e3d6d8ce800ff7
@@@ -5,6 -5,6 +5,9 @@@
  // warn on lints, that are included in `rust-lang/rust`s bootstrap
  #![warn(rust_2018_idioms, unused_lifetimes)]
  
++// The `rustc_driver` crate seems to be required in order to use the `rust_lexer` crate.
++#[allow(unused_extern_crates)]
++extern crate rustc_driver;
  extern crate rustc_lexer;
  
  use std::path::PathBuf;
Simple merge
index c86f24cbd3780d5300ad1b4d278668e125d8ddf9,929544cd69d5b96de9aabd3c2a80404818bbeaf2..c4d8c28f0606184bfee6ffd13299833935175681
@@@ -1058,7 -1058,7 +1058,7 @@@ fn get_parent_local<'hir>(cx: &LateCont
  fn get_parent_local_hir_id<'hir>(cx: &LateContext<'hir>, hir_id: hir::HirId) -> Option<&'hir hir::Local<'hir>> {
      let map = cx.tcx.hir();
  
-     match map.find_parent((hir_id)) {
 -    match map.find(map.get_parent_node(hir_id)) {
++    match map.find_parent(hir_id) {
          Some(hir::Node::Local(local)) => Some(local),
          Some(hir::Node::Pat(pattern)) => get_parent_local_hir_id(cx, pattern.hir_id),
          _ => None,
Simple merge