From b576abd2cc9f854653607dc1a05b51a215b08fa5 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Wed, 22 Feb 2017 12:02:41 -0500 Subject: detect "bootstrap outputs" when serializing the dep-graph Fixes #39828. --- .../incremental/issue-39828/auxiliary/generic.rs | 18 ++++++++++++++++++ src/test/incremental/issue-39828/issue-39828.rs | 22 ++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 src/test/incremental/issue-39828/auxiliary/generic.rs create mode 100644 src/test/incremental/issue-39828/issue-39828.rs (limited to 'src/test') 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 or the MIT license +// , 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() { } 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 or the MIT license +// , 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() { } -- cgit 1.4.1-3-g733a5