blob: 410ff69bf69c5391169c13de2c775d876d2847f8 [file] [log] [blame]
Michael Woerister271fb222016-12-08 17:47:351// 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// Test that debuginfo does not introduce a dependency edge to the Krate
12// dep-node.
13
14// revisions:rpass1 rpass2
Michael Woeristere6badfd2017-09-28 09:58:4515// compile-flags: -Z query-dep-graph
16
Michael Woerister271fb222016-12-08 17:47:3517
18#![feature(rustc_attrs)]
19
20
21#![rustc_partition_translated(module="issue_38222-mod1", cfg="rpass2")]
22
23// If trans had added a dependency edge to the Krate dep-node, nothing would
24// be re-used, so checking that this module was re-used is sufficient.
25#![rustc_partition_reused(module="issue_38222", cfg="rpass2")]
26
27//[rpass1] compile-flags: -C debuginfo=1
28//[rpass2] compile-flags: -C debuginfo=1
29
30pub fn main() {
31 mod1::some_fn();
32}
33
34mod mod1 {
35 pub fn some_fn() {
36 let _ = 1;
37 }
38
39 #[cfg(rpass2)]
40 fn _some_other_fn() {
41 }
42}