Make the crate compile on stable

This commit is contained in:
Nadrieril 2023-12-11 21:56:17 +01:00
parent f30c5956f5
commit 63c5b008e1
4 changed files with 25 additions and 3 deletions

View file

@ -555,7 +555,12 @@
use smallvec::{smallvec, SmallVec};
use std::fmt;
// It's not possible to only enable the `typed_arena` dependency when the `rustc` feature is off, so
// we use another feature instead. The crate won't compile if one of these isn't enabled.
#[cfg(feature = "rustc")]
use rustc_arena::TypedArena;
#[cfg(feature = "stable")]
use typed_arena::Arena as TypedArena;
use crate::constructor::{Constructor, ConstructorSet};
use crate::pat::{DeconstructedPat, WitnessPat};