Skip to content

Commit 9dfabdb

Browse files
authored
Merge pull request #8 from alexanderkjall/no-default-features
fix so that 'cargo test --no-default-features' compiles
2 parents f1093ed + 2cd286d commit 9dfabdb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
1010
#![deny(rustdoc::all)]
1111

12-
#[cfg(doc)]
12+
#[cfg(all(doc, feature = "proc-macro2"))]
1313
use proc_macro2::{Punct, Spacing};
1414

1515
#[cfg(feature = "proc-macro")]
@@ -34,7 +34,9 @@ mod sealed {
3434

3535
macro_rules! sealed {
3636
[$($ty:ident),* $(,)?] => {$(
37+
#[cfg(feature = "proc-macro")]
3738
impl Sealed for proc_macro::$ty {}
39+
#[cfg(feature = "proc-macro2")]
3840
impl Sealed for proc_macro2::$ty {}
3941
)*};
4042
}

0 commit comments

Comments
 (0)