Skip to content

Instantly share code, notes, and snippets.

@mitsuhiko
Created June 12, 2018 12:13
Show Gist options
  • Save mitsuhiko/bef20e36c69d80f1ed22241097d52b19 to your computer and use it in GitHub Desktop.
Save mitsuhiko/bef20e36c69d80f1ed22241097d52b19 to your computer and use it in GitHub Desktop.
pub fn add_scope_processor<F, B>(&mut self, f: F)
where
F: Fn(&mut Event) + Sync + Send,
Box<F>: im::shared::Shared<Box<Fn(&mut Event) + Sync + Send>>,
{
self.scope_processors = self.scope_processors.push_back(Box::new(f));
}
error[E0277]: the trait bound `for<'r, 's> std::ops::Fn(&'r mut sentry::v7::Event<'s>) + std::marker::Sync + std::marker::Send + 'static: std::marker::Sized` is not satisfied
--> examples/scope-processors.rs:15:15
|
15 | scope.add_scope_processor(|event| {
| ^^^^^^^^^^^^^^^^^^^ `for<'r, 's> std::ops::Fn(&'r mut sentry::v7::Event<'s>) + std::marker::Sync + std::marker::Send + 'static` does not have a constant size known at compile-time
|
= help: the trait `std::marker::Sized` is not implemented for `for<'r, 's> std::ops::Fn(&'r mut sentry::v7::Event<'s>) + std::marker::Sync + std::marker::Send + 'static`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment