Skip to content

Commit df28708

Browse files
committed
Fix test-cargo-miri
1 parent d42a283 commit df28708

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

src/bin/miri.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,10 @@ impl rustc_driver::Callbacks for MiriBeRustCompilerCalls {
233233
#[allow(rustc::potential_query_instability)] // rustc_codegen_ssa (where this code is copied from) also allows this lint
234234
fn config(&mut self, config: &mut Config) {
235235
if config.opts.prints.is_empty() && self.target_crate {
236+
// Avoid warnings about unsupported crate types
237+
#[allow(rustc::bad_opt_access)]
238+
config.opts.crate_types.retain(|&c| c == CrateType::Executable || c == CrateType::Rlib);
239+
236240
// Queries overridden here affect the data stored in `rmeta` files of dependencies,
237241
// which will be used later in non-`MIRI_BE_RUSTC` mode.
238242
config.override_queries = Some(|_, local_providers| {

test-cargo-miri/Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test-cargo-miri/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[workspace]
2-
members = ["subcrate", "issue-1567", "exported-symbol-dep", "test-local-crate-detection"]
2+
members = ["cdylib", "subcrate", "issue-1567", "exported-symbol-dep", "test-local-crate-detection"]
33
exclude = ["no-std-smoke"] # it wants to be panic="abort"
44

55
[package]
@@ -10,7 +10,6 @@ edition = "2024"
1010

1111
[dependencies]
1212
byteorder = "1.0"
13-
cdylib = { path = "cdylib" }
1413
exported_symbol = { path = "exported-symbol" }
1514
proc_macro_crate = { path = "proc-macro-crate" }
1615
issue_1567 = { path = "issue-1567" }
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
subcrate,issue_1567,exported_symbol_dep,test_local_crate_detection,cargo_miri_test,cdylib,exported_symbol,issue_1691,issue_1705,issue_rust_86261,proc_macro_crate
1+
cdylib,subcrate,issue_1567,exported_symbol_dep,test_local_crate_detection,cargo_miri_test,exported_symbol,issue_1691,issue_1705,issue_rust_86261,proc_macro_crate

0 commit comments

Comments
 (0)