Advertisement
Guest User

Untitled

a guest
Oct 17th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.51 KB | None | 0 0
  1. Compiling gtkrsnotes v0.1.0 (file:///home/user1101/devel/code/rs/gtkrsnotes)
  2. error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements
  3. --> src/main.rs:30:48
  4. |
  5. 30 | let _ = button.connect_clicked(|_| {
  6. | ________________________________________________^
  7. 31 | | println!("Goodbye!");
  8. 32 | | gtk::Application::quit(app);
  9. 33 | | });
  10. | |_________________^
  11. |
  12. note: first, the lifetime cannot outlive the anonymous lifetime #2 defined on the body at 8:28...
  13. --> src/main.rs:8:28
  14. |
  15. 8 | uiapp.connect_activate(|app| {
  16. | ____________________________^
  17. 9 | | let aw = gtk::ApplicationWindow::new(app);
  18. 10 | | aw.set_title("Box demo");
  19. 11 | |
  20. ... |
  21. 41 | | aw.show_all();
  22. 42 | | });
  23. | |_____^
  24. = note: ...so that the types are compatible:
  25. expected &&gtk::Application
  26. found &&gtk::Application
  27. = note: but, the lifetime must be valid for the static lifetime...
  28. note: ...so that the type `[closure@src/main.rs:30:48: 33:18 app:&&gtk::Application]` will meet its required lifetime bounds
  29. --> src/main.rs:30:32
  30. |
  31. 30 | let _ = button.connect_clicked(|_| {
  32. | ^^^^^^^^^^^^^^^
  33.  
  34. error: aborting due to previous error
  35.  
  36. For more information about this error, try `rustc --explain E0495`.
  37. error: Could not compile `gtkrsnotes`.
  38.  
  39. To learn more, run the command again with --verbose.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement