Files
neon/repro-problem
Christian Schwarz c4ddc6abaf got meaningful error:
error[E0521]: borrowed data escapes outside of method
     --> repro-problem/src/virtual_file.rs:702:51
      |
  692 | impl<'a> FileGuard<'a> {
      |      -- lifetime `'a` defined here
  ...
  695 |     fn with_std_file<F, R>(&mut self, with: F) -> R
      |                            --------- `self` is a reference that is only valid in the method body
  ...
  702 |         let mut file = unsafe { File::from_raw_fd(self.as_ref().as_raw_fd()) };
      |                                                   ^^^^^^^^^^^^^
      |                                                   |
      |                                                   `self` escapes the method body here
      |                                                   argument requires that `'a` must outlive `'static`
      |
      = note: requirement occurs because of a mutable reference to `FileGuard<'_>`
      = note: mutable references are invariant over their type parameter
      = help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
2023-12-11 17:18:40 +00:00
..
2023-12-11 17:18:40 +00:00
WIP
2023-12-11 17:16:26 +00:00