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: glib/src/object.rs
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -63,6 +63,11 @@ pub unsafe trait ObjectType:
63
63
///
64
64
/// The trait can only be implemented if the appropriate `ToGlibPtr`
65
65
/// implementations exist.
66
+
#[diagnostic::on_unimplemented(
67
+
message = "the trait `glib::object::IsA<{T}>` is not implemented for `{Self}`",
68
+
label = "requires `{Self}` to be a GObject that can be statically cast to `{T}`",
69
+
note = "if this is your own object, use the `glib::wrapper!` macro to implement this trait: https://gtk-rs.org/gtk-rs-core/stable/latest/docs/glib/macro.wrapper.html"
0 commit comments