Advertisement
wellthatsucks

Untitled

Feb 20th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.36 KB | None | 0 0
  1. error[E0309]: the parameter type `T` may not live long enough
  2. --> gstreamer-rtsp-server/src/r_t_s_p_media_factory.rs:15:132
  3. |
  4. 14 | fn add_role<'a, T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType> + StaticType>(&self, role: &str, v: T) {
  5. | -- help: consider adding an explicit lifetime bound `T: 'a`...
  6. 15 | ffi::gst_rtsp_media_factory_add_role(self.to_glib_none().0, role.to_glib_none().0, T::static_type().to_glib() as *const _, v.to_glib_none().0, ptr::null_mut::<u8>());
  7. | ^
  8. |
  9. note: ...so that the type `T` is not borrowed for too long
  10. --> gstreamer-rtsp-server/src/r_t_s_p_media_factory.rs:15:132
  11. |
  12. 15 | ffi::gst_rtsp_media_factory_add_role(self.to_glib_none().0, role.to_glib_none().0, T::static_type().to_glib() as *const _, v.to_glib_none().0, ptr::null_mut::<u8>());
  13. | ^
  14.  
  15. error[E0309]: the parameter type `T` may not live long enough
  16. --> gstreamer-rtsp-server/src/r_t_s_p_media_factory.rs:15:134
  17. |
  18. 14 | fn add_role<'a, T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType> + StaticType>(&self, role: &str, v: T) {
  19. | -- help: consider adding an explicit lifetime bound `T: 'a`...
  20. 15 | ffi::gst_rtsp_media_factory_add_role(self.to_glib_none().0, role.to_glib_none().0, T::static_type().to_glib() as *const _, v.to_glib_none().0, ptr::null_mut::<u8>());
  21. | ^^^^^^^^^^^^
  22. |
  23. note: ...so that the reference type `&'a T` does not outlive the data it points at
  24. --> gstreamer-rtsp-server/src/r_t_s_p_media_factory.rs:15:134
  25. |
  26. 15 | ffi::gst_rtsp_media_factory_add_role(self.to_glib_none().0, role.to_glib_none().0, T::static_type().to_glib() as *const _, v.to_glib_none().0, ptr::null_mut::<u8>());
  27. | ^^^^^^^^^^^^
  28.  
  29. error: aborting due to 2 previous errors
  30.  
  31. error: Could not compile `gstreamer-rtsp-server`.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement