Merge remote-tracking branch 'upstream/master' into rustup

This commit is contained in:
Philipp Krones 2023-07-14 13:27:56 +02:00
commit 415fdb2d1a
No known key found for this signature in database
GPG key ID: 1CA0DF2AF59D68A5
522 changed files with 5251 additions and 2556 deletions

View file

@ -37,7 +37,7 @@ impl ClippyProjectInfo {
pub fn setup_rustc_src(rustc_path: &str) {
let Ok(rustc_source_dir) = check_and_get_rustc_dir(rustc_path) else {
return
return;
};
for project in CLIPPY_PROJECTS {

View file

@ -340,7 +340,10 @@ pub fn deprecate(name: &str, reason: Option<&String>) {
let name_upper = name.to_uppercase();
let (mut lints, deprecated_lints, renamed_lints) = gather_all();
let Some(lint) = lints.iter().find(|l| l.name == name_lower) else { eprintln!("error: failed to find lint `{name}`"); return; };
let Some(lint) = lints.iter().find(|l| l.name == name_lower) else {
eprintln!("error: failed to find lint `{name}`");
return;
};
let mod_path = {
let mut mod_path = PathBuf::from(format!("clippy_lints/src/{}", lint.module));