Skip to content

Commit

Permalink
Fix codegen tests for latest stable Rust
Browse files Browse the repository at this point in the history
  • Loading branch information
tyranron committed Nov 16, 2023
1 parent 316b188 commit 8a7d1ff
Show file tree
Hide file tree
Showing 13 changed files with 220 additions and 182 deletions.
Original file line number Diff line number Diff line change
@@ -1,46 +1,47 @@
error[E0277]: the trait bound `ObjectA: IsInputType<__S>` is not satisfied
--> fail/input-object/derive_incompatible_field_type.rs:8:10
|
8 | #[derive(GraphQLInputObject)]
| ^^^^^^^^^^^^^^^^^^ the trait `IsInputType<__S>` is not implemented for `ObjectA`
|
= help: the following other types implement trait `IsInputType<S>`:
<bool as IsInputType<__S>>
<i32 as IsInputType<__S>>
<f64 as IsInputType<__S>>
<Object as IsInputType<__S>>
<Box<T> as IsInputType<S>>
<uuid::Uuid as IsInputType<__S>>
<url::Url as IsInputType<__S>>
<bson::datetime::DateTime as IsInputType<__S>>
and $N others
= note: this error originates in the derive macro `GraphQLInputObject` (in Nightly builds, run with -Z macro-backtrace for more info)
--> fail/input-object/derive_incompatible_field_type.rs:10:12
|
10 | field: ObjectA,
| ^^^^^^^ the trait `IsInputType<__S>` is not implemented for `ObjectA`
|
= help: the following other types implement trait `IsInputType<S>`:
<bool as IsInputType<__S>>
<i32 as IsInputType<__S>>
<f64 as IsInputType<__S>>
<Object as IsInputType<__S>>
<Box<T> as IsInputType<S>>
<uuid::Uuid as IsInputType<__S>>
<url::Url as IsInputType<__S>>
<bson::datetime::DateTime as IsInputType<__S>>
and $N others

error[E0277]: the trait bound `ObjectA: FromInputValue<__S>` is not satisfied
--> fail/input-object/derive_incompatible_field_type.rs:8:10
|
8 | #[derive(GraphQLInputObject)]
| ^^^^^^^^^^^^^^^^^^ the trait `FromInputValue<__S>` is not implemented for `ObjectA`
|
= help: the following other types implement trait `FromInputValue<S>`:
<bool as FromInputValue<__S>>
<i32 as FromInputValue<__S>>
<f64 as FromInputValue<__S>>
<Object as FromInputValue<__S>>
<Box<T> as FromInputValue<S>>
<uuid::Uuid as FromInputValue<__S>>
<url::Url as FromInputValue<__S>>
<bson::datetime::DateTime as FromInputValue<__S>>
and $N others
--> fail/input-object/derive_incompatible_field_type.rs:10:12
|
8 | #[derive(GraphQLInputObject)]
| ------------------ required by a bound introduced by this call
9 | struct Object {
10 | field: ObjectA,
| ^^^^^^^ the trait `FromInputValue<__S>` is not implemented for `ObjectA`
|
= help: the following other types implement trait `FromInputValue<S>`:
<bool as FromInputValue<__S>>
<i32 as FromInputValue<__S>>
<f64 as FromInputValue<__S>>
<Object as FromInputValue<__S>>
<Box<T> as FromInputValue<S>>
<uuid::Uuid as FromInputValue<__S>>
<url::Url as FromInputValue<__S>>
<bson::datetime::DateTime as FromInputValue<__S>>
and $N others
note: required by a bound in `Registry::<'r, S>::arg`
--> $WORKSPACE/juniper/src/executor/mod.rs
|
| pub fn arg<T>(&mut self, name: &str, info: &T::TypeInfo) -> Argument<'r, S>
| --- required by a bound in this associated function
| where
| T: GraphQLType<S> + FromInputValue<S>,
| ^^^^^^^^^^^^^^^^^ required by this bound in `Registry::<'r, S>::arg`
= note: this error originates in the derive macro `GraphQLInputObject` (in Nightly builds, run with -Z macro-backtrace for more info)
--> $WORKSPACE/juniper/src/executor/mod.rs
|
| pub fn arg<T>(&mut self, name: &str, info: &T::TypeInfo) -> Argument<'r, S>
| --- required by a bound in this associated function
| where
| T: GraphQLType<S> + FromInputValue<S>,
| ^^^^^^^^^^^^^^^^^ required by this bound in `Registry::<'r, S>::arg`

error[E0277]: the trait bound `ObjectA: FromInputValue<__S>` is not satisfied
--> fail/input-object/derive_incompatible_field_type.rs:8:10
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
error[E0277]: the trait bound `ObjB: IsOutputType<__S>` is not satisfied
--> fail/interface/struct/attr_field_non_output_return_type.rs:10:9
|
10 | id: ObjB,
| ^^^^ the trait `IsOutputType<__S>` is not implemented for `ObjB`
|
= help: the following other types implement trait `IsOutputType<S>`:
<bool as IsOutputType<__S>>
<i32 as IsOutputType<__S>>
<f64 as IsOutputType<__S>>
<CharacterValueEnum as IsOutputType<__S>>
<Box<T> as IsOutputType<S>>
<uuid::Uuid as IsOutputType<__S>>
<url::Url as IsOutputType<__S>>
<bson::datetime::DateTime as IsOutputType<__S>>
and $N others
--> fail/interface/struct/attr_field_non_output_return_type.rs:8:1
|
8 | #[graphql_interface]
| ^^^^^^^^^^^^^^^^^^^^ the trait `IsOutputType<__S>` is not implemented for `ObjB`
|
= help: the following other types implement trait `IsOutputType<S>`:
<bool as IsOutputType<__S>>
<i32 as IsOutputType<__S>>
<f64 as IsOutputType<__S>>
<CharacterValueEnum as IsOutputType<__S>>
<Box<T> as IsOutputType<S>>
<uuid::Uuid as IsOutputType<__S>>
<url::Url as IsOutputType<__S>>
<bson::datetime::DateTime as IsOutputType<__S>>
and $N others
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
error[E0277]: the trait bound `ObjB: IsOutputType<__S>` is not satisfied
--> fail/interface/struct/derive_field_non_output_return_type.rs:10:9
|
10 | id: ObjB,
| ^^^^ the trait `IsOutputType<__S>` is not implemented for `ObjB`
|
= help: the following other types implement trait `IsOutputType<S>`:
<bool as IsOutputType<__S>>
<i32 as IsOutputType<__S>>
<f64 as IsOutputType<__S>>
<CharacterValueEnum as IsOutputType<__S>>
<Box<T> as IsOutputType<S>>
<uuid::Uuid as IsOutputType<__S>>
<url::Url as IsOutputType<__S>>
<bson::datetime::DateTime as IsOutputType<__S>>
and $N others
--> fail/interface/struct/derive_field_non_output_return_type.rs:8:10
|
8 | #[derive(GraphQLInterface)]
| ^^^^^^^^^^^^^^^^ the trait `IsOutputType<__S>` is not implemented for `ObjB`
|
= help: the following other types implement trait `IsOutputType<S>`:
<bool as IsOutputType<__S>>
<i32 as IsOutputType<__S>>
<f64 as IsOutputType<__S>>
<CharacterValueEnum as IsOutputType<__S>>
<Box<T> as IsOutputType<S>>
<uuid::Uuid as IsOutputType<__S>>
<url::Url as IsOutputType<__S>>
<bson::datetime::DateTime as IsOutputType<__S>>
and $N others
48 changes: 25 additions & 23 deletions tests/codegen/fail/interface/trait/argument_non_input_type.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,29 @@ error[E0277]: the trait bound `ObjA: IsInputType<__S>` is not satisfied
and $N others

error[E0277]: the trait bound `ObjA: FromInputValue<__S>` is not satisfied
--> fail/interface/trait/argument_non_input_type.rs:8:1
|
8 | #[graphql_interface]
| ^^^^^^^^^^^^^^^^^^^^ the trait `FromInputValue<__S>` is not implemented for `ObjA`
|
= help: the following other types implement trait `FromInputValue<S>`:
<bool as FromInputValue<__S>>
<i32 as FromInputValue<__S>>
<f64 as FromInputValue<__S>>
<Box<T> as FromInputValue<S>>
<uuid::Uuid as FromInputValue<__S>>
<url::Url as FromInputValue<__S>>
<bson::datetime::DateTime as FromInputValue<__S>>
<juniper::schema::model::DirectiveLocation as FromInputValue<__S>>
and $N others
--> fail/interface/trait/argument_non_input_type.rs:10:23
|
8 | #[graphql_interface]
| -------------------- required by a bound introduced by this call
9 | trait Character {
10 | fn id(&self, obj: ObjA) -> &str;
| ^^^^ the trait `FromInputValue<__S>` is not implemented for `ObjA`
|
= help: the following other types implement trait `FromInputValue<S>`:
<bool as FromInputValue<__S>>
<i32 as FromInputValue<__S>>
<f64 as FromInputValue<__S>>
<Box<T> as FromInputValue<S>>
<uuid::Uuid as FromInputValue<__S>>
<url::Url as FromInputValue<__S>>
<bson::datetime::DateTime as FromInputValue<__S>>
<juniper::schema::model::DirectiveLocation as FromInputValue<__S>>
and $N others
note: required by a bound in `Registry::<'r, S>::arg`
--> $WORKSPACE/juniper/src/executor/mod.rs
|
| pub fn arg<T>(&mut self, name: &str, info: &T::TypeInfo) -> Argument<'r, S>
| --- required by a bound in this associated function
| where
| T: GraphQLType<S> + FromInputValue<S>,
| ^^^^^^^^^^^^^^^^^ required by this bound in `Registry::<'r, S>::arg`
= note: this error originates in the attribute macro `graphql_interface` (in Nightly builds, run with -Z macro-backtrace for more info)
--> $WORKSPACE/juniper/src/executor/mod.rs
|
| pub fn arg<T>(&mut self, name: &str, info: &T::TypeInfo) -> Argument<'r, S>
| --- required by a bound in this associated function
| where
| T: GraphQLType<S> + FromInputValue<S>,
| ^^^^^^^^^^^^^^^^^ required by this bound in `Registry::<'r, S>::arg`
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
error[E0277]: the trait bound `ObjB: IsOutputType<__S>` is not satisfied
--> fail/interface/trait/field_non_output_return_type.rs:10:21
|
10 | fn id(&self) -> ObjB;
| ^^^^ the trait `IsOutputType<__S>` is not implemented for `ObjB`
|
= help: the following other types implement trait `IsOutputType<S>`:
<bool as IsOutputType<__S>>
<i32 as IsOutputType<__S>>
<f64 as IsOutputType<__S>>
<CharacterValueEnum as IsOutputType<__S>>
<Box<T> as IsOutputType<S>>
<uuid::Uuid as IsOutputType<__S>>
<url::Url as IsOutputType<__S>>
<bson::datetime::DateTime as IsOutputType<__S>>
and $N others
--> fail/interface/trait/field_non_output_return_type.rs:8:1
|
8 | #[graphql_interface]
| ^^^^^^^^^^^^^^^^^^^^ the trait `IsOutputType<__S>` is not implemented for `ObjB`
|
= help: the following other types implement trait `IsOutputType<S>`:
<bool as IsOutputType<__S>>
<i32 as IsOutputType<__S>>
<f64 as IsOutputType<__S>>
<CharacterValueEnum as IsOutputType<__S>>
<Box<T> as IsOutputType<S>>
<uuid::Uuid as IsOutputType<__S>>
<url::Url as IsOutputType<__S>>
<bson::datetime::DateTime as IsOutputType<__S>>
and $N others
25 changes: 22 additions & 3 deletions tests/codegen/fail/object/argument_non_input_type.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,13 @@ error[E0277]: the trait bound `ObjA: IsInputType<__S>` is not satisfied
and $N others

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

error[E0277]: the trait bound `ObjA: FromInputValue<__S>` is not satisfied
--> fail/object/argument_non_input_type.rs:10:1
Expand All @@ -58,3 +60,20 @@ error[E0277]: the trait bound `ObjA: FromInputValue<__S>` is not satisfied
<juniper::schema::model::DirectiveLocation as FromInputValue<__S>>
and $N others
= note: this error originates in the attribute macro `graphql_object` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `ObjA: FromInputValue<__S>` is not satisfied
--> fail/object/argument_non_input_type.rs:12:23
|
12 | fn id(&self, obj: ObjA) -> &str {
| ^^^^ the trait `FromInputValue<__S>` is not implemented for `ObjA`
|
= help: the following other types implement trait `FromInputValue<S>`:
<bool as FromInputValue<__S>>
<i32 as FromInputValue<__S>>
<f64 as FromInputValue<__S>>
<Box<T> as FromInputValue<S>>
<uuid::Uuid as FromInputValue<__S>>
<url::Url as FromInputValue<__S>>
<bson::datetime::DateTime as FromInputValue<__S>>
<juniper::schema::model::DirectiveLocation as FromInputValue<__S>>
and $N others
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
error[E0277]: the trait bound `ObjB: IsOutputType<__S>` is not satisfied
--> fail/object/attr_field_non_output_return_type.rs:12:21
--> fail/object/attr_field_non_output_return_type.rs:10:1
|
12 | fn id(&self) -> ObjB {
| ^^^^ the trait `IsOutputType<__S>` is not implemented for `ObjB`
10 | #[graphql_object]
| ^^^^^^^^^^^^^^^^^ the trait `IsOutputType<__S>` is not implemented for `ObjB`
|
= help: the following other types implement trait `IsOutputType<S>`:
<bool as IsOutputType<__S>>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
error[E0277]: the trait bound `ObjB: IsOutputType<__S>` is not satisfied
--> fail/object/derive_field_non_output_return_type.rs:10:9
|
10 | id: ObjB,
| ^^^^ the trait `IsOutputType<__S>` is not implemented for `ObjB`
|
= help: the following other types implement trait `IsOutputType<S>`:
<bool as IsOutputType<__S>>
<i32 as IsOutputType<__S>>
<f64 as IsOutputType<__S>>
<ObjA as IsOutputType<__S>>
<Box<T> as IsOutputType<S>>
<uuid::Uuid as IsOutputType<__S>>
<url::Url as IsOutputType<__S>>
<bson::datetime::DateTime as IsOutputType<__S>>
and $N others
--> fail/object/derive_field_non_output_return_type.rs:8:10
|
8 | #[derive(GraphQLObject)]
| ^^^^^^^^^^^^^ the trait `IsOutputType<__S>` is not implemented for `ObjB`
|
= help: the following other types implement trait `IsOutputType<S>`:
<bool as IsOutputType<__S>>
<i32 as IsOutputType<__S>>
<f64 as IsOutputType<__S>>
<ObjA as IsOutputType<__S>>
<Box<T> as IsOutputType<S>>
<uuid::Uuid as IsOutputType<__S>>
<url::Url as IsOutputType<__S>>
<bson::datetime::DateTime as IsOutputType<__S>>
and $N others
25 changes: 22 additions & 3 deletions tests/codegen/fail/subscription/argument_non_input_type.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,13 @@ error[E0277]: the trait bound `ObjA: IsInputType<__S>` is not satisfied
and $N others

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

error[E0277]: the trait bound `ObjA: FromInputValue<__S>` is not satisfied
--> fail/subscription/argument_non_input_type.rs:15:1
Expand All @@ -66,3 +68,20 @@ error[E0277]: the trait bound `ObjA: FromInputValue<__S>` is not satisfied
<juniper::schema::model::DirectiveLocation as FromInputValue<__S>>
and $N others
= note: this error originates in the attribute macro `graphql_subscription` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `ObjA: FromInputValue<__S>` is not satisfied
--> fail/subscription/argument_non_input_type.rs:17:29
|
17 | async fn id(&self, obj: ObjA) -> Stream<'static, &'static str> {
| ^^^^ the trait `FromInputValue<__S>` is not implemented for `ObjA`
|
= help: the following other types implement trait `FromInputValue<S>`:
<bool as FromInputValue<__S>>
<i32 as FromInputValue<__S>>
<f64 as FromInputValue<__S>>
<Box<T> as FromInputValue<S>>
<uuid::Uuid as FromInputValue<__S>>
<url::Url as FromInputValue<__S>>
<bson::datetime::DateTime as FromInputValue<__S>>
<juniper::schema::model::DirectiveLocation as FromInputValue<__S>>
and $N others
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
error[E0277]: the trait bound `ObjB: IsOutputType<__S>` is not satisfied
--> fail/subscription/field_non_output_return_type.rs:17:27
--> fail/subscription/field_non_output_return_type.rs:15:1
|
17 | async fn id(&self) -> Stream<'static, ObjB> {
| ^^^^^^ the trait `IsOutputType<__S>` is not implemented for `ObjB`
15 | #[graphql_subscription]
| ^^^^^^^^^^^^^^^^^^^^^^^ the trait `IsOutputType<__S>` is not implemented for `ObjB`
|
= help: the following other types implement trait `IsOutputType<S>`:
<bool as IsOutputType<__S>>
Expand Down
Loading

0 comments on commit 8a7d1ff

Please sign in to comment.