Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Positive coverage: borrow_check_statement / print

print
LineCoverageSource
337✗(borrow_check_expr(
env,
assumptions,
state,
expr,
places_live_on_exit
) => (_expr_ty, state))
──────── ("print")
34575(borrow_check_statement(env, assumptions, state, Stmt::Print { expr }, places_live_on_exit) => (env, state))

75 tests exercised this rule:


Source location: tests/borrowck.rs:23 (all coverage from this test)

fn main() -> () { println!(1_u32); }
}])
cution_step_limit(10)
rowck_ok();
}

#[test]
tion_limit_skipped_execution_needs_no_steps() {
program = crates![crate Foo {
fn example() -> () {}
}];

alityTest::new(program)
.execution_step_limit(0)
.skip_execute()
.borrowck_ok();
}

#[test]
tion_limit_default_allowance_runs_small_programs() {
program = crates![crate Foo {
fn main() -> () { println!(1_u32); }
}];
alityTest::new(program)
.expect_output("1\n")
.borrowck_ok();
}

#[test]
tion_limit_borrowck_finishes_on_last_allowed_step() {
alityTest::new(crates![crate Foo {
fn main() -> () { println!(1_u32); }
}])
cution_step_limit(11)
ect_output("1\n")
rowck_ok();
}

#[test]
_panic(expected = "execution step limit reached after 0 steps")]
tion_limit_borrowck_zero_allowance_prevents_execution() {
alityTest::new(crates![crate Foo {
fn main() -> () { println!(1_u32); }
}])
cution_step_limit(0)
rowck_ok();
}

#[test]
_panic(expected = "program output mismatch")]
wck_checks_output_expectation() {
alityTest::new(crates![crate Foo {
fn main() -> () { println!(1_u32); }
}])
ect_output("999\n")
rowck_ok();
}

#[test]
wck_accepts_matching_output() {
alityTest::new(crates![crate Foo {
fn main() -> () { println!(1_u32); }
}])
ect_output("1\n")
rowck_ok();
}

#[test]
wck_skipped_execution_does_not_check_output() {
program = crates![crate Foo {
fn example() -> () {}
}];

alityTest::new(program)
.expect_output("999\n")
.skip_execute()
.borrowck_ok();
}

==============================================================
alization and move tracking tests
//
 tests exercise the initialization/move analysis. Currently
lity does not track initialization or moves, so tests that
t errors are #[ignore]d. Tests that expect success pass today
ously, since there's no init checking to reject them).
==============================================================

of an uninitialized variable should be an error.
///
ust,ignore
oo() -> u32 {
let x: u32;
x  // ERROR: x isn't initialized
/// }
/// ```
#[test]
f_uninitialized_variable() {
alityTest::new(crates![crate Foo {
fn foo() -> u32 {
    let x: u32;
    return x;
}
Proof tree
… (200 of 3381 nodes shown)

Source location: tests/borrowck.rs:45 (all coverage from this test)

fn main() -> () { println!(1_u32); }
}];
alityTest::new(program)
.expect_output("1\n")
.borrowck_ok();
}

#[test]
tion_limit_borrowck_finishes_on_last_allowed_step() {
alityTest::new(crates![crate Foo {
fn main() -> () { println!(1_u32); }
}])
cution_step_limit(11)
ect_output("1\n")
rowck_ok();
}

#[test]
_panic(expected = "execution step limit reached after 0 steps")]
tion_limit_borrowck_zero_allowance_prevents_execution() {
alityTest::new(crates![crate Foo {
fn main() -> () { println!(1_u32); }
}])
cution_step_limit(0)
rowck_ok();
}

#[test]
_panic(expected = "program output mismatch")]
wck_checks_output_expectation() {
alityTest::new(crates![crate Foo {
fn main() -> () { println!(1_u32); }
}])
ect_output("999\n")
rowck_ok();
}

#[test]
wck_accepts_matching_output() {
alityTest::new(crates![crate Foo {
fn main() -> () { println!(1_u32); }
}])
ect_output("1\n")
rowck_ok();
}

#[test]
wck_skipped_execution_does_not_check_output() {
program = crates![crate Foo {
fn example() -> () {}
}];

alityTest::new(program)
.expect_output("999\n")
.skip_execute()
.borrowck_ok();
}

==============================================================
alization and move tracking tests
//
 tests exercise the initialization/move analysis. Currently
lity does not track initialization or moves, so tests that
t errors are #[ignore]d. Tests that expect success pass today
ously, since there's no init checking to reject them).
==============================================================

of an uninitialized variable should be an error.
///
ust,ignore
oo() -> u32 {
let x: u32;
x  // ERROR: x isn't initialized
/// }
/// ```
#[test]
f_uninitialized_variable() {
alityTest::new(crates![crate Foo {
fn foo() -> u32 {
    let x: u32;
    return x;
}
Proof tree
… (200 of 3381 nodes shown)

Source location: tests/borrowck.rs:55 (all coverage from this test)

fn main() -> () { println!(1_u32); }
}])
cution_step_limit(11)
ect_output("1\n")
rowck_ok();
}

#[test]
_panic(expected = "execution step limit reached after 0 steps")]
tion_limit_borrowck_zero_allowance_prevents_execution() {
alityTest::new(crates![crate Foo {
fn main() -> () { println!(1_u32); }
}])
cution_step_limit(0)
rowck_ok();
}

#[test]
_panic(expected = "program output mismatch")]
wck_checks_output_expectation() {
alityTest::new(crates![crate Foo {
fn main() -> () { println!(1_u32); }
}])
ect_output("999\n")
rowck_ok();
}

#[test]
wck_accepts_matching_output() {
alityTest::new(crates![crate Foo {
fn main() -> () { println!(1_u32); }
}])
ect_output("1\n")
rowck_ok();
}

#[test]
wck_skipped_execution_does_not_check_output() {
program = crates![crate Foo {
fn example() -> () {}
}];

alityTest::new(program)
.expect_output("999\n")
.skip_execute()
.borrowck_ok();
}

==============================================================
alization and move tracking tests
//
 tests exercise the initialization/move analysis. Currently
lity does not track initialization or moves, so tests that
t errors are #[ignore]d. Tests that expect success pass today
ously, since there's no init checking to reject them).
==============================================================

of an uninitialized variable should be an error.
///
ust,ignore
oo() -> u32 {
let x: u32;
x  // ERROR: x isn't initialized
/// }
/// ```
#[test]
f_uninitialized_variable() {
alityTest::new(crates![crate Foo {
fn foo() -> u32 {
    let x: u32;
    return x;
}
Proof tree
… (200 of 3381 nodes shown)

Source location: tests/borrowck.rs:65 (all coverage from this test)

fn main() -> () { println!(1_u32); }
}])
cution_step_limit(0)
rowck_ok();
}

#[test]
_panic(expected = "program output mismatch")]
wck_checks_output_expectation() {
alityTest::new(crates![crate Foo {
fn main() -> () { println!(1_u32); }
}])
ect_output("999\n")
rowck_ok();
}

#[test]
wck_accepts_matching_output() {
alityTest::new(crates![crate Foo {
fn main() -> () { println!(1_u32); }
}])
ect_output("1\n")
rowck_ok();
}

#[test]
wck_skipped_execution_does_not_check_output() {
program = crates![crate Foo {
fn example() -> () {}
}];

alityTest::new(program)
.expect_output("999\n")
.skip_execute()
.borrowck_ok();
}

==============================================================
alization and move tracking tests
//
 tests exercise the initialization/move analysis. Currently
lity does not track initialization or moves, so tests that
t errors are #[ignore]d. Tests that expect success pass today
ously, since there's no init checking to reject them).
==============================================================

of an uninitialized variable should be an error.
///
ust,ignore
oo() -> u32 {
let x: u32;
x  // ERROR: x isn't initialized
/// }
/// ```
#[test]
f_uninitialized_variable() {
alityTest::new(crates![crate Foo {
fn foo() -> u32 {
    let x: u32;
    return x;
}
Proof tree
… (200 of 3381 nodes shown)

Source location: tests/borrowck.rs:75 (all coverage from this test)

fn main() -> () { println!(1_u32); }
}])
ect_output("999\n")
rowck_ok();
}

#[test]
wck_accepts_matching_output() {
alityTest::new(crates![crate Foo {
fn main() -> () { println!(1_u32); }
}])
ect_output("1\n")
rowck_ok();
}

#[test]
wck_skipped_execution_does_not_check_output() {
program = crates![crate Foo {
fn example() -> () {}
}];

alityTest::new(program)
.expect_output("999\n")
.skip_execute()
.borrowck_ok();
}

==============================================================
alization and move tracking tests
//
 tests exercise the initialization/move analysis. Currently
lity does not track initialization or moves, so tests that
t errors are #[ignore]d. Tests that expect success pass today
ously, since there's no init checking to reject them).
==============================================================

of an uninitialized variable should be an error.
///
ust,ignore
oo() -> u32 {
let x: u32;
x  // ERROR: x isn't initialized
/// }
/// ```
#[test]
f_uninitialized_variable() {
alityTest::new(crates![crate Foo {
fn foo() -> u32 {
    let x: u32;
    return x;
}
Proof tree
… (200 of 3381 nodes shown)

Source location: tests/borrowck.rs:84 (all coverage from this test)

fn main() -> () { println!(1_u32); }
}])
ect_output("1\n")
rowck_ok();
}

#[test]
wck_skipped_execution_does_not_check_output() {
program = crates![crate Foo {
fn example() -> () {}
}];

alityTest::new(program)
.expect_output("999\n")
.skip_execute()
.borrowck_ok();
}

==============================================================
alization and move tracking tests
//
 tests exercise the initialization/move analysis. Currently
lity does not track initialization or moves, so tests that
t errors are #[ignore]d. Tests that expect success pass today
ously, since there's no init checking to reject them).
==============================================================

of an uninitialized variable should be an error.
///
ust,ignore
oo() -> u32 {
let x: u32;
x  // ERROR: x isn't initialized
/// }
/// ```
#[test]
f_uninitialized_variable() {
alityTest::new(crates![crate Foo {
fn foo() -> u32 {
    let x: u32;
    return x;
}
Proof tree
… (200 of 3381 nodes shown)

Source location: tests/codegen.rs:22 (all coverage from this test)

fn main() -> () { println!(1_u32); }
}])
cution_step_limit(20)
ect_output("1\n")
);
}

#[test]
tion_limit_finishes_on_last_allowed_step() {
his program currently takes 11 MiniRust steps, including MachineStop.
alityTest::new(crates![crate Foo {
fn main() -> () { println!(1_u32); }
}])
cution_step_limit(11)
ect_output("1\n")
);
}

#[test]
_panic(expected = "execution step limit reached after 10 steps")]
tion_limit_stops_when_allowance_is_too_small() {
alityTest::new(crates![crate Foo {
fn main() -> () { println!(1_u32); }
}])
cution_step_limit(10)
);
}

#[test]
tion_limit_skipped_execution_needs_no_steps() {
program = crates![crate Foo {
fn example() -> () {}
}];

alityTest::new(program)
.execution_step_limit(0)
.skip_execute()
.ok();
}

#[test]
tion_limit_default_allowance_runs_small_programs() {
program = crates![crate Foo {
fn main() -> () { println!(1_u32); }
}];
alityTest::new(program).expect_output("1\n").ok();
}

#[test]
_panic(expected = "execution step limit reached after 0 steps")]
tion_limit_zero_allowance_prevents_execution() {
alityTest::new(crates![crate Foo {
fn main() -> () { println!(1_u32); }
}])
cution_step_limit(0)
);
}

#[test]
_panic(expected = "program output mismatch")]
ecks_output_expectation() {
alityTest::new(crates![crate Foo {
fn main() -> () { println!(1_u32); }
}])
ect_output("999\n")
);
}

#[test]
ipped_execution_does_not_check_output() {
program = crates![crate Foo {
fn example() -> () {}
}];

alityTest::new(program)
.expect_output("999\n")
.skip_execute()
.ok();
}

#[test]
_world() {
alityTest::new(crates![crate test {
fn main() -> () {
    println!(22_i32);
}
Proof tree
… (200 of 3379 nodes shown)

Source location: tests/codegen.rs:33 (all coverage from this test)

fn main() -> () { println!(1_u32); }
}])
cution_step_limit(11)
ect_output("1\n")
);
}

#[test]
_panic(expected = "execution step limit reached after 10 steps")]
tion_limit_stops_when_allowance_is_too_small() {
alityTest::new(crates![crate Foo {
fn main() -> () { println!(1_u32); }
}])
cution_step_limit(10)
);
}

#[test]
tion_limit_skipped_execution_needs_no_steps() {
program = crates![crate Foo {
fn example() -> () {}
}];

alityTest::new(program)
.execution_step_limit(0)
.skip_execute()
.ok();
}

#[test]
tion_limit_default_allowance_runs_small_programs() {
program = crates![crate Foo {
fn main() -> () { println!(1_u32); }
}];
alityTest::new(program).expect_output("1\n").ok();
}

#[test]
_panic(expected = "execution step limit reached after 0 steps")]
tion_limit_zero_allowance_prevents_execution() {
alityTest::new(crates![crate Foo {
fn main() -> () { println!(1_u32); }
}])
cution_step_limit(0)
);
}

#[test]
_panic(expected = "program output mismatch")]
ecks_output_expectation() {
alityTest::new(crates![crate Foo {
fn main() -> () { println!(1_u32); }
}])
ect_output("999\n")
);
}

#[test]
ipped_execution_does_not_check_output() {
program = crates![crate Foo {
fn example() -> () {}
}];

alityTest::new(program)
.expect_output("999\n")
.skip_execute()
.ok();
}

#[test]
_world() {
alityTest::new(crates![crate test {
fn main() -> () {
    println!(22_i32);
}
Proof tree
… (200 of 3379 nodes shown)

Source location: tests/codegen.rs:43 (all coverage from this test)

fn main() -> () { println!(1_u32); }
}])
cution_step_limit(10)
);
}

#[test]
tion_limit_skipped_execution_needs_no_steps() {
program = crates![crate Foo {
fn example() -> () {}
}];

alityTest::new(program)
.execution_step_limit(0)
.skip_execute()
.ok();
}

#[test]
tion_limit_default_allowance_runs_small_programs() {
program = crates![crate Foo {
fn main() -> () { println!(1_u32); }
}];
alityTest::new(program).expect_output("1\n").ok();
}

#[test]
_panic(expected = "execution step limit reached after 0 steps")]
tion_limit_zero_allowance_prevents_execution() {
alityTest::new(crates![crate Foo {
fn main() -> () { println!(1_u32); }
}])
cution_step_limit(0)
);
}

#[test]
_panic(expected = "program output mismatch")]
ecks_output_expectation() {
alityTest::new(crates![crate Foo {
fn main() -> () { println!(1_u32); }
}])
ect_output("999\n")
);
}

#[test]
ipped_execution_does_not_check_output() {
program = crates![crate Foo {
fn example() -> () {}
}];

alityTest::new(program)
.expect_output("999\n")
.skip_execute()
.ok();
}

#[test]
_world() {
alityTest::new(crates![crate test {
fn main() -> () {
    println!(22_i32);
}
Proof tree
… (200 of 3379 nodes shown)

Source location: tests/codegen.rs:63 (all coverage from this test)

fn main() -> () { println!(1_u32); }
}];
alityTest::new(program).expect_output("1\n").ok();
}

#[test]
_panic(expected = "execution step limit reached after 0 steps")]
tion_limit_zero_allowance_prevents_execution() {
alityTest::new(crates![crate Foo {
fn main() -> () { println!(1_u32); }
}])
cution_step_limit(0)
);
}

#[test]
_panic(expected = "program output mismatch")]
ecks_output_expectation() {
alityTest::new(crates![crate Foo {
fn main() -> () { println!(1_u32); }
}])
ect_output("999\n")
);
}

#[test]
ipped_execution_does_not_check_output() {
program = crates![crate Foo {
fn example() -> () {}
}];

alityTest::new(program)
.expect_output("999\n")
.skip_execute()
.ok();
}

#[test]
_world() {
alityTest::new(crates![crate test {
fn main() -> () {
    println!(22_i32);
}
Proof tree
… (200 of 3379 nodes shown)

Source location: tests/codegen.rs:73 (all coverage from this test)

fn main() -> () { println!(1_u32); }
}])
cution_step_limit(0)
);
}

#[test]
_panic(expected = "program output mismatch")]
ecks_output_expectation() {
alityTest::new(crates![crate Foo {
fn main() -> () { println!(1_u32); }
}])
ect_output("999\n")
);
}

#[test]
ipped_execution_does_not_check_output() {
program = crates![crate Foo {
fn example() -> () {}
}];

alityTest::new(program)
.expect_output("999\n")
.skip_execute()
.ok();
}

#[test]
_world() {
alityTest::new(crates![crate test {
fn main() -> () {
    println!(22_i32);
}

Proof trees omitted for the remaining 65 tests; each one is on its test’s page in Coverage by test.


Source location: tests/codegen.rs:83 (all coverage from this test)

fn main() -> () { println!(1_u32); }
}])
ect_output("999\n")
);
}

#[test]
ipped_execution_does_not_check_output() {
program = crates![crate Foo {
fn example() -> () {}
}];

alityTest::new(program)
.expect_output("999\n")
.skip_execute()
.ok();
}

#[test]
_world() {
alityTest::new(crates![crate test {
fn main() -> () {
    println!(22_i32);
}

Source location: tests/codegen.rs:106 (all coverage from this test)

fn main() -> () {
    println!(22_i32);
}

Source location: tests/codegen.rs:119 (all coverage from this test)

fn main() -> () {
    println!(1_i32);
    println!(true);
    println!(false);
}

Source location: tests/codegen.rs:131 (all coverage from this test)

fn main() -> () {
    let x: i32 = 42_i32;
    println!(x);
}

Source location: tests/codegen.rs:144 (all coverage from this test)

fn main() -> () {
    let x: i32 = 1_i32;
    x = 2 _ i32;
    println!(x);
}

Source location: tests/codegen.rs:159 (all coverage from this test)

fn main() -> () {
    let y: i32 = add_one(1_i32);
    println!(y);
}

Source location: tests/codegen.rs:174 (all coverage from this test)

fn main() -> () {
    let y: i32 = identity::<i32>(42_i32);
    println!(y);
}

Source location: tests/codegen.rs:190 (all coverage from this test)

fn main() -> () {
    let x: i32 = 1_i32;
    if true {
        println!(x);
    } else {
        println!(0_i32);
    }
}

Source location: tests/codegen.rs:205 (all coverage from this test)

fn main() -> () {
    let x: i32 = 0_i32;
    'a: loop {
        println!(x);
        break 'a;
    }
}

Source location: tests/codegen.rs:222 (all coverage from this test)

fn main() -> () {
    {
        let x: i32 = 99_i32;
        println!(x);
    }
    exists<'a> {
        println!(1_i32);
    }
}

Source location: tests/codegen.rs:236 (all coverage from this test)

fn main() -> () {
    let p: Pair = Pair { x: 10_i32, y: 20_i32 };
    println!(p.x);
    println!(p.y);
}

Source location: tests/codegen.rs:251 (all coverage from this test)

fn main() -> () {
    let x: i32 = 42_i32;
    exists<'a> {
        let r: & 'a i32 = & 'a x;
        println!(*r);
    }
}

Source location: tests/codegen.rs:265 (all coverage from this test)

fn main() -> () {
    let a: usize = 100_usize;
    let b: isize = 200_isize;
    println!(a);
    println!(b);
}

Source location: tests/codegen.rs:282 (all coverage from this test)

fn main() -> () {
    let a: i32 = f(1_i32);
    let b: i32 = f(2_i32);
    let c: i32 = f(3_i32);
    println!(a);
    println!(b);
    println!(c);
}

Source location: tests/codegen.rs:295 (all coverage from this test)

fn main() -> () {
    let y: i32 = f(f(42_i32));
    println!(y);
}

Source location: tests/codegen.rs:312 (all coverage from this test)

fn main() -> () {
    let r: i32 = outer(7_i32);
    println!(r);
}

Source location: tests/codegen.rs:332 (all coverage from this test)

fn main() -> () {
    a();
}

Source location: tests/codegen.rs:345 (all coverage from this test)

fn main() -> () {
    let r: i32 = first::<i32, bool>(10_i32, true);
    println!(r);
}

Source location: tests/codegen.rs:358 (all coverage from this test)

fn main() -> () {
    let w: Wrapper<i32> = Wrapper::<i32> { val: 42_i32 };
    println!(w.val);
}

Source location: tests/codegen.rs:374 (all coverage from this test)

fn main() -> () {
    let p: Pair = Pair { x: 10_i32, y: 20_i32 };
    exists<'a> {
        let r: & 'a i32 = & 'a p.x;
        println!(*r);
    }
}

Source location: tests/codegen.rs:391 (all coverage from this test)

fn main() -> () {
    let p: Pair = Pair { x: 10_i32, y: 20_i32 };
    exists<'a> {
        let r: & 'a Pair = & 'a p;
        println!((*r).x);
        println!((*r).y);
    }
}

Source location: tests/codegen.rs:410 (all coverage from this test)

fn main() -> () {
    let x: i32 = 0_i32;
    'a: loop {
        if true {
            println!(x);
            break 'a;
        } else {
            continue 'a;
        }
    }
}

Source location: tests/codegen.rs:428 (all coverage from this test)

fn main() -> () {
    'outer: loop {
        println!(1_i32);
        'inner: loop {
            println!(2_i32);
            break 'outer;
        }
    }
    println!(3_i32);
}

Source location: tests/codegen.rs:448 (all coverage from this test)

fn main() -> () {
    'a: loop {
        if true {
            println!(1_i32);
            break 'a;
        } else {
            println!(2_i32);
            break 'a;
        }
    }
    println!(3_i32);
}

Source location: tests/codegen.rs:469 (all coverage from this test)

fn main() -> () {
    let x: i32 = 0_i32;
    'a: loop {
        if false {
            x = 1_i32;
            break 'a;
        } else {
            x = 2_i32;
            break 'a;
        }
    }
    println!(x);
}

Source location: tests/codegen.rs:485 (all coverage from this test)

fn main() -> () {
    let x: i32 = 1_i32;
    exists<'a> {
        let r: &'a mut i32 = &'a mut x;
        *r = 2_i32;
        println!(*r);
    }
}

Source location: tests/codegen.rs:501 (all coverage from this test)

fn main() -> () {
    let x: i32 = 42_i32;
    exists<'a> {
        let r1: & 'a i32 = & 'a x;
        let r2: & 'a i32 = & 'a *r1;
        println!(*r2);
    }
}

Source location: tests/codegen.rs:516 (all coverage from this test)

fn main() -> () {
    let x: i32 = 55_i32;
    exists<'a> {
        let r: & 'a i32 = & 'a x;
        println!(*r);
    }
}

Source location: tests/codegen.rs:532 (all coverage from this test)

fn main() -> () {
    let x: i32 = 0_i32;
    'a: loop {
        x = 77_i32;
        break 'a;
    }
    println!(x);
}

Source location: tests/codegen.rs:550 (all coverage from this test)

fn main() -> () {
    let x: i32 = 0_i32;
    'a: loop {
        {
            x = 88_i32;
            break 'a;
        }
    }
    println!(x);
}

Source location: tests/codegen.rs:566 (all coverage from this test)

fn main() -> () {
    'a: {
        println!(1_i32);
        break 'a;
        println!(2_i32);
    }
    println!(3_i32);
}

Source location: tests/codegen.rs:586 (all coverage from this test)

fn main() -> () {
    let x: u32 = 1_u32;
    exists<'a> {
        let r: &'a mut u32 = &'a mut x;
        let amount: u32 = update::<'a>(r);
        println!(amount);
    }
}

Source location: tests/codegen.rs:598 (all coverage from this test)

fn main() -> () {
    let x: i32 = 1_i32 + 2_i32;
    println!(x);
}

Source location: tests/codegen.rs:611 (all coverage from this test)

fn main() -> () {
    let x: u32 = 0_u32;
    x = 1_u32 + 2_u32 + 3_u32;
    println!(x);
}

Source location: tests/codegen.rs:628 (all coverage from this test)

fn main() -> () {
    println!(identity::<S>(7_u32));
}

Source location: tests/codegen.rs:640 (all coverage from this test)

fn main() -> () { println!(left() + right()); }
}])
tc_ok()
ect_output("1\n2\n30\n")
)
}

#[test]
ion_in_call_arguments() {
alityTest::new(crates![crate test {
fn sum(x: i32, y: i32) -> i32 { return x + y; }
fn main() -> () {
    println!(sum(1_i32 + 2_i32, sum(3_i32, 4_i32)));
}

Source location: tests/codegen.rs:653 (all coverage from this test)

fn main() -> () {
    println!(sum(1_i32 + 2_i32, sum(3_i32, 4_i32)));
}

Source location: tests/codegen.rs:677 (all coverage from this test)

fn main() -> () {
    let i_min: i128 = -170141183460469231731687303715884105728 _ i128;
    let i_max: i128 = 170141183460469231731687303715884105727 _ i128;
    let u_min: u128 = 0 _ u128;
    let u_max: u128 = 340282366920938463463374607431768211455 _ u128;
    println!(i_min);
    println!(i_max);
    println!(u_min);
    println!(u_max);
}

Source location: tests/codegen.rs:693 (all coverage from this test)

fn main() -> () {
    let s: S = S { b: second(), a: first() };
    println!(s.a);
    println!(s.b);
}

Source location: tests/codegen.rs:705 (all coverage from this test)

fn main() -> () {
    println!(10_i32 - 3_i32);
}

Source location: tests/codegen.rs:721 (all coverage from this test)

fn main() -> () {
    let w: Wrap<<S as Value>::Item> = Wrap::<<S as Value>::Item> { value: 7_u32 };
    println!(w.value);
}

Source location: tests/codegen.rs:733 (all coverage from this test)

fn main() -> () {
    println!(3_i32 - 10_i32);
}

Source location: tests/codegen.rs:745 (all coverage from this test)

fn main() -> () {
    println!(10_i32 - 3_i32 - 2_i32);
}

Source location: tests/codegen.rs:757 (all coverage from this test)

fn main() -> () {
    println!(10_i32 - 3_i32 + 2_i32);
}

Source location: tests/codegen.rs:769 (all coverage from this test)

fn main() -> () { println!(left() - right()); }
}])
tc_ok()
ect_output("1\n2\n7\n")
);
}

#[test]
er_subtraction_unsigned() {
alityTest::new(crates![crate Foo {
fn main() -> () {
    println!(10_u32 - 3_u32);
}

Source location: tests/codegen.rs:781 (all coverage from this test)

fn main() -> () {
    println!(10_u32 - 3_u32);
}

Source location: tests/codegen.rs:798 (all coverage from this test)

fn main() -> () {
    let x: <S as Outer>::Item = 7_u32;
    println!(x);
}

Source location: tests/codegen.rs:810 (all coverage from this test)

fn main() -> () {
    println!(10_i32 - (3_i32 - 2_i32));
}

Source location: tests/codegen.rs:822 (all coverage from this test)

fn main() -> () {
    println!(20_i32 - (10_i32 - (3_i32 - 1_i32)));
}

Source location: tests/codegen.rs:836 (all coverage from this test)

fn main() -> () {
    let x: i32 = 10_i32;
    (x = (x - 3_i32));
    println!(x);
}

Source location: tests/codegen.rs:891 (all coverage from this test)

fn main() -> () {
    println!(3_i32 * 4_i32);
}

Source location: tests/codegen.rs:905 (all coverage from this test)

fn main() -> () {
    println!(2_i32 + 3_i32 * 4_i32);
    println!(2_i32 * 3_i32 + 4_i32);
    println!(2_i32 + 3_i32 * 4_i32 * 2_i32);
}

Source location: tests/codegen.rs:927 (all coverage from this test)

fn main() -> () {
    println!(identity::<Number>(7_u32));
    println!(identity::<Flag>(true));
    println!(identity::<Number>(9_u32));
}

Source location: tests/codegen.rs:964 (all coverage from this test)

fn main() -> () {
    let x: u32 = 1_u32;
    exists<'a> {
        let r: &'a mut u32 = &'a mut x;
        x += update::<'a>(r);
    }
    println!(x);
}

Source location: tests/codegen.rs:976 (all coverage from this test)

fn main() -> () {
    println!(-3_i32 * 4_i32);
}

Source location: tests/codegen.rs:988 (all coverage from this test)

fn main() -> () {
    println!(3_u32 * 4_u32);
}

Source location: tests/codegen.rs:1000 (all coverage from this test)

fn main() -> () { println!(left() * right()); }
}])
tc_ok()
ect_output("1\n2\n12\n")
);
}

#[test]
plication_with_parentheses() {
alityTest::new(crates![crate Foo {
fn main() -> () {
    println!((2_i32 + 3_i32) * 4_i32);
    println!(2_i32 * (3_i32 + 4_i32));
}

Source location: tests/codegen.rs:1013 (all coverage from this test)

fn main() -> () {
    println!((2_i32 + 3_i32) * 4_i32);
    println!(2_i32 * (3_i32 + 4_i32));
}

Source location: tests/codegen.rs:1026 (all coverage from this test)

fn main() -> () {
    println!(20_i32 - 2_i32 * 3_i32);
    println!((20_i32 - 2_i32) * 3_i32);
}

Source location: tests/codegen.rs:1086 (all coverage from this test)

fn main() -> () {
    let x: u32 = 1_u32;
    x += 2_u32 + 3_u32;
    println!(x);
}

Source location: tests/codegen.rs:1102 (all coverage from this test)

fn main() -> () {
    let p: Pair = Pair { a: 1_u32, b: 10_u32 };
    p.b += p.a;
    println!(p.b);
}

Source location: tests/codegen.rs:1116 (all coverage from this test)

fn main() -> () {
    let x: u32 = 20_u32;
    x -= 2_u32 + 3_u32;
    println!(x);
}

Source location: tests/codegen.rs:1132 (all coverage from this test)

fn main() -> () {
    let p: Pair = Pair { a: 2_u32, b: 3_u32 };
    p.b *= p.a + 4_u32;
    println!(p.b);
    println!(p.a);
}

Source location: tests/functions.rs:70 (all coverage from this test)

fn main() {
    helper();
}

How to read this page