Skip to content

Commit f2266bb

Browse files
authored
Rollup merge of rust-lang#90544 - ehuss:demote-locator-warn, r=petrochenkov
Demote metadata load warning to "info". There is a warn log message for whenever the crate loader fails to load metadata from a candidate file. I think this warning is too aggressive, as there are several situations where metadata information might not be found in a candidate file, which is normal. Also, this warning is somewhat confusing, and non-actionable in most cases for a user (most users will not know what it means). If the crate loader ultimately does not find a valid crate, then an error will be reported (and hopefully rust-lang#88368 will improve that error message). If a rustc developer wants to debug a loader problem, they can still use `RUSTC_LOG=rustc_metadata=debug` and get the details. There is more discussion of this particular warning at rust-lang#89795 (comment). Fixes rust-lang#90525
2 parents 1b3b0e4 + 9057936 commit f2266bb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/rustc_metadata/src/locator.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ use std::fmt::Write as _;
236236
use std::io::{Read, Result as IoResult, Write};
237237
use std::path::{Path, PathBuf};
238238
use std::{cmp, fmt, fs};
239-
use tracing::{debug, info, warn};
239+
use tracing::{debug, info};
240240

241241
#[derive(Clone)]
242242
crate struct CrateLocator<'a> {
@@ -549,7 +549,7 @@ impl<'a> CrateLocator<'a> {
549549
}
550550
}
551551
Err(err) => {
552-
warn!("no metadata found: {}", err);
552+
info!("no metadata found: {}", err);
553553
continue;
554554
}
555555
};

0 commit comments

Comments
 (0)