File tree Expand file tree Collapse file tree 6 files changed +541
-0
lines changed
src/test/run-make/save-analysis-fail Expand file tree Collapse file tree 6 files changed +541
-0
lines changed Original file line number Diff line number Diff line change
1
+ -include ../tools.mk
2
+ all : code
3
+ krate2 : krate2.rs
4
+ $(RUSTC ) $<
5
+ code : foo.rs krate2
6
+ $(RUSTC ) foo.rs -Zsave-analysis-csv
7
+ $(RUSTC ) foo.rs -Zsave-analysis
8
+ $(RUSTC ) foo.rs -Zsave-analysis-api
Original file line number Diff line number Diff line change
1
+ // Copyright 2015 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
+ // sub-module in the same directory as the main crate file
12
+
13
+ pub struct SameStruct {
14
+ pub name : String
15
+ }
Original file line number Diff line number Diff line change
1
+ // Copyright 2015 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
+ pub fn hello ( x : isize ) {
12
+ println ! ( "macro {} :-(" , x) ;
13
+ }
Original file line number Diff line number Diff line change
1
+ // Copyright 2015 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
+ // sub-module in a sub-directory
12
+
13
+ use sub:: sub2 as msalias;
14
+ use sub:: sub2;
15
+
16
+ static yy: usize = 25 ;
17
+
18
+ mod sub {
19
+ pub mod sub2 {
20
+ pub mod sub3 {
21
+ pub fn hello ( ) {
22
+ println ! ( "hello from module 3" ) ;
23
+ }
24
+ }
25
+ pub fn hello ( ) {
26
+ println ! ( "hello from a module" ) ;
27
+ }
28
+
29
+ pub struct nested_struct {
30
+ pub field2 : u32 ,
31
+ }
32
+ }
33
+ }
34
+
35
+ pub struct SubStruct {
36
+ pub name : String
37
+ }
You can’t perform that action at this time.
0 commit comments