File tree Expand file tree Collapse file tree 5 files changed +58
-0
lines changed
test/run-make/issue-38237 Expand file tree Collapse file tree 5 files changed +58
-0
lines changed Original file line number Diff line number Diff line change @@ -1021,6 +1021,7 @@ impl<'a, 'tcx> CrateMetadata {
10211021 let filter = match filter. map ( |def_id| self . reverse_translate_def_id ( def_id) ) {
10221022 Some ( Some ( def_id) ) => Some ( ( def_id. krate . as_u32 ( ) , def_id. index ) ) ,
10231023 Some ( None ) => return ,
1024+ None if self . proc_macros . is_some ( ) => return ,
10241025 None => None ,
10251026 } ;
10261027
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