Make the rustc_data_structures
dependency optional
This commit is contained in:
parent
16bd6ac3ed
commit
e646c9f723
5 changed files with 28 additions and 13 deletions
|
@ -556,14 +556,20 @@ use smallvec::{smallvec, SmallVec};
|
|||
use std::fmt;
|
||||
|
||||
use rustc_arena::TypedArena;
|
||||
use rustc_data_structures::{captures::Captures, stack::ensure_sufficient_stack};
|
||||
|
||||
use crate::constructor::{Constructor, ConstructorSet};
|
||||
use crate::pat::{DeconstructedPat, WitnessPat};
|
||||
use crate::{MatchArm, MatchCx};
|
||||
use crate::{Captures, MatchArm, MatchCx};
|
||||
|
||||
use self::ValidityConstraint::*;
|
||||
|
||||
#[cfg(feature = "rustc")]
|
||||
use rustc_data_structures::stack::ensure_sufficient_stack;
|
||||
#[cfg(not(feature = "rustc"))]
|
||||
pub fn ensure_sufficient_stack<R>(f: impl FnOnce() -> R) -> R {
|
||||
f()
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
pub(crate) struct PatCtxt<'a, 'p, Cx: MatchCx> {
|
||||
pub(crate) cx: &'a Cx,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue