about summary refs log tree commit diff
path: root/tests/run-make/incremental-session-fail/rmake.rs
blob: c6927c8a9f16d1ec50ffee90406bcf2d107ed8be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Failing to create the directory where output incremental
// files would be stored used to cause an ICE (Internal Compiler
// Error). This was patched in #85698, and this test checks that
// the ensuing compilation failure is not an ICE.
// See https://github.com/rust-lang/rust/pull/85698

use run_make_support::{rfs, rustc};

fn main() {
    rfs::create_file("session");
    // rustc should fail to create the session directory here.
    let out = rustc().input("foo.rs").crate_type("rlib").incremental("session").run_fail();
    out.assert_stderr_contains("could not create incremental compilation crate directory");
    out.assert_stderr_not_contains("internal compiler error");
}