Update mir-opt tests.

This commit is contained in:
Michael Woerister 2017-10-30 18:20:07 +01:00
parent 55c3b8ec66
commit 7d774c4214
5 changed files with 20 additions and 5 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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);