Skip to content

Commit 111817f

Browse files
committed
fix
1 parent 553680f commit 111817f

File tree

2 files changed

+2
-24
lines changed

2 files changed

+2
-24
lines changed

godot-core/src/obj/traits.rs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -76,21 +76,6 @@ impl GodotClass for NoBase {
7676
const INIT_LEVEL: InitLevel = InitLevel::Core; // arbitrary; never read.
7777
}
7878

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-
9479
unsafe impl Bounds for NoBase {
9580
type Memory = bounds::MemManual;
9681
type DynMemory = bounds::MemManual;

godot-macros/src/class/derive_godot_class.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -230,14 +230,7 @@ impl ClassAttributes {
230230

231231
fn make_godot_init_impl(class_name: &Ident, fields: &Fields) -> TokenStream {
232232
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, }
241234
} else {
242235
TokenStream::new()
243236
};
@@ -507,7 +500,7 @@ fn parse_fields(
507500
is_well_formed = false;
508501
errors.push(error!(
509502
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\
511504
Help: The syntax #[init(node = \"NodePath\")] is equivalent to \
512505
#[init(val = OnReady::node(\"NodePath\"))], \
513506
both aren't allowed since they would override each other"

0 commit comments

Comments
 (0)