File tree 5 files changed +58
-0
lines changed
test/run-make/issue-38237
5 files changed +58
-0
lines changed Original file line number Diff line number Diff line change @@ -1006,6 +1006,7 @@ impl<'a, 'tcx> CrateMetadata {
1006
1006
let filter = match filter. map ( |def_id| self . reverse_translate_def_id ( def_id) ) {
1007
1007
Some ( Some ( def_id) ) => Some ( ( def_id. krate . as_u32 ( ) , def_id. index ) ) ,
1008
1008
Some ( None ) => return ,
1009
+ None if self . proc_macros . is_some ( ) => return ,
1009
1010
None => None ,
1010
1011
} ;
1011
1012
Original file line number Diff line number Diff line change
1
+ -include ../tools.mk
2
+
3
+ all :
4
+ $(RUSTC ) foo.rs; $(RUSTC ) bar.rs
5
+ $(RUSTDOC ) baz.rs -L $(TMPDIR ) -o $(TMPDIR )
Original file line number Diff line number Diff line change
1
+ // 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
+ #![ crate_type = "lib" ]
12
+
13
+ #[ derive( Debug ) ]
14
+ pub struct S ;
Original file line number Diff line number Diff line change
1
+ // 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
+ extern crate foo;
12
+ extern crate bar;
13
+
14
+ pub struct Bar ;
15
+ impl :: std:: ops:: Deref for Bar {
16
+ type Target = bar:: S ;
17
+ fn deref ( & self ) -> & Self :: Target { unimplemented ! ( ) }
18
+ }
Original file line number Diff line number Diff line change
1
+ // 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
+ #![ crate_type = "proc-macro" ]
12
+ #![ feature( proc_macro, proc_macro_lib) ]
13
+
14
+ extern crate proc_macro;
15
+
16
+ #[ proc_macro_derive( A ) ]
17
+ pub fn derive ( ts : proc_macro:: TokenStream ) -> proc_macro:: TokenStream { ts }
18
+
19
+ #[ derive( Debug ) ]
20
+ struct S ;
You can’t perform that action at this time.
0 commit comments