Repository: rust-lang/rust
File: src/bootstrap/src/core/builder/tests.rs (Rust)

Code before:

    #[test]
    #[should_panic]
    fn check_compiler_stage_0() {
        let ctx = TestCtx::new();
        ctx.config("check").path("compiler").stage(0).run();
    }

    #[test]
    fn check_compiler_stage_1() {
        let ctx = TestCtx::new();
        insta::assert_snapshot!(
            ctx.config("check")
                .path("compiler")
                .stage(1)
                .render_steps(), @"[check] rustc 0 <host> -> rustc 1 <host> (74 crates)");
    }

    #[test]
    fn check_compiler_stage_2() {
        let ctx = TestCtx::new();
        insta::assert_snapshot!(
            ctx.config("check")
                .path("compiler")
                .stage(2)
                .render_steps(), @r"
        [build] llvm <host>
        [build] rustc 0 <host> -> rustc 1 <host>
        [build] rustc 1 <host> -> std 1 <host>
        [check] rustc 1 <host> -> rustc 2 <host> (74 crates)
        ");
    }

    #[test]
    fn check_cross_compile() {
        let ctx = TestCtx::new();
        insta::assert_snapshot!(
            ctx.config("check")
                .targets(&[TEST_TRIPLE_1])
                .hosts(&[TEST_TRIPLE_1])
                .render_steps(), @r"
        [build] llvm <host>
        [build] rustc 0 <host> -> rustc 1 <host>
        [build] rustc 1 <host> -> std 1 <host>
        [check] rustc 1 <host> -> std 1 <target1>
        [check] rustc 1 <host> -> rustc 2 <target1> (74 crates)
        [check] rustc 1 <host> -> rustc 2 <target1>
        [check] rustc 1 <host> -> Rustdoc 2 <target1>
        [check] rustc 1 <host> -> rustc_codegen_cranelift 2 <target1>
        [check] rustc 1 <host> -> rustc_codegen_gcc 2 <target1>
        [check] rustc 1 <host> -> Clippy 2 <target1>

Review comment (suggestion):
I don't understand the change from `@r` to `@` here, it's just what `cargo insta` did for me.

Code after:

    #[test]
    #[should_panic]
    fn check_compiler_stage_0() {
        let ctx = TestCtx::new();
        ctx.config("check").path("compiler").stage(0).run();
    }

    #[test]
    fn check_compiler_stage_1() {
        let ctx = TestCtx::new();
        insta::assert_snapshot!(
            ctx.config("check")
                .path("compiler")
                .stage(1)
                .render_steps(), @"[check] rustc 0 <host> -> rustc 1 <host> (73 crates)");
    }

    #[test]
    fn check_compiler_stage_2() {
        let ctx = TestCtx::new();
        insta::assert_snapshot!(
            ctx.config("check")
                .path("compiler")
                .stage(2)
                .render_steps(), @"
        [build] llvm <host>
        [build] rustc 0 <host> -> rustc 1 <host>
        [build] rustc 1 <host> -> std 1 <host>
        [check] rustc 1 <host> -> rustc 2 <host> (73 crates)
        ");
    }

    #[test]
    fn check_cross_compile() {
        let ctx = TestCtx::new();
        insta::assert_snapshot!(
            ctx.config("check")
                .targets(&[TEST_TRIPLE_1])
                .hosts(&[TEST_TRIPLE_1])
                .render_steps(), @"
        [build] llvm <host>
        [build] rustc 0 <host> -> rustc 1 <host>
        [build] rustc 1 <host> -> std 1 <host>
        [check] rustc 1 <host> -> std 1 <target1>
        [check] rustc 1 <host> -> rustc 2 <target1> (73 crates)
        [check] rustc 1 <host> -> rustc 2 <target1>
        [check] rustc 1 <host> -> Rustdoc 2 <target1>
        [check] rustc 1 <host> -> rustc_codegen_cranelift 2 <target1>
        [check] rustc 1 <host> -> rustc_codegen_gcc 2 <target1>
        [check] rustc 1 <host> -> Clippy 2 <target1>