File tree Expand file tree Collapse file tree 4 files changed +102
-0
lines changed
callee_caller_cross_crate Expand file tree Collapse file tree 4 files changed +102
-0
lines changed Original file line number Diff line number Diff line change 1+ // Copyright 2014 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+ #![ crate_type="rlib" ]
12+
13+ #[ cfg( rpass1) ]
14+ pub fn function0 ( x : u32 ) -> u32 {
15+ x
16+ }
17+
18+ #[ cfg( rpass2) ]
19+ pub fn function0 ( x : i32 ) -> i32 {
20+ x
21+ }
22+
23+ pub fn function1 ( x : u32 ) {
24+ }
Original file line number Diff line number Diff line change 1+ // Copyright 2014 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+ // aux-build:a.rs
12+ // revisions:rpass1 rpass2
13+
14+ #![ feature( rustc_attrs) ]
15+
16+ extern crate a;
17+
18+ #[ rustc_dirty( label="TypeckItemBody" , cfg="rpass2" ) ]
19+ pub fn call_function0 ( ) {
20+ a:: function0 ( 77 ) ;
21+ }
22+
23+ #[ rustc_clean( label="TypeckItemBody" , cfg="rpass2" ) ]
24+ pub fn call_function1 ( ) {
25+ a:: function1 ( 77 ) ;
26+ }
27+
28+ pub fn main ( ) { }
Original file line number Diff line number Diff line change 1+ // Copyright 2014 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+ #![ crate_type="rlib" ]
12+
13+ #[ cfg( rpass1) ]
14+ pub type X = u32 ;
15+
16+ #[ cfg( rpass2) ]
17+ pub type X = i32 ;
18+
19+ pub type Y = char ;
20+
21+ pub fn foo ( ) { }
Original file line number Diff line number Diff line change 1+ // Copyright 2014 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+ // aux-build:a.rs
12+ // revisions:rpass1 rpass2
13+
14+ #![ feature( rustc_attrs) ]
15+
16+ extern crate a;
17+
18+ #[ rustc_dirty( label="TypeckItemBody" , cfg="rpass2" ) ]
19+ pub fn use_X ( ) -> u32 {
20+ let x: a:: X = 22 ;
21+ x as u32
22+ }
23+
24+ #[ rustc_clean( label="TypeckItemBody" , cfg="rpass2" ) ]
25+ pub fn use_Y ( ) {
26+ let x: a:: Y = 'c' ;
27+ }
28+
29+ pub fn main ( ) { }
You can’t perform that action at this time.
0 commit comments