Skip to content

Commit 997a34b

Browse files
committed
allow(deprecated) for glib::CallbackGuard, until we formally remove it
Rust 1.24 made it so that a panic!() won't unwind across FFI boundaries: we won't unwind if we panic inside a Rust function declared extern "C". rust-lang/rust#46833 However, gnome-class does not formally mandate a particular Rust version; we've been running on the assumption that we are running on nightly, or "recent enough". For now, just supress the deprecation warnings from glib-rs, until we formalize our requirements for the rustc version.
1 parent ce69862 commit 997a34b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/glib_utils.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,11 @@ pub fn tokens_ParentClassFfi(class: &ast::Class) -> Tokens {
4141
}
4242

4343
pub fn glib_callback_guard() -> Tokens {
44+
// FIXME: remove this function if we formally declare that
45+
// gnome-class will require Rust 1.24 or later? That version made
46+
// glib::CallbackGuard obsolete.
4447
quote_cs! {
48+
#[allow(deprecated)]
4549
let _guard = glib::CallbackGuard::new();
4650
}
4751
}

0 commit comments

Comments
 (0)