Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Compiling gtkrsnotes v0.1.0 (file:///home/user1101/devel/code/rs/gtkrsnotes)
- error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements
- --> src/main.rs:30:48
- |
- 30 | let _ = button.connect_clicked(|_| {
- | ________________________________________________^
- 31 | | println!("Goodbye!");
- 32 | | gtk::Application::quit(app);
- 33 | | });
- | |_________________^
- |
- note: first, the lifetime cannot outlive the anonymous lifetime #2 defined on the body at 8:28...
- --> src/main.rs:8:28
- |
- 8 | uiapp.connect_activate(|app| {
- | ____________________________^
- 9 | | let aw = gtk::ApplicationWindow::new(app);
- 10 | | aw.set_title("Box demo");
- 11 | |
- ... |
- 41 | | aw.show_all();
- 42 | | });
- | |_____^
- = note: ...so that the types are compatible:
- expected &>k::Application
- found &>k::Application
- = note: but, the lifetime must be valid for the static lifetime...
- note: ...so that the type `[closure@src/main.rs:30:48: 33:18 app:&>k::Application]` will meet its required lifetime bounds
- --> src/main.rs:30:32
- |
- 30 | let _ = button.connect_clicked(|_| {
- | ^^^^^^^^^^^^^^^
- error: aborting due to previous error
- For more information about this error, try `rustc --explain E0495`.
- error: Could not compile `gtkrsnotes`.
- To learn more, run the command again with --verbose.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement