Skip to content

Commit 8436755

Browse files
committed
Remove full-syntax feature
The primary use-case of full-syntax (complex discriminants) is now covered by syn even without full, so this feature is unnecessary. Since bumping the MSRV for syn to 1.56 is a breaking change, we can drop the full-syntax feature at the same time.
1 parent 80c5e5b commit 8436755

File tree

4 files changed

+2
-15
lines changed

4 files changed

+2
-15
lines changed

Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ syn = "2"
2222
num = "0.3"
2323
num-traits = "0.2"
2424

25-
[features]
26-
full-syntax = ["syn/full"]
27-
2825
[lib]
2926
name = "num_derive"
3027
proc-macro = true

ci/test_full.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ if ! check_version $MSRV ; then
2727
exit 1
2828
fi
2929

30-
FEATURES=(full-syntax)
30+
FEATURES=()
3131
echo "Testing supported features: ${FEATURES[*]}"
3232

3333
set -x

src/lib.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -71,19 +71,11 @@ use quote::quote;
7171
use syn::{Data, Fields, Ident};
7272

7373
/// Try to parse the tokens, or else return a compilation error
74-
/// suggesting "full-syntax" if that's not already enabled.
7574
macro_rules! parse {
7675
($tokens:ident as $type:ty) => {
7776
match syn::parse::<$type>($tokens) {
7877
Ok(parsed) => parsed,
79-
Err(mut error) => {
80-
if cfg!(not(feature = "full-syntax")) {
81-
let hint = syn::Error::new(
82-
Span::call_site(),
83-
r#"this might need the "full-syntax" feature of `num-derive`"#,
84-
);
85-
error.combine(hint);
86-
}
78+
Err(error) => {
8779
return TokenStream::from(error.to_compile_error());
8880
}
8981
}

tests/with_custom_values.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![cfg(feature = "full-syntax")]
12-
1311
extern crate num as num_renamed;
1412
#[macro_use]
1513
extern crate num_derive;

0 commit comments

Comments
 (0)