Open jf2048 opened 1 year ago
I suppose we can't use a lifetime param with glib::wrapper neither right?
You actually can :)
How? The lifetime params would need to match on $x:lifetime
instead of $x:ident
Hmm, I think then only generics work but lifetimes not.
Bug description
This struct holds a borrowed reference to a
TextBuffer
and needs a lifetime parameter to be safe. Background here: https://discourse.gnome.org/t/can-bindings-for-textiter-be-memory-safe/13660Test case:
See also https://github.com/gtk-rs/gtk-rs-core/issues/610
Backtrace
First
println!
works, but the second one causes a segfault: