]> git.lizzy.rs Git - rust.git/blob - src/test/incremental/cache_file_headers.rs
Auto merge of #54497 - ralexstokes:stabilize_pattern_parentheses, r=nikomatsakis
[rust.git] / src / test / incremental / cache_file_headers.rs
1 // Copyright 2016 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
4 //
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
10
11 // This test case makes sure that the compiler does not try to re-use anything
12 // from the incremental compilation cache if the cache was produced by a
13 // different compiler version. This is tested by artificially forcing the
14 // emission of a different compiler version in the header of rpass1 artifacts,
15 // and then making sure that the only object file of the test program gets
16 // re-codegened although the program stays unchanged.
17
18 // The `l33t haxx0r` Rust compiler is known to produce incr. comp. artifacts
19 // that are outrageously incompatible with just about anything, even itself:
20 //[rpass1] rustc-env:RUSTC_FORCE_INCR_COMP_ARTIFACT_HEADER="l33t haxx0r rustc 2.1 LTS"
21
22 // revisions:rpass1 rpass2
23 // compile-flags: -Z query-dep-graph
24
25 #![feature(rustc_attrs)]
26 #![rustc_partition_codegened(module="cache_file_headers", cfg="rpass2")]
27
28 fn main() {
29     // empty
30 }