{rustc::util -> rustc_data_structures}::captures

This commit is contained in:
Mazdak Farrokhzad 2020-01-06 07:03:46 +01:00
parent 2db97ede27
commit 69b1e5cc3d
12 changed files with 13 additions and 12 deletions

View file

@ -0,0 +1,10 @@
/// "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
// FIXME(eddyb) false positive, the lifetime parameter is "phantom" but needed.
#[allow(unused_lifetimes)]
pub trait Captures<'a> {}
impl<'a, T: ?Sized> Captures<'a> for T {}

View file

@ -67,6 +67,7 @@ macro_rules! unlikely {
pub mod base_n;
pub mod binary_search_util;
pub mod box_region;
pub mod captures;
pub mod const_cstr;
pub mod flock;
pub mod fx;