You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: tsap_macro/src/model.rs
+27-11
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
use syn::{Item,Ident,Type,Fields,GenericParam,FieldsUnnamed,PathArguments,AngleBracketedGenericArguments,GenericArgument,TypePath,punctuated::Punctuated, token::{Comma,Colon2},PathSegment,TypeTraitObject,TypeParamBound, visit::{self,Visit}, visit_mut::{self,VisitMut}};
1
+
use syn::{Item,Ident,Type,Fields,GenericParam,FieldsUnnamed, punctuated::Punctuated, token::Comma,PathSegment, visit::{self,Visit}, visit_mut::{self,VisitMut}};
2
2
use proc_macro_error::abort;
3
3
use quote::quote;
4
4
use proc_macro2::{TokenStream,Span};
@@ -33,30 +33,37 @@ impl VisitMut for ReplaceCheck {
33
33
}
34
34
}
35
35
36
+
/// Type of a field, either named in struct or unnamed in enums
37
+
///
38
+
/// Carries information whether we want to track check status of wrapped type
39
+
/// in `const_name` optionality.
36
40
#[derive(Debug,Clone)]
37
41
pubstructModelType{
38
42
wrapped:Type,
39
43
const_name:Option<Ident>,
40
44
}
41
45
42
46
implModelType{
47
+
/// Construct a field type with const generic parameter
48
+
///
49
+
/// Checks if const generic parameter exists in the wrapped type
0 commit comments