Skip to content

Commit a515d4b

Browse files
committed
Fix codegen tests for 1.74 Rust
1 parent 316b188 commit a515d4b

13 files changed

+220
-182
lines changed

tests/codegen/fail/input-object/derive_incompatible_field_type.stderr

Lines changed: 40 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,47 @@
11
error[E0277]: the trait bound `ObjectA: IsInputType<__S>` is not satisfied
2-
--> fail/input-object/derive_incompatible_field_type.rs:8:10
3-
|
4-
8 | #[derive(GraphQLInputObject)]
5-
| ^^^^^^^^^^^^^^^^^^ the trait `IsInputType<__S>` is not implemented for `ObjectA`
6-
|
7-
= help: the following other types implement trait `IsInputType<S>`:
8-
<bool as IsInputType<__S>>
9-
<i32 as IsInputType<__S>>
10-
<f64 as IsInputType<__S>>
11-
<Object as IsInputType<__S>>
12-
<Box<T> as IsInputType<S>>
13-
<uuid::Uuid as IsInputType<__S>>
14-
<url::Url as IsInputType<__S>>
15-
<bson::datetime::DateTime as IsInputType<__S>>
16-
and $N others
17-
= note: this error originates in the derive macro `GraphQLInputObject` (in Nightly builds, run with -Z macro-backtrace for more info)
2+
--> fail/input-object/derive_incompatible_field_type.rs:10:12
3+
|
4+
10 | field: ObjectA,
5+
| ^^^^^^^ the trait `IsInputType<__S>` is not implemented for `ObjectA`
6+
|
7+
= help: the following other types implement trait `IsInputType<S>`:
8+
<bool as IsInputType<__S>>
9+
<i32 as IsInputType<__S>>
10+
<f64 as IsInputType<__S>>
11+
<Object as IsInputType<__S>>
12+
<Box<T> as IsInputType<S>>
13+
<uuid::Uuid as IsInputType<__S>>
14+
<url::Url as IsInputType<__S>>
15+
<bson::datetime::DateTime as IsInputType<__S>>
16+
and $N others
1817

1918
error[E0277]: the trait bound `ObjectA: FromInputValue<__S>` is not satisfied
20-
--> fail/input-object/derive_incompatible_field_type.rs:8:10
21-
|
22-
8 | #[derive(GraphQLInputObject)]
23-
| ^^^^^^^^^^^^^^^^^^ the trait `FromInputValue<__S>` is not implemented for `ObjectA`
24-
|
25-
= help: the following other types implement trait `FromInputValue<S>`:
26-
<bool as FromInputValue<__S>>
27-
<i32 as FromInputValue<__S>>
28-
<f64 as FromInputValue<__S>>
29-
<Object as FromInputValue<__S>>
30-
<Box<T> as FromInputValue<S>>
31-
<uuid::Uuid as FromInputValue<__S>>
32-
<url::Url as FromInputValue<__S>>
33-
<bson::datetime::DateTime as FromInputValue<__S>>
34-
and $N others
19+
--> fail/input-object/derive_incompatible_field_type.rs:10:12
20+
|
21+
8 | #[derive(GraphQLInputObject)]
22+
| ------------------ required by a bound introduced by this call
23+
9 | struct Object {
24+
10 | field: ObjectA,
25+
| ^^^^^^^ the trait `FromInputValue<__S>` is not implemented for `ObjectA`
26+
|
27+
= help: the following other types implement trait `FromInputValue<S>`:
28+
<bool as FromInputValue<__S>>
29+
<i32 as FromInputValue<__S>>
30+
<f64 as FromInputValue<__S>>
31+
<Object as FromInputValue<__S>>
32+
<Box<T> as FromInputValue<S>>
33+
<uuid::Uuid as FromInputValue<__S>>
34+
<url::Url as FromInputValue<__S>>
35+
<bson::datetime::DateTime as FromInputValue<__S>>
36+
and $N others
3537
note: required by a bound in `Registry::<'r, S>::arg`
36-
--> $WORKSPACE/juniper/src/executor/mod.rs
37-
|
38-
| pub fn arg<T>(&mut self, name: &str, info: &T::TypeInfo) -> Argument<'r, S>
39-
| --- required by a bound in this associated function
40-
| where
41-
| T: GraphQLType<S> + FromInputValue<S>,
42-
| ^^^^^^^^^^^^^^^^^ required by this bound in `Registry::<'r, S>::arg`
43-
= note: this error originates in the derive macro `GraphQLInputObject` (in Nightly builds, run with -Z macro-backtrace for more info)
38+
--> $WORKSPACE/juniper/src/executor/mod.rs
39+
|
40+
| pub fn arg<T>(&mut self, name: &str, info: &T::TypeInfo) -> Argument<'r, S>
41+
| --- required by a bound in this associated function
42+
| where
43+
| T: GraphQLType<S> + FromInputValue<S>,
44+
| ^^^^^^^^^^^^^^^^^ required by this bound in `Registry::<'r, S>::arg`
4445

4546
error[E0277]: the trait bound `ObjectA: FromInputValue<__S>` is not satisfied
4647
--> fail/input-object/derive_incompatible_field_type.rs:8:10
Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
error[E0277]: the trait bound `ObjB: IsOutputType<__S>` is not satisfied
2-
--> fail/interface/struct/attr_field_non_output_return_type.rs:10:9
3-
|
4-
10 | id: ObjB,
5-
| ^^^^ the trait `IsOutputType<__S>` is not implemented for `ObjB`
6-
|
7-
= help: the following other types implement trait `IsOutputType<S>`:
8-
<bool as IsOutputType<__S>>
9-
<i32 as IsOutputType<__S>>
10-
<f64 as IsOutputType<__S>>
11-
<CharacterValueEnum as IsOutputType<__S>>
12-
<Box<T> as IsOutputType<S>>
13-
<uuid::Uuid as IsOutputType<__S>>
14-
<url::Url as IsOutputType<__S>>
15-
<bson::datetime::DateTime as IsOutputType<__S>>
16-
and $N others
2+
--> fail/interface/struct/attr_field_non_output_return_type.rs:8:1
3+
|
4+
8 | #[graphql_interface]
5+
| ^^^^^^^^^^^^^^^^^^^^ the trait `IsOutputType<__S>` is not implemented for `ObjB`
6+
|
7+
= help: the following other types implement trait `IsOutputType<S>`:
8+
<bool as IsOutputType<__S>>
9+
<i32 as IsOutputType<__S>>
10+
<f64 as IsOutputType<__S>>
11+
<CharacterValueEnum as IsOutputType<__S>>
12+
<Box<T> as IsOutputType<S>>
13+
<uuid::Uuid as IsOutputType<__S>>
14+
<url::Url as IsOutputType<__S>>
15+
<bson::datetime::DateTime as IsOutputType<__S>>
16+
and $N others
Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
error[E0277]: the trait bound `ObjB: IsOutputType<__S>` is not satisfied
2-
--> fail/interface/struct/derive_field_non_output_return_type.rs:10:9
3-
|
4-
10 | id: ObjB,
5-
| ^^^^ the trait `IsOutputType<__S>` is not implemented for `ObjB`
6-
|
7-
= help: the following other types implement trait `IsOutputType<S>`:
8-
<bool as IsOutputType<__S>>
9-
<i32 as IsOutputType<__S>>
10-
<f64 as IsOutputType<__S>>
11-
<CharacterValueEnum as IsOutputType<__S>>
12-
<Box<T> as IsOutputType<S>>
13-
<uuid::Uuid as IsOutputType<__S>>
14-
<url::Url as IsOutputType<__S>>
15-
<bson::datetime::DateTime as IsOutputType<__S>>
16-
and $N others
2+
--> fail/interface/struct/derive_field_non_output_return_type.rs:8:10
3+
|
4+
8 | #[derive(GraphQLInterface)]
5+
| ^^^^^^^^^^^^^^^^ the trait `IsOutputType<__S>` is not implemented for `ObjB`
6+
|
7+
= help: the following other types implement trait `IsOutputType<S>`:
8+
<bool as IsOutputType<__S>>
9+
<i32 as IsOutputType<__S>>
10+
<f64 as IsOutputType<__S>>
11+
<CharacterValueEnum as IsOutputType<__S>>
12+
<Box<T> as IsOutputType<S>>
13+
<uuid::Uuid as IsOutputType<__S>>
14+
<url::Url as IsOutputType<__S>>
15+
<bson::datetime::DateTime as IsOutputType<__S>>
16+
and $N others

tests/codegen/fail/interface/trait/argument_non_input_type.stderr

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -16,27 +16,29 @@ error[E0277]: the trait bound `ObjA: IsInputType<__S>` is not satisfied
1616
and $N others
1717

1818
error[E0277]: the trait bound `ObjA: FromInputValue<__S>` is not satisfied
19-
--> fail/interface/trait/argument_non_input_type.rs:8:1
20-
|
21-
8 | #[graphql_interface]
22-
| ^^^^^^^^^^^^^^^^^^^^ the trait `FromInputValue<__S>` is not implemented for `ObjA`
23-
|
24-
= help: the following other types implement trait `FromInputValue<S>`:
25-
<bool as FromInputValue<__S>>
26-
<i32 as FromInputValue<__S>>
27-
<f64 as FromInputValue<__S>>
28-
<Box<T> as FromInputValue<S>>
29-
<uuid::Uuid as FromInputValue<__S>>
30-
<url::Url as FromInputValue<__S>>
31-
<bson::datetime::DateTime as FromInputValue<__S>>
32-
<juniper::schema::model::DirectiveLocation as FromInputValue<__S>>
33-
and $N others
19+
--> fail/interface/trait/argument_non_input_type.rs:10:23
20+
|
21+
8 | #[graphql_interface]
22+
| -------------------- required by a bound introduced by this call
23+
9 | trait Character {
24+
10 | fn id(&self, obj: ObjA) -> &str;
25+
| ^^^^ the trait `FromInputValue<__S>` is not implemented for `ObjA`
26+
|
27+
= help: the following other types implement trait `FromInputValue<S>`:
28+
<bool as FromInputValue<__S>>
29+
<i32 as FromInputValue<__S>>
30+
<f64 as FromInputValue<__S>>
31+
<Box<T> as FromInputValue<S>>
32+
<uuid::Uuid as FromInputValue<__S>>
33+
<url::Url as FromInputValue<__S>>
34+
<bson::datetime::DateTime as FromInputValue<__S>>
35+
<juniper::schema::model::DirectiveLocation as FromInputValue<__S>>
36+
and $N others
3437
note: required by a bound in `Registry::<'r, S>::arg`
35-
--> $WORKSPACE/juniper/src/executor/mod.rs
36-
|
37-
| pub fn arg<T>(&mut self, name: &str, info: &T::TypeInfo) -> Argument<'r, S>
38-
| --- required by a bound in this associated function
39-
| where
40-
| T: GraphQLType<S> + FromInputValue<S>,
41-
| ^^^^^^^^^^^^^^^^^ required by this bound in `Registry::<'r, S>::arg`
42-
= note: this error originates in the attribute macro `graphql_interface` (in Nightly builds, run with -Z macro-backtrace for more info)
38+
--> $WORKSPACE/juniper/src/executor/mod.rs
39+
|
40+
| pub fn arg<T>(&mut self, name: &str, info: &T::TypeInfo) -> Argument<'r, S>
41+
| --- required by a bound in this associated function
42+
| where
43+
| T: GraphQLType<S> + FromInputValue<S>,
44+
| ^^^^^^^^^^^^^^^^^ required by this bound in `Registry::<'r, S>::arg`
Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
error[E0277]: the trait bound `ObjB: IsOutputType<__S>` is not satisfied
2-
--> fail/interface/trait/field_non_output_return_type.rs:10:21
3-
|
4-
10 | fn id(&self) -> ObjB;
5-
| ^^^^ the trait `IsOutputType<__S>` is not implemented for `ObjB`
6-
|
7-
= help: the following other types implement trait `IsOutputType<S>`:
8-
<bool as IsOutputType<__S>>
9-
<i32 as IsOutputType<__S>>
10-
<f64 as IsOutputType<__S>>
11-
<CharacterValueEnum as IsOutputType<__S>>
12-
<Box<T> as IsOutputType<S>>
13-
<uuid::Uuid as IsOutputType<__S>>
14-
<url::Url as IsOutputType<__S>>
15-
<bson::datetime::DateTime as IsOutputType<__S>>
16-
and $N others
2+
--> fail/interface/trait/field_non_output_return_type.rs:8:1
3+
|
4+
8 | #[graphql_interface]
5+
| ^^^^^^^^^^^^^^^^^^^^ the trait `IsOutputType<__S>` is not implemented for `ObjB`
6+
|
7+
= help: the following other types implement trait `IsOutputType<S>`:
8+
<bool as IsOutputType<__S>>
9+
<i32 as IsOutputType<__S>>
10+
<f64 as IsOutputType<__S>>
11+
<CharacterValueEnum as IsOutputType<__S>>
12+
<Box<T> as IsOutputType<S>>
13+
<uuid::Uuid as IsOutputType<__S>>
14+
<url::Url as IsOutputType<__S>>
15+
<bson::datetime::DateTime as IsOutputType<__S>>
16+
and $N others

tests/codegen/fail/object/argument_non_input_type.stderr

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,13 @@ error[E0277]: the trait bound `ObjA: IsInputType<__S>` is not satisfied
1616
and $N others
1717

1818
error[E0277]: the trait bound `ObjA: FromInputValue<__S>` is not satisfied
19-
--> fail/object/argument_non_input_type.rs:10:1
19+
--> fail/object/argument_non_input_type.rs:12:23
2020
|
2121
10 | #[graphql_object]
22-
| ^^^^^^^^^^^^^^^^^ the trait `FromInputValue<__S>` is not implemented for `ObjA`
22+
| ----------------- required by a bound introduced by this call
23+
11 | impl ObjB {
24+
12 | fn id(&self, obj: ObjA) -> &str {
25+
| ^^^^ the trait `FromInputValue<__S>` is not implemented for `ObjA`
2326
|
2427
= help: the following other types implement trait `FromInputValue<S>`:
2528
<bool as FromInputValue<__S>>
@@ -39,7 +42,6 @@ note: required by a bound in `Registry::<'r, S>::arg`
3942
| where
4043
| T: GraphQLType<S> + FromInputValue<S>,
4144
| ^^^^^^^^^^^^^^^^^ required by this bound in `Registry::<'r, S>::arg`
42-
= note: this error originates in the attribute macro `graphql_object` (in Nightly builds, run with -Z macro-backtrace for more info)
4345

4446
error[E0277]: the trait bound `ObjA: FromInputValue<__S>` is not satisfied
4547
--> fail/object/argument_non_input_type.rs:10:1
@@ -58,3 +60,20 @@ error[E0277]: the trait bound `ObjA: FromInputValue<__S>` is not satisfied
5860
<juniper::schema::model::DirectiveLocation as FromInputValue<__S>>
5961
and $N others
6062
= note: this error originates in the attribute macro `graphql_object` (in Nightly builds, run with -Z macro-backtrace for more info)
63+
64+
error[E0277]: the trait bound `ObjA: FromInputValue<__S>` is not satisfied
65+
--> fail/object/argument_non_input_type.rs:12:23
66+
|
67+
12 | fn id(&self, obj: ObjA) -> &str {
68+
| ^^^^ the trait `FromInputValue<__S>` is not implemented for `ObjA`
69+
|
70+
= help: the following other types implement trait `FromInputValue<S>`:
71+
<bool as FromInputValue<__S>>
72+
<i32 as FromInputValue<__S>>
73+
<f64 as FromInputValue<__S>>
74+
<Box<T> as FromInputValue<S>>
75+
<uuid::Uuid as FromInputValue<__S>>
76+
<url::Url as FromInputValue<__S>>
77+
<bson::datetime::DateTime as FromInputValue<__S>>
78+
<juniper::schema::model::DirectiveLocation as FromInputValue<__S>>
79+
and $N others

tests/codegen/fail/object/attr_field_non_output_return_type.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
error[E0277]: the trait bound `ObjB: IsOutputType<__S>` is not satisfied
2-
--> fail/object/attr_field_non_output_return_type.rs:12:21
2+
--> fail/object/attr_field_non_output_return_type.rs:10:1
33
|
4-
12 | fn id(&self) -> ObjB {
5-
| ^^^^ the trait `IsOutputType<__S>` is not implemented for `ObjB`
4+
10 | #[graphql_object]
5+
| ^^^^^^^^^^^^^^^^^ the trait `IsOutputType<__S>` is not implemented for `ObjB`
66
|
77
= help: the following other types implement trait `IsOutputType<S>`:
88
<bool as IsOutputType<__S>>
Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
error[E0277]: the trait bound `ObjB: IsOutputType<__S>` is not satisfied
2-
--> fail/object/derive_field_non_output_return_type.rs:10:9
3-
|
4-
10 | id: ObjB,
5-
| ^^^^ the trait `IsOutputType<__S>` is not implemented for `ObjB`
6-
|
7-
= help: the following other types implement trait `IsOutputType<S>`:
8-
<bool as IsOutputType<__S>>
9-
<i32 as IsOutputType<__S>>
10-
<f64 as IsOutputType<__S>>
11-
<ObjA as IsOutputType<__S>>
12-
<Box<T> as IsOutputType<S>>
13-
<uuid::Uuid as IsOutputType<__S>>
14-
<url::Url as IsOutputType<__S>>
15-
<bson::datetime::DateTime as IsOutputType<__S>>
16-
and $N others
2+
--> fail/object/derive_field_non_output_return_type.rs:8:10
3+
|
4+
8 | #[derive(GraphQLObject)]
5+
| ^^^^^^^^^^^^^ the trait `IsOutputType<__S>` is not implemented for `ObjB`
6+
|
7+
= help: the following other types implement trait `IsOutputType<S>`:
8+
<bool as IsOutputType<__S>>
9+
<i32 as IsOutputType<__S>>
10+
<f64 as IsOutputType<__S>>
11+
<ObjA as IsOutputType<__S>>
12+
<Box<T> as IsOutputType<S>>
13+
<uuid::Uuid as IsOutputType<__S>>
14+
<url::Url as IsOutputType<__S>>
15+
<bson::datetime::DateTime as IsOutputType<__S>>
16+
and $N others

tests/codegen/fail/subscription/argument_non_input_type.stderr

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,13 @@ error[E0277]: the trait bound `ObjA: IsInputType<__S>` is not satisfied
2424
and $N others
2525

2626
error[E0277]: the trait bound `ObjA: FromInputValue<__S>` is not satisfied
27-
--> fail/subscription/argument_non_input_type.rs:15:1
27+
--> fail/subscription/argument_non_input_type.rs:17:29
2828
|
2929
15 | #[graphql_subscription]
30-
| ^^^^^^^^^^^^^^^^^^^^^^^ the trait `FromInputValue<__S>` is not implemented for `ObjA`
30+
| ----------------------- required by a bound introduced by this call
31+
16 | impl ObjB {
32+
17 | async fn id(&self, obj: ObjA) -> Stream<'static, &'static str> {
33+
| ^^^^ the trait `FromInputValue<__S>` is not implemented for `ObjA`
3134
|
3235
= help: the following other types implement trait `FromInputValue<S>`:
3336
<bool as FromInputValue<__S>>
@@ -47,7 +50,6 @@ note: required by a bound in `Registry::<'r, S>::arg`
4750
| where
4851
| T: GraphQLType<S> + FromInputValue<S>,
4952
| ^^^^^^^^^^^^^^^^^ required by this bound in `Registry::<'r, S>::arg`
50-
= note: this error originates in the attribute macro `graphql_subscription` (in Nightly builds, run with -Z macro-backtrace for more info)
5153

5254
error[E0277]: the trait bound `ObjA: FromInputValue<__S>` is not satisfied
5355
--> fail/subscription/argument_non_input_type.rs:15:1
@@ -66,3 +68,20 @@ error[E0277]: the trait bound `ObjA: FromInputValue<__S>` is not satisfied
6668
<juniper::schema::model::DirectiveLocation as FromInputValue<__S>>
6769
and $N others
6870
= note: this error originates in the attribute macro `graphql_subscription` (in Nightly builds, run with -Z macro-backtrace for more info)
71+
72+
error[E0277]: the trait bound `ObjA: FromInputValue<__S>` is not satisfied
73+
--> fail/subscription/argument_non_input_type.rs:17:29
74+
|
75+
17 | async fn id(&self, obj: ObjA) -> Stream<'static, &'static str> {
76+
| ^^^^ the trait `FromInputValue<__S>` is not implemented for `ObjA`
77+
|
78+
= help: the following other types implement trait `FromInputValue<S>`:
79+
<bool as FromInputValue<__S>>
80+
<i32 as FromInputValue<__S>>
81+
<f64 as FromInputValue<__S>>
82+
<Box<T> as FromInputValue<S>>
83+
<uuid::Uuid as FromInputValue<__S>>
84+
<url::Url as FromInputValue<__S>>
85+
<bson::datetime::DateTime as FromInputValue<__S>>
86+
<juniper::schema::model::DirectiveLocation as FromInputValue<__S>>
87+
and $N others

tests/codegen/fail/subscription/field_non_output_return_type.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
error[E0277]: the trait bound `ObjB: IsOutputType<__S>` is not satisfied
2-
--> fail/subscription/field_non_output_return_type.rs:17:27
2+
--> fail/subscription/field_non_output_return_type.rs:15:1
33
|
4-
17 | async fn id(&self) -> Stream<'static, ObjB> {
5-
| ^^^^^^ the trait `IsOutputType<__S>` is not implemented for `ObjB`
4+
15 | #[graphql_subscription]
5+
| ^^^^^^^^^^^^^^^^^^^^^^^ the trait `IsOutputType<__S>` is not implemented for `ObjB`
66
|
77
= help: the following other types implement trait `IsOutputType<S>`:
88
<bool as IsOutputType<__S>>

0 commit comments

Comments
 (0)