Make the rustc_data_structures dependency optional

This commit is contained in:
Nadrieril 2023-12-11 20:59:32 +01:00
parent 16bd6ac3ed
commit e646c9f723
5 changed files with 28 additions and 13 deletions

View file

@ -79,6 +79,13 @@ pub struct MatchArm<'p, Cx: MatchCx> {
impl<'p, Cx: MatchCx> Copy for MatchArm<'p, Cx> {}
#[cfg(not(feature = "rustc"))]
pub trait Captures<'a> {}
#[cfg(not(feature = "rustc"))]
impl<'a, T: ?Sized> Captures<'a> for T {}
#[cfg(feature = "rustc")]
pub use rustc_data_structures::captures::Captures;
/// The entrypoint for this crate. Computes whether a match is exhaustive and which of its arms are
/// useful, and runs some lints.
#[cfg(feature = "rustc")]