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
commit 9ac5cc86d7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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());