mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 06:51:58 +00:00
Update mir-opt tests.
This commit is contained in:
parent
55c3b8ec66
commit
7d774c4214
@ -13,7 +13,10 @@ fn test(x: u32) -> u32 {
|
||||
y
|
||||
}
|
||||
|
||||
fn main() { }
|
||||
fn main() {
|
||||
// Make sure the function actually gets instantiated.
|
||||
test(0);
|
||||
}
|
||||
|
||||
// END RUST SOURCE
|
||||
// START rustc.node4.CopyPropagation.before.mir
|
||||
|
@ -18,7 +18,10 @@ fn bar(a: usize) -> Baz {
|
||||
Baz { x: a, y: 0.0, z: false }
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
fn main() {
|
||||
// Make sure the function actually gets instantiated.
|
||||
bar(0);
|
||||
}
|
||||
|
||||
// END RUST SOURCE
|
||||
// START rustc.node13.Deaggregator.before.mir
|
||||
|
@ -23,7 +23,10 @@ fn test1(x: bool, y: i32) -> Foo {
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
fn main() {
|
||||
// Make sure the function actually gets instantiated.
|
||||
test1(false, 0);
|
||||
}
|
||||
|
||||
// END RUST SOURCE
|
||||
// START rustc.node12.Deaggregator.before.mir
|
||||
|
@ -19,7 +19,10 @@ fn test(x: i32) -> [Foo; 2] {
|
||||
[Foo::A(x), Foo::A(x)]
|
||||
}
|
||||
|
||||
fn main() { }
|
||||
fn main() {
|
||||
// Make sure the function actually gets instantiated.
|
||||
test(0);
|
||||
}
|
||||
|
||||
// END RUST SOURCE
|
||||
// START rustc.node10.Deaggregator.before.mir
|
||||
|
@ -14,7 +14,10 @@ fn main() {
|
||||
let x = S.other(S.id());
|
||||
}
|
||||
|
||||
pub fn test() {
|
||||
// no_mangle and extern C to make sure this gets instantiated even in an
|
||||
// executable.
|
||||
#[no_mangle]
|
||||
pub extern "C" fn test() {
|
||||
let u = S;
|
||||
let mut v = S;
|
||||
drop(v);
|
||||
|
Loading…
Reference in New Issue
Block a user