{rustc::util -> rustc_data_structures}::captures
This commit is contained in:
parent
2db97ede27
commit
69b1e5cc3d
12 changed files with 13 additions and 12 deletions
10
src/librustc_data_structures/captures.rs
Normal file
10
src/librustc_data_structures/captures.rs
Normal 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 {}
|
||||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue