]> git.proxmox.com Git - rustc.git/blame - src/test/incremental/hello_world.rs
New upstream version 1.12.0+dfsg1
[rustc.git] / src / test / incremental / hello_world.rs
CommitLineData
1a4d82fc 1// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
223e47cc
LB
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
54a0048b 11// revisions: rpass1 rpass2
5bcae85e 12// compile-flags: -Z query-dep-graph
223e47cc 13
54a0048b
SL
14#![allow(warnings)]
15#![feature(rustc_attrs)]
85aaf69f 16
54a0048b 17fn main() { }
1a4d82fc 18
54a0048b
SL
19mod x {
20 #[cfg(rpass1)]
21 pub fn x() -> i32 {
22 1
23 }
1a4d82fc 24
54a0048b
SL
25 #[cfg(rpass2)]
26 pub fn x() -> i32 {
27 2
28 }
29}
223e47cc 30
54a0048b
SL
31mod y {
32 use x;
33
34 #[rustc_dirty(label="TypeckItemBody", cfg="rpass2")]
35 pub fn y() {
36 x::x();
37 }
38}
39
40mod z {
41 use y;
42
43 #[rustc_clean(label="TypeckItemBody", cfg="rpass2")]
44 pub fn z() {
45 y::y();
46 }
47}