Skip to content

Commit 2b34ab0

Browse files
committed
Change feature to "arbitrary1".
The `dep:arbitrary` feature of cargo is unstable: https://doc.rust-lang.org/cargo/reference/unstable.html#namespaced-features
1 parent 42a7062 commit 2b34ab0

File tree

9 files changed

+41
-41
lines changed

9 files changed

+41
-41
lines changed

juniper/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ default = [
2626
"url",
2727
"uuid",
2828
]
29-
arbitrary = ["dep:arbitrary", "smartstring/arbitrary"]
29+
arbitrary1 = ["arbitrary", "smartstring/arbitrary"]
3030
expose-test-schema = ["anyhow", "serde_json"]
3131
graphql-parser-integration = ["graphql-parser"]
3232
scalar-naivetime = []

juniper/src/ast.rs

+11-11
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ pub enum Type<'a> {
2828
NonNullList(Box<Type<'a>>, Option<usize>),
2929
}
3030

31-
#[cfg(feature = "arbitrary")]
31+
#[cfg(feature = "arbitrary1")]
3232
impl<'a> arbitrary::Arbitrary<'a> for Type<'a> {
3333
fn arbitrary(u: &mut arbitrary::Unstructured<'a>) -> arbitrary::Result<Self> {
3434
let num_choices = 4;
@@ -57,7 +57,7 @@ impl<'a> arbitrary::Arbitrary<'a> for Type<'a> {
5757
/// Lists and objects variants are _spanned_, i.e. they contain a reference to
5858
/// their position in the source file, if available.
5959
#[derive(Clone, Debug, PartialEq)]
60-
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
60+
#[cfg_attr(feature = "arbitrary1", derive(arbitrary::Arbitrary))]
6161
pub enum InputValue<S = DefaultScalarValue> {
6262
Null,
6363
Scalar(S),
@@ -75,7 +75,7 @@ pub struct VariableDefinition<'a, S> {
7575
pub directives: Option<Vec<Spanning<Directive<'a, S>>>>,
7676
}
7777

78-
#[cfg(feature = "arbitrary")]
78+
#[cfg(feature = "arbitrary1")]
7979
impl<'a, S> arbitrary::Arbitrary<'a> for VariableDefinition<'a, S>
8080
where
8181
S: arbitrary::Arbitrary<'a>,
@@ -99,7 +99,7 @@ pub struct Arguments<'a, S> {
9999
pub items: Vec<(Spanning<&'a str>, Spanning<InputValue<S>>)>,
100100
}
101101

102-
#[cfg(feature = "arbitrary")]
102+
#[cfg(feature = "arbitrary1")]
103103
impl<'a, S> arbitrary::Arbitrary<'a> for Arguments<'a, S>
104104
where
105105
S: arbitrary::Arbitrary<'a>,
@@ -116,7 +116,7 @@ pub struct VariableDefinitions<'a, S> {
116116
pub items: Vec<(Spanning<&'a str>, VariableDefinition<'a, S>)>,
117117
}
118118

119-
#[cfg(feature = "arbitrary")]
119+
#[cfg(feature = "arbitrary1")]
120120
impl<'a, S> arbitrary::Arbitrary<'a> for VariableDefinitions<'a, S>
121121
where
122122
S: arbitrary::Arbitrary<'a>,
@@ -137,7 +137,7 @@ pub struct Field<'a, S> {
137137
pub selection_set: Option<Vec<Selection<'a, S>>>,
138138
}
139139

140-
#[cfg(feature = "arbitrary")]
140+
#[cfg(feature = "arbitrary1")]
141141
impl<'a, S> arbitrary::Arbitrary<'a> for Field<'a, S>
142142
where
143143
S: arbitrary::Arbitrary<'a>,
@@ -166,7 +166,7 @@ pub struct FragmentSpread<'a, S> {
166166
pub directives: Option<Vec<Spanning<Directive<'a, S>>>>,
167167
}
168168

169-
#[cfg(feature = "arbitrary")]
169+
#[cfg(feature = "arbitrary1")]
170170
impl<'a, S> arbitrary::Arbitrary<'a> for FragmentSpread<'a, S>
171171
where
172172
S: arbitrary::Arbitrary<'a>,
@@ -187,7 +187,7 @@ pub struct InlineFragment<'a, S> {
187187
pub selection_set: Vec<Selection<'a, S>>,
188188
}
189189

190-
#[cfg(feature = "arbitrary")]
190+
#[cfg(feature = "arbitrary1")]
191191
impl<'a, S> arbitrary::Arbitrary<'a> for InlineFragment<'a, S>
192192
where
193193
S: arbitrary::Arbitrary<'a>,
@@ -228,7 +228,7 @@ pub enum Selection<'a, S = DefaultScalarValue> {
228228
InlineFragment(Spanning<InlineFragment<'a, S>>),
229229
}
230230

231-
#[cfg(feature = "arbitrary")]
231+
#[cfg(feature = "arbitrary1")]
232232
impl<'a, S> arbitrary::Arbitrary<'a> for Selection<'a, S>
233233
where
234234
S: arbitrary::Arbitrary<'a>,
@@ -253,7 +253,7 @@ pub struct Directive<'a, S> {
253253
pub arguments: Option<Spanning<Arguments<'a, S>>>,
254254
}
255255

256-
#[cfg(feature = "arbitrary")]
256+
#[cfg(feature = "arbitrary1")]
257257
impl<'a, S> arbitrary::Arbitrary<'a> for Directive<'a, S>
258258
where
259259
S: arbitrary::Arbitrary<'a>,
@@ -266,7 +266,7 @@ where
266266
}
267267

268268
#[derive(Clone, PartialEq, Debug)]
269-
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
269+
#[cfg_attr(feature = "arbitrary1", derive(arbitrary::Arbitrary))]
270270
#[allow(missing_docs)]
271271
pub enum OperationType {
272272
Query,

juniper/src/parser/lexer.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pub struct Lexer<'a> {
2121
///
2222
/// This is only used for tagging how the lexer has interpreted a value literal
2323
#[derive(Debug, PartialEq, Clone, Copy)]
24-
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
24+
#[cfg_attr(feature = "arbitrary1", derive(arbitrary::Arbitrary))]
2525
#[allow(missing_docs)]
2626
pub enum ScalarToken<'a> {
2727
String(&'a str),
@@ -31,7 +31,7 @@ pub enum ScalarToken<'a> {
3131

3232
/// A single token in the input source
3333
#[derive(Debug, PartialEq, Clone, Copy)]
34-
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
34+
#[cfg_attr(feature = "arbitrary1", derive(arbitrary::Arbitrary))]
3535
#[allow(missing_docs)]
3636
pub enum Token<'a> {
3737
Name(&'a str),

juniper/src/parser/utils.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use std::fmt;
22

33
/// A reference to a line and column in an input source file
44
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Copy)]
5-
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
5+
#[cfg_attr(feature = "arbitrary1", derive(arbitrary::Arbitrary))]
66
pub struct SourcePosition {
77
index: usize,
88
line: usize,
@@ -15,7 +15,7 @@ pub struct SourcePosition {
1515
/// character pointed by the `start` field and ending just before the `end`
1616
/// marker.
1717
#[derive(Debug, Clone, PartialEq, Eq, Hash, Copy)]
18-
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
18+
#[cfg_attr(feature = "arbitrary1", derive(arbitrary::Arbitrary))]
1919
pub struct Spanning<T> {
2020
/// The wrapped item
2121
pub item: T,

juniper/src/schema/meta.rs

+16-16
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use crate::{
1717

1818
/// Whether an item is deprecated, with context.
1919
#[derive(Debug, PartialEq, Hash, Clone)]
20-
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
20+
#[cfg_attr(feature = "arbitrary1", derive(arbitrary::Arbitrary))]
2121
pub enum DeprecationStatus {
2222
/// The field/variant is not deprecated.
2323
Current,
@@ -55,7 +55,7 @@ pub struct ScalarMeta<'a, S> {
5555
pub(crate) parse_fn: for<'b> fn(ScalarToken<'b>) -> Result<S, ParseError<'b>>,
5656
}
5757

58-
#[cfg(feature = "arbitrary")]
58+
#[cfg(feature = "arbitrary1")]
5959
impl<'a, S> arbitrary::Arbitrary<'a> for ScalarMeta<'a, S>
6060
where
6161
S: arbitrary::Arbitrary<'a>,
@@ -114,7 +114,7 @@ where
114114

115115
/// List type metadata
116116
#[derive(Debug)]
117-
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
117+
#[cfg_attr(feature = "arbitrary1", derive(arbitrary::Arbitrary))]
118118
pub struct ListMeta<'a> {
119119
#[doc(hidden)]
120120
pub of_type: Type<'a>,
@@ -125,15 +125,15 @@ pub struct ListMeta<'a> {
125125

126126
/// Nullable type metadata
127127
#[derive(Debug)]
128-
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
128+
#[cfg_attr(feature = "arbitrary1", derive(arbitrary::Arbitrary))]
129129
pub struct NullableMeta<'a> {
130130
#[doc(hidden)]
131131
pub of_type: Type<'a>,
132132
}
133133

134134
/// Object type metadata
135135
#[derive(Debug)]
136-
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
136+
#[cfg_attr(feature = "arbitrary1", derive(arbitrary::Arbitrary))]
137137
pub struct ObjectMeta<'a, S> {
138138
#[doc(hidden)]
139139
pub name: Cow<'a, str>,
@@ -146,7 +146,7 @@ pub struct ObjectMeta<'a, S> {
146146
}
147147

148148
/// Enum type metadata
149-
//#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
149+
//#[cfg_attr(feature = "arbitrary1", derive(arbitrary::Arbitrary))]
150150
pub struct EnumMeta<'a, S> {
151151
#[doc(hidden)]
152152
pub name: Cow<'a, str>,
@@ -157,7 +157,7 @@ pub struct EnumMeta<'a, S> {
157157
pub(crate) try_parse_fn: for<'b> fn(&'b InputValue<S>) -> Result<(), FieldError<S>>,
158158
}
159159

160-
#[cfg(feature = "arbitrary")]
160+
#[cfg(feature = "arbitrary1")]
161161
impl<'a, S> arbitrary::Arbitrary<'a> for EnumMeta<'a, S>
162162
where
163163
S: arbitrary::Arbitrary<'a>,
@@ -198,7 +198,7 @@ where
198198

199199
/// Interface type metadata
200200
#[derive(Debug)]
201-
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
201+
#[cfg_attr(feature = "arbitrary1", derive(arbitrary::Arbitrary))]
202202
pub struct InterfaceMeta<'a, S> {
203203
#[doc(hidden)]
204204
pub name: Cow<'a, str>,
@@ -210,7 +210,7 @@ pub struct InterfaceMeta<'a, S> {
210210

211211
/// Union type metadata
212212
#[derive(Debug)]
213-
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
213+
#[cfg_attr(feature = "arbitrary1", derive(arbitrary::Arbitrary))]
214214
pub struct UnionMeta<'a> {
215215
#[doc(hidden)]
216216
pub name: Cow<'a, str>,
@@ -221,7 +221,7 @@ pub struct UnionMeta<'a> {
221221
}
222222

223223
/// Input object metadata
224-
//#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
224+
//#[cfg_attr(feature = "arbitrary1", derive(arbitrary::Arbitrary))]
225225
pub struct InputObjectMeta<'a, S> {
226226
#[doc(hidden)]
227227
pub name: Cow<'a, str>,
@@ -232,7 +232,7 @@ pub struct InputObjectMeta<'a, S> {
232232
pub(crate) try_parse_fn: for<'b> fn(&'b InputValue<S>) -> Result<(), FieldError<S>>,
233233
}
234234

235-
#[cfg(feature = "arbitrary")]
235+
#[cfg(feature = "arbitrary1")]
236236
impl<'a, S> arbitrary::Arbitrary<'a> for InputObjectMeta<'a, S>
237237
where
238238
S: arbitrary::Arbitrary<'a>,
@@ -276,7 +276,7 @@ where
276276
/// After a type's `meta` method has been called but before it has returned, a placeholder type
277277
/// is inserted into a registry to indicate existence.
278278
#[derive(Debug)]
279-
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
279+
#[cfg_attr(feature = "arbitrary1", derive(arbitrary::Arbitrary))]
280280
pub struct PlaceholderMeta<'a> {
281281
#[doc(hidden)]
282282
pub of_type: Type<'a>,
@@ -305,7 +305,7 @@ pub enum MetaType<'a, S = DefaultScalarValue> {
305305
Placeholder(PlaceholderMeta<'a>),
306306
}
307307

308-
#[cfg(feature = "arbitrary")]
308+
#[cfg(feature = "arbitrary1")]
309309
impl<'a, S> arbitrary::Arbitrary<'a> for MetaType<'a, S>
310310
where
311311
S: arbitrary::Arbitrary<'a>,
@@ -331,7 +331,7 @@ where
331331

332332
/// Metadata for a field
333333
#[derive(Debug, Clone)]
334-
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
334+
#[cfg_attr(feature = "arbitrary1", derive(arbitrary::Arbitrary))]
335335
pub struct Field<'a, S> {
336336
#[doc(hidden)]
337337
pub name: smartstring::alias::String,
@@ -355,7 +355,7 @@ impl<'a, S> Field<'a, S> {
355355

356356
/// Metadata for an argument to a field
357357
#[derive(Debug, Clone)]
358-
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
358+
#[cfg_attr(feature = "arbitrary1", derive(arbitrary::Arbitrary))]
359359
pub struct Argument<'a, S> {
360360
#[doc(hidden)]
361361
pub name: String,
@@ -377,7 +377,7 @@ impl<'a, S> Argument<'a, S> {
377377

378378
/// Metadata for a single value in an enum
379379
#[derive(Debug, Clone)]
380-
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
380+
#[cfg_attr(feature = "arbitrary1", derive(arbitrary::Arbitrary))]
381381
pub struct EnumValue {
382382
/// The name of the enum value
383383
///

juniper/src/schema/model.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ pub struct RootNode<
4747
pub schema: SchemaType<'a, S>,
4848
}
4949

50-
#[cfg(feature = "arbitrary")]
50+
#[cfg(feature = "arbitrary1")]
5151
impl<'a, QueryT, MutationT, SubscriptionT, S> arbitrary::Arbitrary<'a>
5252
for RootNode<'a, QueryT, MutationT, SubscriptionT, S>
5353
where
@@ -97,7 +97,7 @@ pub struct SchemaType<'a, S> {
9797

9898
impl<'a, S> Context for SchemaType<'a, S> {}
9999

100-
#[cfg(feature = "arbitrary")]
100+
#[cfg(feature = "arbitrary1")]
101101
impl<'a, S: 'a> arbitrary::Arbitrary<'a> for SchemaType<'a, S>
102102
where
103103
S: arbitrary::Arbitrary<'a>,
@@ -147,7 +147,7 @@ pub enum TypeType<'a, S: 'a> {
147147
List(Box<TypeType<'a, S>>, Option<usize>),
148148
}
149149

150-
#[cfg(feature = "arbitrary")]
150+
#[cfg(feature = "arbitrary1")]
151151
impl<'a, S: 'a> arbitrary::Arbitrary<'a> for TypeType<'a, S>
152152
where
153153
S: arbitrary::Arbitrary<'a>,
@@ -173,7 +173,7 @@ where
173173
}
174174

175175
#[derive(Debug)]
176-
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
176+
#[cfg_attr(feature = "arbitrary1", derive(arbitrary::Arbitrary))]
177177
pub struct DirectiveType<'a, S> {
178178
pub name: String,
179179
pub description: Option<String>,
@@ -183,7 +183,7 @@ pub struct DirectiveType<'a, S> {
183183
}
184184

185185
#[derive(Clone, PartialEq, Eq, Debug, GraphQLEnum)]
186-
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
186+
#[cfg_attr(feature = "arbitrary1", derive(arbitrary::Arbitrary))]
187187
#[graphql(name = "__DirectiveLocation", internal)]
188188
pub enum DirectiveLocation {
189189
Query,

juniper/src/types/name.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ fn is_ascii_digit(c: char) -> bool {
1717
}
1818

1919
#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
20-
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
20+
#[cfg_attr(feature = "arbitrary1", derive(arbitrary::Arbitrary))]
2121
pub struct Name(String);
2222

2323
impl Name {

juniper/src/types/scalars.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ impl<T> Default for EmptyMutation<T> {
408408
}
409409
}
410410

411-
#[cfg(feature = "arbitrary")]
411+
#[cfg(feature = "arbitrary1")]
412412
impl<'a, T> arbitrary::Arbitrary<'a> for EmptyMutation<T>
413413
where
414414
T: arbitrary::Arbitrary<'a>,
@@ -478,7 +478,7 @@ impl<T> Default for EmptySubscription<T> {
478478
}
479479
}
480480

481-
#[cfg(feature = "arbitrary")]
481+
#[cfg(feature = "arbitrary1")]
482482
impl<'a, T> arbitrary::Arbitrary<'a> for EmptySubscription<T>
483483
where
484484
T: arbitrary::Arbitrary<'a>,

juniper/src/value/scalar.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ pub trait ScalarValue:
407407
///
408408
/// [0]: https://spec.graphql.org/June2018
409409
#[derive(Clone, Debug, PartialEq, Serialize)]
410-
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
410+
#[cfg_attr(feature = "arbitrary1", derive(arbitrary::Arbitrary))]
411411
#[serde(untagged)]
412412
pub enum DefaultScalarValue {
413413
/// [`Int` scalar][0] as a signed 32‐bit numeric non‐fractional value.

0 commit comments

Comments
 (0)