about summary refs log tree commit diff
diff options
context:
space:
mode:
authorYuki Okushi <jtitor@2k36.org>2021-11-05 10:32:44 +0900
committerGitHub <noreply@github.com>2021-11-05 10:32:44 +0900
commit6964ec2f72c500bb5577cbe4f9d5c34372223a12 (patch)
treef00ce59c800e63378730d86638f3da963eacde37
parenta5802d073105c4026af1dad4d315eed56e91352c (diff)
parent9057936a9aba6b85a3de119d061c7a7168f60ce8 (diff)
downloadrust-6964ec2f72c500bb5577cbe4f9d5c34372223a12.tar.gz
rust-6964ec2f72c500bb5577cbe4f9d5c34372223a12.zip
Rollup merge of #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 #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 https://github.com/rust-lang/rust/issues/89795#issuecomment-940798190.

Fixes #90525
-rw-r--r--compiler/rustc_metadata/src/locator.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_metadata/src/locator.rs b/compiler/rustc_metadata/src/locator.rs
index bbd30c9327a..8db2291dfcf 100644
--- a/compiler/rustc_metadata/src/locator.rs
+++ b/compiler/rustc_metadata/src/locator.rs
@@ -236,7 +236,7 @@ use std::fmt::Write as _;
 use std::io::{Read, Result as IoResult, Write};
 use std::path::{Path, PathBuf};
 use std::{cmp, fmt, fs};
-use tracing::{debug, info, warn};
+use tracing::{debug, info};
 
 #[derive(Clone)]
 crate struct CrateLocator<'a> {
@@ -549,7 +549,7 @@ impl<'a> CrateLocator<'a> {
                         }
                     }
                     Err(err) => {
-                        warn!("no metadata found: {}", err);
+                        info!("no metadata found: {}", err);
                         continue;
                     }
                 };