mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 06:44:35 +00:00
fix #107822, handle properly when there is no crate attrs
This commit is contained in:
parent
a00e24d76a
commit
b940f5088e
@ -628,7 +628,7 @@ fn print_crate_info(
|
|||||||
println!("{}", serde_json::to_string_pretty(&sess.target.to_json()).unwrap());
|
println!("{}", serde_json::to_string_pretty(&sess.target.to_json()).unwrap());
|
||||||
}
|
}
|
||||||
FileNames | CrateName => {
|
FileNames | CrateName => {
|
||||||
let attrs = attrs.as_ref().unwrap();
|
let Some(attrs) = attrs.as_ref() else { return Compilation::Continue; };
|
||||||
let t_outputs = rustc_interface::util::build_output_filenames(attrs, sess);
|
let t_outputs = rustc_interface::util::build_output_filenames(attrs, sess);
|
||||||
let id = rustc_session::output::find_crate_name(sess, attrs);
|
let id = rustc_session::output::find_crate_name(sess, attrs);
|
||||||
if *req == PrintRequest::CrateName {
|
if *req == PrintRequest::CrateName {
|
||||||
|
Loading…
Reference in New Issue
Block a user