@@ -2,7 +2,7 @@ use std::cell::RefCell;
2
2
3
3
use proc_macro2:: Span ;
4
4
use proc_macro2:: TokenStream ;
5
- use quote:: { format_ident , quote_spanned} ;
5
+ use quote:: quote_spanned;
6
6
use quote:: { quote, ToTokens } ;
7
7
use syn:: parse:: ParseStream ;
8
8
use syn:: punctuated:: Punctuated ;
@@ -86,10 +86,6 @@ pub(crate) struct TypeAttr {
86
86
pub ( crate ) from_value : Option < syn:: Path > ,
87
87
/// Method to use to convert from value.
88
88
pub ( crate ) from_value_params : Option < syn:: punctuated:: Punctuated < syn:: Type , Token ! [ , ] > > ,
89
- #[ cfg( feature = "dynamic_fields" ) ]
90
- /// `#[rune(meta_fields = never|first|last|only)]` to allow meta fields on a type
91
- /// and when to access.
92
- pub ( crate ) meta_fields : Option < syn:: Ident > ,
93
89
}
94
90
95
91
/// Parsed variant attributes.
@@ -478,30 +474,6 @@ impl Context {
478
474
syn:: bracketed!( content in meta. input) ;
479
475
attr. from_value_params =
480
476
Some ( syn:: punctuated:: Punctuated :: parse_terminated ( & content) ?) ;
481
- } else if meta. path == META_FIELDS {
482
- #[ cfg( not( feature = "dynamic_fields" ) ) ]
483
- return Err ( syn:: Error :: new_spanned (
484
- & meta. path ,
485
- "Dynamic fields feature flag \" dynamic_fields\" is not enabled" ,
486
- ) ) ;
487
- #[ cfg( feature = "dynamic_fields" ) ]
488
- {
489
- meta. input . parse :: < Token ! [ =] > ( ) ?;
490
- let ty: syn:: Ident = meta. input . parse ( ) ?;
491
- let value = match ty. to_string ( ) . as_str ( ) {
492
- "never" => Some ( format_ident ! ( "Never" ) ) ,
493
- "first" => Some ( format_ident ! ( "First" ) ) ,
494
- "last" => Some ( format_ident ! ( "Last" ) ) ,
495
- "only" => Some ( format_ident ! ( "Only" ) ) ,
496
- _ => {
497
- return Err ( syn:: Error :: new_spanned (
498
- & meta. path ,
499
- "Expected `never`, `only`, `first` or `last`" ,
500
- ) )
501
- }
502
- } ;
503
- attr. meta_fields = value;
504
- }
505
477
} else {
506
478
return Err ( syn:: Error :: new_spanned (
507
479
& meta. path ,
@@ -632,8 +604,6 @@ impl Context {
632
604
from_value : path ( m, [ "runtime" , "FromValue" ] ) ,
633
605
full_type_of : path ( m, [ "runtime" , "FullTypeOf" ] ) ,
634
606
hash : path ( m, [ "Hash" ] ) ,
635
- dynamic_field_search : path ( m, [ "DynamicFieldSearch" ] ) ,
636
- dynamic_field_mode : path ( m, [ "DynamicFieldMode" ] ) ,
637
607
id : path ( m, [ "parse" , "Id" ] ) ,
638
608
install_with : path ( m, [ "__private" , "InstallWith" ] ) ,
639
609
into_iterator : path ( & core, [ "iter" , "IntoIterator" ] ) ,
@@ -726,8 +696,6 @@ pub(crate) struct Tokens {
726
696
pub ( crate ) from_value : syn:: Path ,
727
697
pub ( crate ) full_type_of : syn:: Path ,
728
698
pub ( crate ) hash : syn:: Path ,
729
- pub ( crate ) dynamic_field_search : syn:: Path ,
730
- pub ( crate ) dynamic_field_mode : syn:: Path ,
731
699
pub ( crate ) id : syn:: Path ,
732
700
pub ( crate ) install_with : syn:: Path ,
733
701
pub ( crate ) into_iterator : syn:: Path ,
0 commit comments