Here's one scenario that might invoke UB: create a top level widget, call destroy() [1] on it, then use the widget.
Does that invoke UB? If not, why not - how does Rust's ownership model interact with the GTK one?
[1] http://gtk-rs.org/docs/gtk/trait.WidgetExt.html#tymethod.des...
I thought that would settle the matter, but then I ran the unmodified code, and it generated essentially the same error messages. Filing a bug report right now.
The unsafe block is there because it does FFI, which hasn't actually been verified to be safe.
> The Rust compiler inherently doesn't trust ffi calls. That doesn't mean necessarily that the call is actually unsafe.
It's more that the possibility for UB now exists, than it definitely does.