File tree 5 files changed +36
-4
lines changed
5 files changed +36
-4
lines changed Original file line number Diff line number Diff line change @@ -528,10 +528,6 @@ RUSTC_ATTRS = {
528
528
"_extra_rustc_flags" : attr .label (
529
529
default = Label ("//:extra_rustc_flags" ),
530
530
),
531
- "_import_macro_dep" : attr .label (
532
- default = Label ("//util/import" ),
533
- cfg = "exec" ,
534
- ),
535
531
"_is_proc_macro_dep" : attr .label (
536
532
default = Label ("//rust/private:is_proc_macro_dep" ),
537
533
),
Original file line number Diff line number Diff line change @@ -493,6 +493,9 @@ def get_import_macro_deps(ctx):
493
493
list of Targets. Either empty (if the fake import macro implementation
494
494
is being used), or a singleton list with the real implementation.
495
495
"""
496
+ if not hasattr (ctx .attr , "_import_macro_dep" ):
497
+ return []
498
+
496
499
if ctx .attr ._import_macro_dep .label .name == "fake_import_macro_impl" :
497
500
return []
498
501
Original file line number Diff line number Diff line change
1
+ load ("//rust:defs.bzl" , "rust_binary" , "rust_library" )
2
+
3
+ rust_library (
4
+ name = "bar" ,
5
+ srcs = ["bar.rs" ],
6
+ edition = "2021" ,
7
+ )
8
+
9
+ genquery (
10
+ name = "bar_deps" ,
11
+ expression = "deps(//test/genquery:bar)" ,
12
+ scope = [":bar" ],
13
+ )
14
+
15
+ rust_binary (
16
+ name = "foo" ,
17
+ srcs = ["foo.rs" ],
18
+ edition = "2021" ,
19
+ deps = [":bar" ],
20
+ )
21
+
22
+ genquery (
23
+ name = "foo_deps" ,
24
+ expression = "deps(//test/genquery:foo)" ,
25
+ scope = [":foo" ],
26
+ )
Original file line number Diff line number Diff line change
1
+ pub fn bar ( ) {
2
+ println ! ( "Bar" ) ;
3
+ }
Original file line number Diff line number Diff line change
1
+ fn main ( ) {
2
+ println ! ( "foo" ) ;
3
+ bar:: bar ( ) ;
4
+ }
You can’t perform that action at this time.
0 commit comments