File tree Expand file tree Collapse file tree 2 files changed +2
-24
lines changed Expand file tree Collapse file tree 2 files changed +2
-24
lines changed Original file line number Diff line number Diff line change @@ -76,21 +76,6 @@ impl GodotClass for NoBase {
76
76
const INIT_LEVEL : InitLevel = InitLevel :: Core ; // arbitrary; never read.
77
77
}
78
78
79
- #[ diagnostic:: on_unimplemented(
80
- message = "expected base `{Self}` found `{A}`" ,
81
- label = "expected base `{Self}` found `{A}`"
82
- ) ]
83
- #[ doc( hidden) ]
84
- pub trait IsBase < T : GodotClass , A > {
85
- #[ doc( hidden) ]
86
- fn conv ( b : Base < T > ) -> A ;
87
- }
88
- impl < T : GodotClass > IsBase < T , Base < T > > for Base < T > {
89
- fn conv ( b : Base < T > ) -> Base < T > {
90
- b
91
- }
92
- }
93
-
94
79
unsafe impl Bounds for NoBase {
95
80
type Memory = bounds:: MemManual ;
96
81
type DynMemory = bounds:: MemManual ;
Original file line number Diff line number Diff line change @@ -230,14 +230,7 @@ impl ClassAttributes {
230
230
231
231
fn make_godot_init_impl ( class_name : & Ident , fields : & Fields ) -> TokenStream {
232
232
let base_init = if let Some ( Field { name, ty, .. } ) = & fields. base_field {
233
- let base_type =
234
- quote_spanned ! { ty. span( ) => <#class_name as :: godot:: obj:: GodotClass >:: Base } ;
235
- let base_field_type = quote_spanned ! { ty. span( ) => :: godot:: obj:: Base <#base_type> } ;
236
- let base = quote_spanned ! { ty. span( ) =>
237
- <#base_field_type as :: godot:: obj:: IsBase <#base_type, #ty>>:: conv( base)
238
- } ;
239
-
240
- quote_spanned ! { ty. span( ) => #name: #base, }
233
+ quote_spanned ! { ty. span( ) => #name: base, }
241
234
} else {
242
235
TokenStream :: new ( )
243
236
} ;
@@ -507,7 +500,7 @@ fn parse_fields(
507
500
is_well_formed = false ;
508
501
errors. push ( error ! (
509
502
parser. span( ) ,
510
- "The key `node` in attribute #[init] is mutually exclusive with the key `default`\n \
503
+ "The key `node` in attribute #[init] is mutually exclusive with the keys `default` and `val `\n \
511
504
Help: The syntax #[init(node = \" NodePath\" )] is equivalent to \
512
505
#[init(val = OnReady::node(\" NodePath\" ))], \
513
506
both aren't allowed since they would override each other"
You can’t perform that action at this time.
0 commit comments