Rollup merge of #122187 - bjorn3:merge_header_version_checks, r=petrochenkov

Move metadata header and version checks together

This will make it easier to report rustc versions for older metadata formats.

Split out of https://github.com/rust-lang/rust/pull/120855
This commit is contained in:
Matthias Krüger
2024-03-09 16:21:17 +01:00
committed by GitHub
3 changed files with 79 additions and 45 deletions

View File

@@ -676,6 +676,7 @@ fn list_metadata(early_dcx: &EarlyDiagCtxt, sess: &Session, metadata_loader: &dy
metadata_loader,
&mut v,
&sess.opts.unstable_opts.ls,
sess.cfg_version,
)
.unwrap();
safe_println!("{}", String::from_utf8(v).unwrap());