diff options
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/incremental/issue-39828/auxiliary/generic.rs | 18 | ||||
| -rw-r--r-- | src/test/incremental/issue-39828/issue-39828.rs | 22 |
2 files changed, 40 insertions, 0 deletions
diff --git a/src/test/incremental/issue-39828/auxiliary/generic.rs b/src/test/incremental/issue-39828/auxiliary/generic.rs new file mode 100644 index 00000000000..a562eab1768 --- /dev/null +++ b/src/test/incremental/issue-39828/auxiliary/generic.rs @@ -0,0 +1,18 @@ +// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// revisions:rpass1 rpass2 +// compile-flags: -Z query-dep-graph + +#![rustc_partition_reused(module="__rustc_fallback_codegen_unit", cfg="rpass2")] +#![feature(rustc_attrs)] + +#![crate_type="rlib"] +pub fn foo<T>() { } diff --git a/src/test/incremental/issue-39828/issue-39828.rs b/src/test/incremental/issue-39828/issue-39828.rs new file mode 100644 index 00000000000..c729380bd5a --- /dev/null +++ b/src/test/incremental/issue-39828/issue-39828.rs @@ -0,0 +1,22 @@ +// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// Regression test for #39828. If you make use of a module that +// consists only of generics, no code is generated, just a dummy +// module. The reduced graph consists of a single node (for that +// module) with no inputs. Since we only serialize edges, when we +// reload, we would consider that node dirty since it is not recreated +// (it is not the target of any edges). + +// revisions:rpass1 rpass2 +// aux-build:generic.rs + +extern crate generic; +fn main() { } |
