mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-28 01:34:21 +00:00
Rustup for rust-lang/rust#84401
This commit is contained in:
parent
5faf5a5ca0
commit
b30c5fef5b
@ -26,7 +26,7 @@ impl rustc_driver::Callbacks for MiriCompilerCalls<'_> {
|
||||
|
||||
self.bencher.iter(|| {
|
||||
let config = miri::MiriConfig::default();
|
||||
miri::eval_main(tcx, entry_def_id.to_def_id(), config);
|
||||
miri::eval_main(tcx, entry_def_id, config);
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -1 +1 @@
|
||||
06f0adb34570ba83fee391abeb0bec0eec28a234
|
||||
bcd696d722c04a0f8c34d884aa4ed2322f55cdd8
|
||||
|
@ -50,7 +50,7 @@ impl rustc_driver::Callbacks for MiriCompilerCalls {
|
||||
env::set_current_dir(cwd).unwrap();
|
||||
}
|
||||
|
||||
if let Some(return_code) = miri::eval_main(tcx, entry_def_id.to_def_id(), config) {
|
||||
if let Some(return_code) = miri::eval_main(tcx, entry_def_id, config) {
|
||||
std::process::exit(
|
||||
i32::try_from(return_code).expect("Return value was too large!"),
|
||||
);
|
||||
|
@ -23,3 +23,7 @@ serde_derive = "1.0" # not actually used, but exercises some unique code path (`
|
||||
|
||||
[lib]
|
||||
test = false # test that this is respected (will show in the output)
|
||||
|
||||
[[test]]
|
||||
name = "main"
|
||||
harness = false
|
||||
|
@ -14,3 +14,7 @@ pub fn make_true() -> bool {
|
||||
issue_1760::use_the_dependency!();
|
||||
issue_1691::use_me()
|
||||
}
|
||||
|
||||
pub fn main() {
|
||||
println!("imported main");
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ running 1 test
|
||||
.
|
||||
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
|
||||
|
||||
imported main
|
||||
|
||||
running 7 tests
|
||||
..i....
|
||||
|
@ -3,6 +3,7 @@ running 1 test
|
||||
.
|
||||
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
|
||||
|
||||
imported main
|
||||
|
||||
running 7 tests
|
||||
..i....
|
||||
|
@ -3,6 +3,7 @@ running 0 tests
|
||||
|
||||
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 1 filtered out
|
||||
|
||||
imported main
|
||||
|
||||
running 1 test
|
||||
test simple1 ... ok
|
||||
|
@ -3,6 +3,7 @@ running 0 tests
|
||||
|
||||
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 1 filtered out
|
||||
|
||||
imported main
|
||||
|
||||
running 1 test
|
||||
test simple1 ... ok
|
||||
|
3
test-cargo-miri/tests/main.rs
Normal file
3
test-cargo-miri/tests/main.rs
Normal file
@ -0,0 +1,3 @@
|
||||
#![feature(imported_main)]
|
||||
|
||||
use cargo_miri_test::main;
|
7
tests/run-pass/main_fn.rs
Normal file
7
tests/run-pass/main_fn.rs
Normal file
@ -0,0 +1,7 @@
|
||||
#![feature(imported_main)]
|
||||
|
||||
mod foo {
|
||||
pub(crate) fn bar() {}
|
||||
}
|
||||
|
||||
use foo::bar as main;
|
Loading…
Reference in New Issue
Block a user