Unnamed repository; edit this file 'description' to name the repository.
-rw-r--r--crates/hir-ty/src/next_solver/mapping.rs3
-rw-r--r--xtask/src/metrics.rs8
2 files changed, 9 insertions, 2 deletions
diff --git a/crates/hir-ty/src/next_solver/mapping.rs b/crates/hir-ty/src/next_solver/mapping.rs
index 3a3206bef3..4696cf479c 100644
--- a/crates/hir-ty/src/next_solver/mapping.rs
+++ b/crates/hir-ty/src/next_solver/mapping.rs
@@ -1147,6 +1147,9 @@ pub(crate) fn convert_ty_for_result<'db>(interner: DbInterner<'db>, ty: Ty<'db>)
}
}),
);
+
+ let p = shift_vars(interner, p, 1);
+
let where_clause = match p.skip_binder() {
rustc_type_ir::ExistentialPredicate::Trait(trait_ref) => {
let trait_ref = TraitRef::new(
diff --git a/xtask/src/metrics.rs b/xtask/src/metrics.rs
index c9eea87106..fd4b600b03 100644
--- a/xtask/src/metrics.rs
+++ b/xtask/src/metrics.rs
@@ -160,7 +160,7 @@ struct Host {
impl Metrics {
fn new(sh: &Shell) -> anyhow::Result<Metrics> {
- let host = Host::new(sh)?;
+ let host = Host::new(sh).unwrap_or_else(|_| Host::unknown());
let timestamp = SystemTime::now();
let revision = cmd!(sh, "git rev-parse HEAD").read()?;
let perf_revision = "a584462e145a0c04760fd9391daefb4f6bd13a99".into();
@@ -191,9 +191,13 @@ impl Metrics {
}
impl Host {
+ fn unknown() -> Host {
+ Host { os: "unknown".into(), cpu: "unknown".into(), mem: "unknown".into() }
+ }
+
fn new(sh: &Shell) -> anyhow::Result<Host> {
if cfg!(not(target_os = "linux")) {
- return Ok(Host { os: "unknown".into(), cpu: "unknown".into(), mem: "unknown".into() });
+ return Ok(Host::unknown());
}
let os = read_field(sh, "/etc/os-release", "PRETTY_NAME=")?.trim_matches('"').to_owned();