Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GDNativeCallbacks is not unsafe to implement, but the deprecated macros think it is #1076

Open
chitoyuu opened this issue Apr 11, 2024 · 0 comments
Labels

Comments

@chitoyuu
Copy link
Contributor

From Discord:

Compiling b v0.1.0 (C:\Users\Sloth\Documents\elem\b)
warning: use of deprecated macro `godot_init`: use the #[gdnative::init::callbacks] attribute macro instead
  --> src\lib.rs:23:1
   |
23 | godot_init!(init);
   | ^^^^^^^^^^
   |
   = note: `#[warn(deprecated)]` on by default

error[E0199]: implementing the trait `GDNativeCallbacks` is not unsafe
  --> src\lib.rs:23:1
   |
23 | godot_init!(init);
   | ^^^^^^^^^^^^^^^^^
   |
   = note: this error originates in the macro `godot_init` (in Nightly builds, run with -Z macro-backtrace for more info)
help: remove `unsafe` from this trait implementation
  --> C:\Users\Sloth\.cargo\git\checkouts\godot-rust-1005fa777d499fc2\639aae7\gdnative-core\src\init\macros.rs:16:13

16 -             unsafe impl $crate::init::GDNativeCallbacks for GDNativeCallbacksImpl {
16 +             impl $crate::init::GDNativeCallbacks for GDNativeCallbacksImpl {
   |

For more information about this error, try `rustc --explain E0199`.
warning: `b` (lib) generated 1 warning
error: could not compile `b` (lib) due to previous error; 1 warning emitted
``
@chitoyuu chitoyuu added the bug label Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant