Merge pull request #20453 from jackh726/nts-part2

Fix webrender-2022 metrics - shift vars when mapping dyn
This commit is contained in:
Lukas Wirth 2025-08-14 21:27:42 +00:00 committed by GitHub
commit 0dbacbc957
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 2 deletions

View file

@ -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(

View file

@ -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();