rust/compiler/rustc_data_structures/src/captures.rs

11 lines
462 B
Rust
Raw Normal View History

/// "Signaling" trait used in impl trait to tag lifetimes that you may
/// need to capture but don't really need for other reasons.
/// Basically a workaround; see [this comment] for details.
///
/// [this comment]: https://github.com/rust-lang/rust/issues/34511#issuecomment-373423999
2019-06-11 09:21:38 +00:00
// FIXME(eddyb) false positive, the lifetime parameter is "phantom" but needed.
#[allow(unused_lifetimes)]
2019-12-22 22:42:04 +00:00
pub trait Captures<'a> {}
2019-12-22 22:42:04 +00:00
impl<'a, T: ?Sized> Captures<'a> for T {}