Skip to content

Commit efd7f23

Browse files
authored
Merge pull request #1243 from Yarwin/add-gd-export-compile-error
Emit proper compile error while trying to `#[export]` `Gd<T>` or `DynGd<T, D>`.
2 parents 11ba6ee + aaa823f commit efd7f23

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

godot-core/src/registry/property.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ pub trait Var: GodotConvert {
6363
#[diagnostic::on_unimplemented(
6464
message = "`#[var]` properties require `Var` trait; #[export] ones require `Export` trait",
6565
label = "type cannot be used as a property",
66-
note = "see also: https://godot-rust.github.io/book/register/properties.html"
66+
note = "see also: https://godot-rust.github.io/book/register/properties.html",
67+
note = "`Gd` and `DynGd` cannot be exported directly; wrap them in `Option<...>` or `OnEditor<...>`."
6768
)]
6869
pub trait Export: Var {
6970
/// The export info to use for an exported field of this type, if no other export info is specified.

0 commit comments

Comments
 (0)