about summary refs log tree commit diff
path: root/src/librustc_data_structures/captures.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/librustc_data_structures/captures.rs')
-rw-r--r--src/librustc_data_structures/captures.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/librustc_data_structures/captures.rs b/src/librustc_data_structures/captures.rs
new file mode 100644
index 00000000000..26b90ebfd5f
--- /dev/null
+++ b/src/librustc_data_structures/captures.rs
@@ -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 {}