File tree Expand file tree Collapse file tree 2 files changed +17
-17
lines changed Expand file tree Collapse file tree 2 files changed +17
-17
lines changed Original file line number Diff line number Diff line change @@ -2333,17 +2333,6 @@ impl schema::TomlTarget {
2333
2333
}
2334
2334
}
2335
2335
2336
- fn proc_macro ( & self ) -> Option < bool > {
2337
- self . proc_macro_raw . or ( self . proc_macro_raw2 ) . or_else ( || {
2338
- if let Some ( types) = self . crate_types ( ) {
2339
- if types. contains ( & "proc-macro" . to_string ( ) ) {
2340
- return Some ( true ) ;
2341
- }
2342
- }
2343
- None
2344
- } )
2345
- }
2346
-
2347
2336
fn validate_crate_types ( & self , target_kind_human : & str , warnings : & mut Vec < String > ) {
2348
2337
if self . crate_type . is_some ( ) && self . crate_type2 . is_some ( ) {
2349
2338
warn_on_deprecated (
@@ -2354,12 +2343,6 @@ impl schema::TomlTarget {
2354
2343
) ;
2355
2344
}
2356
2345
}
2357
-
2358
- fn crate_types ( & self ) -> Option < & Vec < String > > {
2359
- self . crate_type
2360
- . as_ref ( )
2361
- . or_else ( || self . crate_type2 . as_ref ( ) )
2362
- }
2363
2346
}
2364
2347
2365
2348
impl schema:: MaybeWorkspaceLints {
Original file line number Diff line number Diff line change @@ -939,6 +939,23 @@ impl TomlTarget {
939
939
pub fn new ( ) -> TomlTarget {
940
940
TomlTarget :: default ( )
941
941
}
942
+
943
+ pub fn proc_macro ( & self ) -> Option < bool > {
944
+ self . proc_macro_raw . or ( self . proc_macro_raw2 ) . or_else ( || {
945
+ if let Some ( types) = self . crate_types ( ) {
946
+ if types. contains ( & "proc-macro" . to_string ( ) ) {
947
+ return Some ( true ) ;
948
+ }
949
+ }
950
+ None
951
+ } )
952
+ }
953
+
954
+ pub fn crate_types ( & self ) -> Option < & Vec < String > > {
955
+ self . crate_type
956
+ . as_ref ( )
957
+ . or_else ( || self . crate_type2 . as_ref ( ) )
958
+ }
942
959
}
943
960
944
961
/// Corresponds to a `target` entry, but `TomlTarget` is already used.
You can’t perform that action at this time.
0 commit comments