From aff49ae5ec5c9f608344fda86f896bf621cd61a2 Mon Sep 17 00:00:00 2001 From: tyranron <tyranron@gmail.com> Date: Fri, 23 Jun 2023 13:11:52 +0200 Subject: [PATCH] Fix codegen tests for latest nightly --- .../derive_incompatible_field_type.stderr | 55 +-- .../attr_field_non_output_return_type.stderr | 4 +- .../attr_implementers_duplicate_pretty.stderr | 32 -- .../struct/attr_missing_field.stderr | 312 ------------------ ...derive_field_non_output_return_type.stderr | 4 +- ...erive_implementers_duplicate_pretty.stderr | 32 -- .../struct/derive_missing_field.stderr | 312 ------------------ .../trait/argument_non_input_type.stderr | 45 +-- .../trait/argument_wrong_default_array.stderr | 8 +- .../trait/field_non_output_return_type.stderr | 4 +- .../implementers_duplicate_pretty.stderr | 32 -- .../fail/interface/trait/missing_field.stderr | 312 ------------------ .../object/argument_non_input_type.stderr | 3 + .../argument_wrong_default_array.stderr | 8 +- .../attr_field_non_output_return_type.stderr | 4 +- ...derive_field_non_output_return_type.stderr | 4 +- .../argument_non_input_type.stderr | 61 ++-- .../argument_wrong_default_array.stderr | 8 +- .../field_non_output_return_type.stderr | 4 +- .../fail/union/enum_non_object_variant.stderr | 2 +- .../union/struct_non_object_variant.stderr | 2 +- .../union/trait_non_object_variant.stderr | 2 +- 22 files changed, 119 insertions(+), 1131 deletions(-) diff --git a/tests/codegen/fail/input-object/derive_incompatible_field_type.stderr b/tests/codegen/fail/input-object/derive_incompatible_field_type.stderr index 5ddabb55..a92b134d 100644 --- a/tests/codegen/fail/input-object/derive_incompatible_field_type.stderr +++ b/tests/codegen/fail/input-object/derive_incompatible_field_type.stderr @@ -13,32 +13,9 @@ error[E0277]: the trait bound `ObjectA: IsInputType<__S>` is not satisfied <TypeKind as IsInputType<__S>> <Vec<T> as IsInputType<S>> <[T; N] as IsInputType<S>> - and 13 others + and $N others = note: this error originates in the derive macro `GraphQLInputObject` (in Nightly builds, run with -Z macro-backtrace for more info) -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>`: - <Arc<T> as FromInputValue<S>> - <Box<T> as FromInputValue<S>> - <ID as FromInputValue<__S>> - <Object as FromInputValue<__S>> - <TypeKind as FromInputValue<__S>> - <Vec<T> as FromInputValue<S>> - <[T; N] as FromInputValue<S>> - <bool as FromInputValue<__S>> - and 10 others -note: required by a bound in `Registry::<'r, S>::arg` - --> $WORKSPACE/juniper/src/executor/mod.rs - | - | 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) - error[E0277]: the trait bound `ObjectA: FromInputValue<__S>` is not satisfied --> fail/input-object/derive_incompatible_field_type.rs:8:10 | @@ -54,7 +31,33 @@ error[E0277]: the trait bound `ObjectA: FromInputValue<__S>` is not satisfied <Vec<T> as FromInputValue<S>> <[T; N] as FromInputValue<S>> <bool as FromInputValue<__S>> - and 10 others + 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) + +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>`: + <Arc<T> as FromInputValue<S>> + <Box<T> as FromInputValue<S>> + <ID as FromInputValue<__S>> + <Object as FromInputValue<__S>> + <TypeKind as FromInputValue<__S>> + <Vec<T> as FromInputValue<S>> + <[T; N] as FromInputValue<S>> + <bool as FromInputValue<__S>> + and $N others = note: this error originates in the derive macro `GraphQLInputObject` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `ObjectA: ToInputValue<_>` is not satisfied @@ -72,5 +75,5 @@ error[E0277]: the trait bound `ObjectA: ToInputValue<_>` is not satisfied <ID as ToInputValue<__S>> <Object as ToInputValue<__S>> <TypeKind as ToInputValue<__S>> - and 14 others + and $N others = note: this error originates in the derive macro `GraphQLInputObject` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/codegen/fail/interface/struct/attr_field_non_output_return_type.stderr b/tests/codegen/fail/interface/struct/attr_field_non_output_return_type.stderr index 8ddf287d..1a09b89d 100644 --- a/tests/codegen/fail/interface/struct/attr_field_non_output_return_type.stderr +++ b/tests/codegen/fail/interface/struct/attr_field_non_output_return_type.stderr @@ -7,10 +7,10 @@ error[E0277]: the trait bound `ObjB: IsOutputType<__S>` is not satisfied = help: the following other types implement trait `IsOutputType<S>`: <&T as IsOutputType<S>> <Arc<T> as IsOutputType<S>> + <Argument<'a, S> as IsOutputType<S>> <Box<T> as IsOutputType<S>> <CharacterValueEnum as IsOutputType<__S>> <EnumValue as IsOutputType<__S>> <ID as IsOutputType<__S>> <SchemaType<'a, S> as IsOutputType<S>> - <TypeKind as IsOutputType<__S>> - and 18 others + and $N others diff --git a/tests/codegen/fail/interface/struct/attr_implementers_duplicate_pretty.stderr b/tests/codegen/fail/interface/struct/attr_implementers_duplicate_pretty.stderr index e9b89b58..c87ad2e0 100644 --- a/tests/codegen/fail/interface/struct/attr_implementers_duplicate_pretty.stderr +++ b/tests/codegen/fail/interface/struct/attr_implementers_duplicate_pretty.stderr @@ -9,35 +9,3 @@ error[E0412]: cannot find type `CharacterValue` in this scope | 4 | #[graphql(impl = CharacterValue)] | ^^^^^^^^^^^^^^ not found in this scope - -note: erroneous constant used - --> fail/interface/struct/attr_implementers_duplicate_pretty.rs:3:10 - | -3 | #[derive(GraphQLObject)] - | ^^^^^^^^^^^^^ - | - = note: this note originates in the macro `$crate::const_concat` which comes from the expansion of the derive macro `GraphQLObject` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/attr_implementers_duplicate_pretty.rs:3:10 - | -3 | #[derive(GraphQLObject)] - | ^^^^^^^^^^^^^ - | - = note: this note originates in the macro `$crate::const_concat` which comes from the expansion of the derive macro `GraphQLObject` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/attr_implementers_duplicate_pretty.rs:3:10 - | -3 | #[derive(GraphQLObject)] - | ^^^^^^^^^^^^^ - | - = note: this note originates in the macro `$crate::const_concat` which comes from the expansion of the derive macro `GraphQLObject` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/attr_implementers_duplicate_pretty.rs:3:10 - | -3 | #[derive(GraphQLObject)] - | ^^^^^^^^^^^^^ - | - = note: this note originates in the macro `$crate::const_concat` which comes from the expansion of the derive macro `GraphQLObject` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/codegen/fail/interface/struct/attr_missing_field.stderr b/tests/codegen/fail/interface/struct/attr_missing_field.stderr index e9bf17b0..b3b53574 100644 --- a/tests/codegen/fail/interface/struct/attr_missing_field.stderr +++ b/tests/codegen/fail/interface/struct/attr_missing_field.stderr @@ -6,254 +6,6 @@ error[E0080]: evaluation of constant value failed | = note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) -note: erroneous constant used - --> fail/interface/struct/attr_missing_field.rs:11:5 - | -11 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::assert_field_args` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/attr_missing_field.rs:11:5 - | -11 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::assert_field_args` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/attr_missing_field.rs:11:5 - | -11 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::assert_field_args` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/attr_missing_field.rs:11:5 - | -11 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::assert_field_args` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/attr_missing_field.rs:11:5 - | -11 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::assert_field_args` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/attr_missing_field.rs:11:5 - | -11 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::assert_field_args` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/attr_missing_field.rs:11:5 - | -11 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::format_type` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/attr_missing_field.rs:11:5 - | -11 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::format_type` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/attr_missing_field.rs:11:5 - | -11 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::format_type` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/attr_missing_field.rs:11:5 - | -11 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::assert_field_args` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/attr_missing_field.rs:11:5 - | -11 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::format_type` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/attr_missing_field.rs:11:5 - | -11 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::format_type` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/attr_missing_field.rs:11:5 - | -11 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::format_type` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/attr_missing_field.rs:11:5 - | -11 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::assert_field_args` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/attr_missing_field.rs:11:5 - | -11 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::assert_field_args` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/attr_missing_field.rs:11:5 - | -11 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::const_concat` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/attr_missing_field.rs:11:5 - | -11 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::const_concat` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/attr_missing_field.rs:11:5 - | -11 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::const_concat` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/attr_missing_field.rs:11:5 - | -11 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::assert_field_args` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/attr_missing_field.rs:11:5 - | -11 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::const_concat` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/attr_missing_field.rs:11:5 - | -11 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::const_concat` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/attr_missing_field.rs:11:5 - | -11 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::const_concat` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/attr_missing_field.rs:11:5 - | -11 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::assert_field_args` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/attr_missing_field.rs:11:5 - | -11 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::assert_field_args` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/attr_missing_field.rs:11:5 - | -11 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::const_concat` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/attr_missing_field.rs:11:5 - | -11 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::const_concat` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/attr_missing_field.rs:11:5 - | -11 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::const_concat` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/attr_missing_field.rs:11:5 - | -11 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::assert_field_args` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/attr_missing_field.rs:11:5 - | -11 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::const_concat` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/attr_missing_field.rs:11:5 - | -11 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::const_concat` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/attr_missing_field.rs:11:5 - | -11 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::const_concat` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - error[E0080]: evaluation of constant value failed --> fail/interface/struct/attr_missing_field.rs:11:5 | @@ -261,67 +13,3 @@ error[E0080]: evaluation of constant value failed | ^^ the evaluated program panicked at 'Failed to implement interface `Character` on `ObjA`: Field `id` isn't implemented on `ObjA`.', $DIR/fail/interface/struct/attr_missing_field.rs:11:5 | = note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/attr_missing_field.rs:11:5 - | -11 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::assert_subtype` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/attr_missing_field.rs:11:5 - | -11 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::format_type` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/attr_missing_field.rs:11:5 - | -11 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::format_type` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/attr_missing_field.rs:11:5 - | -11 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::format_type` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/attr_missing_field.rs:11:5 - | -11 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::format_type` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/attr_missing_field.rs:11:5 - | -11 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::const_concat` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/attr_missing_field.rs:11:5 - | -11 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::const_concat` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/attr_missing_field.rs:11:5 - | -11 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::const_concat` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/codegen/fail/interface/struct/derive_field_non_output_return_type.stderr b/tests/codegen/fail/interface/struct/derive_field_non_output_return_type.stderr index bc9a79a7..85ec8e27 100644 --- a/tests/codegen/fail/interface/struct/derive_field_non_output_return_type.stderr +++ b/tests/codegen/fail/interface/struct/derive_field_non_output_return_type.stderr @@ -7,10 +7,10 @@ error[E0277]: the trait bound `ObjB: IsOutputType<__S>` is not satisfied = help: the following other types implement trait `IsOutputType<S>`: <&T as IsOutputType<S>> <Arc<T> as IsOutputType<S>> + <Argument<'a, S> as IsOutputType<S>> <Box<T> as IsOutputType<S>> <CharacterValueEnum as IsOutputType<__S>> <EnumValue as IsOutputType<__S>> <ID as IsOutputType<__S>> <SchemaType<'a, S> as IsOutputType<S>> - <TypeKind as IsOutputType<__S>> - and 18 others + and $N others diff --git a/tests/codegen/fail/interface/struct/derive_implementers_duplicate_pretty.stderr b/tests/codegen/fail/interface/struct/derive_implementers_duplicate_pretty.stderr index f69e8d86..a4a80378 100644 --- a/tests/codegen/fail/interface/struct/derive_implementers_duplicate_pretty.stderr +++ b/tests/codegen/fail/interface/struct/derive_implementers_duplicate_pretty.stderr @@ -9,35 +9,3 @@ error[E0412]: cannot find type `CharacterValue` in this scope | 4 | #[graphql(impl = CharacterValue)] | ^^^^^^^^^^^^^^ not found in this scope - -note: erroneous constant used - --> fail/interface/struct/derive_implementers_duplicate_pretty.rs:3:10 - | -3 | #[derive(GraphQLObject)] - | ^^^^^^^^^^^^^ - | - = note: this note originates in the macro `$crate::const_concat` which comes from the expansion of the derive macro `GraphQLObject` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/derive_implementers_duplicate_pretty.rs:3:10 - | -3 | #[derive(GraphQLObject)] - | ^^^^^^^^^^^^^ - | - = note: this note originates in the macro `$crate::const_concat` which comes from the expansion of the derive macro `GraphQLObject` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/derive_implementers_duplicate_pretty.rs:3:10 - | -3 | #[derive(GraphQLObject)] - | ^^^^^^^^^^^^^ - | - = note: this note originates in the macro `$crate::const_concat` which comes from the expansion of the derive macro `GraphQLObject` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/derive_implementers_duplicate_pretty.rs:3:10 - | -3 | #[derive(GraphQLObject)] - | ^^^^^^^^^^^^^ - | - = note: this note originates in the macro `$crate::const_concat` which comes from the expansion of the derive macro `GraphQLObject` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/codegen/fail/interface/struct/derive_missing_field.stderr b/tests/codegen/fail/interface/struct/derive_missing_field.stderr index 51d1c5ac..6f934431 100644 --- a/tests/codegen/fail/interface/struct/derive_missing_field.stderr +++ b/tests/codegen/fail/interface/struct/derive_missing_field.stderr @@ -6,254 +6,6 @@ error[E0080]: evaluation of constant value failed | = note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) -note: erroneous constant used - --> fail/interface/struct/derive_missing_field.rs:12:5 - | -12 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::assert_field_args` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/derive_missing_field.rs:12:5 - | -12 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::assert_field_args` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/derive_missing_field.rs:12:5 - | -12 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::assert_field_args` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/derive_missing_field.rs:12:5 - | -12 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::assert_field_args` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/derive_missing_field.rs:12:5 - | -12 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::assert_field_args` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/derive_missing_field.rs:12:5 - | -12 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::assert_field_args` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/derive_missing_field.rs:12:5 - | -12 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::format_type` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/derive_missing_field.rs:12:5 - | -12 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::format_type` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/derive_missing_field.rs:12:5 - | -12 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::format_type` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/derive_missing_field.rs:12:5 - | -12 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::assert_field_args` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/derive_missing_field.rs:12:5 - | -12 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::format_type` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/derive_missing_field.rs:12:5 - | -12 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::format_type` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/derive_missing_field.rs:12:5 - | -12 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::format_type` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/derive_missing_field.rs:12:5 - | -12 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::assert_field_args` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/derive_missing_field.rs:12:5 - | -12 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::assert_field_args` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/derive_missing_field.rs:12:5 - | -12 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::const_concat` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/derive_missing_field.rs:12:5 - | -12 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::const_concat` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/derive_missing_field.rs:12:5 - | -12 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::const_concat` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/derive_missing_field.rs:12:5 - | -12 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::assert_field_args` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/derive_missing_field.rs:12:5 - | -12 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::const_concat` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/derive_missing_field.rs:12:5 - | -12 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::const_concat` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/derive_missing_field.rs:12:5 - | -12 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::const_concat` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/derive_missing_field.rs:12:5 - | -12 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::assert_field_args` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/derive_missing_field.rs:12:5 - | -12 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::assert_field_args` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/derive_missing_field.rs:12:5 - | -12 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::const_concat` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/derive_missing_field.rs:12:5 - | -12 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::const_concat` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/derive_missing_field.rs:12:5 - | -12 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::const_concat` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/derive_missing_field.rs:12:5 - | -12 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::assert_field_args` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/derive_missing_field.rs:12:5 - | -12 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::const_concat` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/derive_missing_field.rs:12:5 - | -12 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::const_concat` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/derive_missing_field.rs:12:5 - | -12 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::const_concat` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - error[E0080]: evaluation of constant value failed --> fail/interface/struct/derive_missing_field.rs:12:5 | @@ -261,67 +13,3 @@ error[E0080]: evaluation of constant value failed | ^^ the evaluated program panicked at 'Failed to implement interface `Character` on `ObjA`: Field `id` isn't implemented on `ObjA`.', $DIR/fail/interface/struct/derive_missing_field.rs:12:5 | = note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/derive_missing_field.rs:12:5 - | -12 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::assert_subtype` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/derive_missing_field.rs:12:5 - | -12 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::format_type` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/derive_missing_field.rs:12:5 - | -12 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::format_type` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/derive_missing_field.rs:12:5 - | -12 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::format_type` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/derive_missing_field.rs:12:5 - | -12 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::format_type` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/derive_missing_field.rs:12:5 - | -12 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::const_concat` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/derive_missing_field.rs:12:5 - | -12 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::const_concat` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/struct/derive_missing_field.rs:12:5 - | -12 | id: String, - | ^^ - | - = note: this note originates in the macro `$crate::const_concat` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/codegen/fail/interface/trait/argument_non_input_type.stderr b/tests/codegen/fail/interface/trait/argument_non_input_type.stderr index a085a84f..86291032 100644 --- a/tests/codegen/fail/interface/trait/argument_non_input_type.stderr +++ b/tests/codegen/fail/interface/trait/argument_non_input_type.stderr @@ -13,27 +13,30 @@ error[E0277]: the trait bound `ObjA: IsInputType<__S>` is not satisfied <Vec<T> as IsInputType<S>> <[T; N] as IsInputType<S>> <[T] as IsInputType<S>> - and 12 others + 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>`: - <Arc<T> as FromInputValue<S>> - <Box<T> as FromInputValue<S>> - <ID as FromInputValue<__S>> - <TypeKind as FromInputValue<__S>> - <Vec<T> as FromInputValue<S>> - <[T; N] as FromInputValue<S>> - <bool as FromInputValue<__S>> - <bson::datetime::DateTime as FromInputValue<__S>> - and 9 others + --> 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>`: + <Arc<T> as FromInputValue<S>> + <Box<T> as FromInputValue<S>> + <ID as FromInputValue<__S>> + <TypeKind as FromInputValue<__S>> + <Vec<T> as FromInputValue<S>> + <[T; N] as FromInputValue<S>> + <bool 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 - | - | 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` + = note: this error originates in the attribute macro `graphql_interface` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/codegen/fail/interface/trait/argument_wrong_default_array.stderr b/tests/codegen/fail/interface/trait/argument_wrong_default_array.stderr index 6aca0442..4d015af7 100644 --- a/tests/codegen/fail/interface/trait/argument_wrong_default_array.stderr +++ b/tests/codegen/fail/interface/trait/argument_wrong_default_array.stderr @@ -9,10 +9,10 @@ error[E0277]: the trait bound `[bool; 2]: From<[bool; 3]>` is not satisfied <&'a [u32; 4] as From<&'a ppv_lite86::x86_64::vec128_storage>> <&'a [u8] as From<&'a ascii::ascii_str::AsciiStr>> <&'a mut [ascii::ascii_char::AsciiChar] as From<&'a mut ascii::ascii_str::AsciiStr>> - <[T; LANES] as From<Simd<T, LANES>>> - <[bool; LANES] as From<Mask<T, LANES>>> - <[u128; 1] as From<ppv_lite86::x86_64::vec128_storage>> - <[u128; 2] as From<ppv_lite86::x86_64::vec256_storage>> + <&'input [u8] as From<gimli::read::endian_slice::EndianSlice<'input, Endian>>> + <[T; 10] as From<(T, T, T, T, T, T, T, T, T, T)>> + <[T; 11] as From<(T, T, T, T, T, T, T, T, T, T, T)>> + <[T; 12] as From<(T, T, T, T, T, T, T, T, T, T, T, T)>> and $N others = note: required for `[bool; 3]` to implement `Into<[bool; 2]>` = note: this error originates in the attribute macro `graphql_interface` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/codegen/fail/interface/trait/field_non_output_return_type.stderr b/tests/codegen/fail/interface/trait/field_non_output_return_type.stderr index e1042ff9..8cf4d4be 100644 --- a/tests/codegen/fail/interface/trait/field_non_output_return_type.stderr +++ b/tests/codegen/fail/interface/trait/field_non_output_return_type.stderr @@ -7,10 +7,10 @@ error[E0277]: the trait bound `ObjB: IsOutputType<__S>` is not satisfied = help: the following other types implement trait `IsOutputType<S>`: <&T as IsOutputType<S>> <Arc<T> as IsOutputType<S>> + <Argument<'a, S> as IsOutputType<S>> <Box<T> as IsOutputType<S>> <CharacterValueEnum as IsOutputType<__S>> <EnumValue as IsOutputType<__S>> <ID as IsOutputType<__S>> <SchemaType<'a, S> as IsOutputType<S>> - <TypeKind as IsOutputType<__S>> - and 18 others + and $N others diff --git a/tests/codegen/fail/interface/trait/implementers_duplicate_pretty.stderr b/tests/codegen/fail/interface/trait/implementers_duplicate_pretty.stderr index cdccedc6..5d546902 100644 --- a/tests/codegen/fail/interface/trait/implementers_duplicate_pretty.stderr +++ b/tests/codegen/fail/interface/trait/implementers_duplicate_pretty.stderr @@ -9,35 +9,3 @@ error[E0412]: cannot find type `CharacterValue` in this scope | 4 | #[graphql(impl = CharacterValue)] | ^^^^^^^^^^^^^^ not found in this scope - -note: erroneous constant used - --> fail/interface/trait/implementers_duplicate_pretty.rs:3:10 - | -3 | #[derive(GraphQLObject)] - | ^^^^^^^^^^^^^ - | - = note: this note originates in the macro `$crate::const_concat` which comes from the expansion of the derive macro `GraphQLObject` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/trait/implementers_duplicate_pretty.rs:3:10 - | -3 | #[derive(GraphQLObject)] - | ^^^^^^^^^^^^^ - | - = note: this note originates in the macro `$crate::const_concat` which comes from the expansion of the derive macro `GraphQLObject` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/trait/implementers_duplicate_pretty.rs:3:10 - | -3 | #[derive(GraphQLObject)] - | ^^^^^^^^^^^^^ - | - = note: this note originates in the macro `$crate::const_concat` which comes from the expansion of the derive macro `GraphQLObject` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/trait/implementers_duplicate_pretty.rs:3:10 - | -3 | #[derive(GraphQLObject)] - | ^^^^^^^^^^^^^ - | - = note: this note originates in the macro `$crate::const_concat` which comes from the expansion of the derive macro `GraphQLObject` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/codegen/fail/interface/trait/missing_field.stderr b/tests/codegen/fail/interface/trait/missing_field.stderr index f37d44b8..b3bcc8e5 100644 --- a/tests/codegen/fail/interface/trait/missing_field.stderr +++ b/tests/codegen/fail/interface/trait/missing_field.stderr @@ -6,254 +6,6 @@ error[E0080]: evaluation of constant value failed | = note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) -note: erroneous constant used - --> fail/interface/trait/missing_field.rs:11:8 - | -11 | fn id(&self) -> &str; - | ^^ - | - = note: this note originates in the macro `$crate::assert_field_args` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/trait/missing_field.rs:11:8 - | -11 | fn id(&self) -> &str; - | ^^ - | - = note: this note originates in the macro `$crate::assert_field_args` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/trait/missing_field.rs:11:8 - | -11 | fn id(&self) -> &str; - | ^^ - | - = note: this note originates in the macro `$crate::assert_field_args` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/trait/missing_field.rs:11:8 - | -11 | fn id(&self) -> &str; - | ^^ - | - = note: this note originates in the macro `$crate::assert_field_args` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/trait/missing_field.rs:11:8 - | -11 | fn id(&self) -> &str; - | ^^ - | - = note: this note originates in the macro `$crate::assert_field_args` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/trait/missing_field.rs:11:8 - | -11 | fn id(&self) -> &str; - | ^^ - | - = note: this note originates in the macro `$crate::assert_field_args` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/trait/missing_field.rs:11:8 - | -11 | fn id(&self) -> &str; - | ^^ - | - = note: this note originates in the macro `$crate::format_type` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/trait/missing_field.rs:11:8 - | -11 | fn id(&self) -> &str; - | ^^ - | - = note: this note originates in the macro `$crate::format_type` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/trait/missing_field.rs:11:8 - | -11 | fn id(&self) -> &str; - | ^^ - | - = note: this note originates in the macro `$crate::format_type` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/trait/missing_field.rs:11:8 - | -11 | fn id(&self) -> &str; - | ^^ - | - = note: this note originates in the macro `$crate::assert_field_args` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/trait/missing_field.rs:11:8 - | -11 | fn id(&self) -> &str; - | ^^ - | - = note: this note originates in the macro `$crate::format_type` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/trait/missing_field.rs:11:8 - | -11 | fn id(&self) -> &str; - | ^^ - | - = note: this note originates in the macro `$crate::format_type` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/trait/missing_field.rs:11:8 - | -11 | fn id(&self) -> &str; - | ^^ - | - = note: this note originates in the macro `$crate::format_type` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/trait/missing_field.rs:11:8 - | -11 | fn id(&self) -> &str; - | ^^ - | - = note: this note originates in the macro `$crate::assert_field_args` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/trait/missing_field.rs:11:8 - | -11 | fn id(&self) -> &str; - | ^^ - | - = note: this note originates in the macro `$crate::assert_field_args` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/trait/missing_field.rs:11:8 - | -11 | fn id(&self) -> &str; - | ^^ - | - = note: this note originates in the macro `$crate::const_concat` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/trait/missing_field.rs:11:8 - | -11 | fn id(&self) -> &str; - | ^^ - | - = note: this note originates in the macro `$crate::const_concat` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/trait/missing_field.rs:11:8 - | -11 | fn id(&self) -> &str; - | ^^ - | - = note: this note originates in the macro `$crate::const_concat` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/trait/missing_field.rs:11:8 - | -11 | fn id(&self) -> &str; - | ^^ - | - = note: this note originates in the macro `$crate::assert_field_args` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/trait/missing_field.rs:11:8 - | -11 | fn id(&self) -> &str; - | ^^ - | - = note: this note originates in the macro `$crate::const_concat` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/trait/missing_field.rs:11:8 - | -11 | fn id(&self) -> &str; - | ^^ - | - = note: this note originates in the macro `$crate::const_concat` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/trait/missing_field.rs:11:8 - | -11 | fn id(&self) -> &str; - | ^^ - | - = note: this note originates in the macro `$crate::const_concat` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/trait/missing_field.rs:11:8 - | -11 | fn id(&self) -> &str; - | ^^ - | - = note: this note originates in the macro `$crate::assert_field_args` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/trait/missing_field.rs:11:8 - | -11 | fn id(&self) -> &str; - | ^^ - | - = note: this note originates in the macro `$crate::assert_field_args` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/trait/missing_field.rs:11:8 - | -11 | fn id(&self) -> &str; - | ^^ - | - = note: this note originates in the macro `$crate::const_concat` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/trait/missing_field.rs:11:8 - | -11 | fn id(&self) -> &str; - | ^^ - | - = note: this note originates in the macro `$crate::const_concat` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/trait/missing_field.rs:11:8 - | -11 | fn id(&self) -> &str; - | ^^ - | - = note: this note originates in the macro `$crate::const_concat` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/trait/missing_field.rs:11:8 - | -11 | fn id(&self) -> &str; - | ^^ - | - = note: this note originates in the macro `$crate::assert_field_args` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/trait/missing_field.rs:11:8 - | -11 | fn id(&self) -> &str; - | ^^ - | - = note: this note originates in the macro `$crate::const_concat` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/trait/missing_field.rs:11:8 - | -11 | fn id(&self) -> &str; - | ^^ - | - = note: this note originates in the macro `$crate::const_concat` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/trait/missing_field.rs:11:8 - | -11 | fn id(&self) -> &str; - | ^^ - | - = note: this note originates in the macro `$crate::const_concat` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - error[E0080]: evaluation of constant value failed --> fail/interface/trait/missing_field.rs:11:8 | @@ -261,67 +13,3 @@ error[E0080]: evaluation of constant value failed | ^^ the evaluated program panicked at 'Failed to implement interface `Character` on `ObjA`: Field `id` isn't implemented on `ObjA`.', $DIR/fail/interface/trait/missing_field.rs:11:8 | = note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/trait/missing_field.rs:11:8 - | -11 | fn id(&self) -> &str; - | ^^ - | - = note: this note originates in the macro `$crate::assert_subtype` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/trait/missing_field.rs:11:8 - | -11 | fn id(&self) -> &str; - | ^^ - | - = note: this note originates in the macro `$crate::format_type` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/trait/missing_field.rs:11:8 - | -11 | fn id(&self) -> &str; - | ^^ - | - = note: this note originates in the macro `$crate::format_type` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/trait/missing_field.rs:11:8 - | -11 | fn id(&self) -> &str; - | ^^ - | - = note: this note originates in the macro `$crate::format_type` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/trait/missing_field.rs:11:8 - | -11 | fn id(&self) -> &str; - | ^^ - | - = note: this note originates in the macro `$crate::format_type` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/trait/missing_field.rs:11:8 - | -11 | fn id(&self) -> &str; - | ^^ - | - = note: this note originates in the macro `$crate::const_concat` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/trait/missing_field.rs:11:8 - | -11 | fn id(&self) -> &str; - | ^^ - | - = note: this note originates in the macro `$crate::const_concat` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) - -note: erroneous constant used - --> fail/interface/trait/missing_field.rs:11:8 - | -11 | fn id(&self) -> &str; - | ^^ - | - = note: this note originates in the macro `$crate::const_concat` which comes from the expansion of the macro `::juniper::assert_field` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/codegen/fail/object/argument_non_input_type.stderr b/tests/codegen/fail/object/argument_non_input_type.stderr index 8a59e71e..459ed680 100644 --- a/tests/codegen/fail/object/argument_non_input_type.stderr +++ b/tests/codegen/fail/object/argument_non_input_type.stderr @@ -34,6 +34,9 @@ error[E0277]: the trait bound `ObjA: FromInputValue<__S>` is not satisfied 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_object` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/codegen/fail/object/argument_wrong_default_array.stderr b/tests/codegen/fail/object/argument_wrong_default_array.stderr index d59797e4..57754113 100644 --- a/tests/codegen/fail/object/argument_wrong_default_array.stderr +++ b/tests/codegen/fail/object/argument_wrong_default_array.stderr @@ -9,10 +9,10 @@ error[E0277]: the trait bound `[bool; 2]: From<[bool; 3]>` is not satisfied <&'a [u32; 4] as From<&'a ppv_lite86::x86_64::vec128_storage>> <&'a [u8] as From<&'a ascii::ascii_str::AsciiStr>> <&'a mut [ascii::ascii_char::AsciiChar] as From<&'a mut ascii::ascii_str::AsciiStr>> - <[T; LANES] as From<Simd<T, LANES>>> - <[bool; LANES] as From<Mask<T, LANES>>> - <[u128; 1] as From<ppv_lite86::x86_64::vec128_storage>> - <[u128; 2] as From<ppv_lite86::x86_64::vec256_storage>> + <&'input [u8] as From<gimli::read::endian_slice::EndianSlice<'input, Endian>>> + <[T; 10] as From<(T, T, T, T, T, T, T, T, T, T)>> + <[T; 11] as From<(T, T, T, T, T, T, T, T, T, T, T)>> + <[T; 12] as From<(T, T, T, T, T, T, T, T, T, T, T, T)>> and $N others = note: required for `[bool; 3]` to implement `Into<[bool; 2]>` = note: this error originates in the attribute macro `graphql_object` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/codegen/fail/object/attr_field_non_output_return_type.stderr b/tests/codegen/fail/object/attr_field_non_output_return_type.stderr index 079f3566..70ab4f8e 100644 --- a/tests/codegen/fail/object/attr_field_non_output_return_type.stderr +++ b/tests/codegen/fail/object/attr_field_non_output_return_type.stderr @@ -7,10 +7,10 @@ error[E0277]: the trait bound `ObjB: IsOutputType<__S>` is not satisfied = help: the following other types implement trait `IsOutputType<S>`: <&T as IsOutputType<S>> <Arc<T> as IsOutputType<S>> + <Argument<'a, S> as IsOutputType<S>> <Box<T> as IsOutputType<S>> <EnumValue as IsOutputType<__S>> <ID as IsOutputType<__S>> <ObjA as IsOutputType<__S>> <SchemaType<'a, S> as IsOutputType<S>> - <TypeKind as IsOutputType<__S>> - and 18 others + and $N others diff --git a/tests/codegen/fail/object/derive_field_non_output_return_type.stderr b/tests/codegen/fail/object/derive_field_non_output_return_type.stderr index 2ce49070..29cb7960 100644 --- a/tests/codegen/fail/object/derive_field_non_output_return_type.stderr +++ b/tests/codegen/fail/object/derive_field_non_output_return_type.stderr @@ -7,10 +7,10 @@ error[E0277]: the trait bound `ObjB: IsOutputType<__S>` is not satisfied = help: the following other types implement trait `IsOutputType<S>`: <&T as IsOutputType<S>> <Arc<T> as IsOutputType<S>> + <Argument<'a, S> as IsOutputType<S>> <Box<T> as IsOutputType<S>> <EnumValue as IsOutputType<__S>> <ID as IsOutputType<__S>> <ObjA as IsOutputType<__S>> <SchemaType<'a, S> as IsOutputType<S>> - <TypeKind as IsOutputType<__S>> - and 18 others + and $N others diff --git a/tests/codegen/fail/subscription/argument_non_input_type.stderr b/tests/codegen/fail/subscription/argument_non_input_type.stderr index f1f8538b..510f6ef2 100644 --- a/tests/codegen/fail/subscription/argument_non_input_type.stderr +++ b/tests/codegen/fail/subscription/argument_non_input_type.stderr @@ -1,3 +1,11 @@ +warning: unused variable: `obj` + --> fail/subscription/argument_non_input_type.rs:17:24 + | +17 | async fn id(&self, obj: ObjA) -> Stream<'static, &'static str> { + | ^^^ help: if this is intentional, prefix it with an underscore: `_obj` + | + = note: `#[warn(unused_variables)]` on by default + error[E0277]: the trait bound `ObjA: IsInputType<__S>` is not satisfied --> fail/subscription/argument_non_input_type.rs:17:29 | @@ -13,30 +21,7 @@ error[E0277]: the trait bound `ObjA: IsInputType<__S>` is not satisfied <Vec<T> as IsInputType<S>> <[T; N] as IsInputType<S>> <[T] as IsInputType<S>> - and 12 others - -error[E0277]: the trait bound `ObjA: FromInputValue<__S>` is not satisfied - --> fail/subscription/argument_non_input_type.rs:15:1 - | -15 | #[graphql_subscription] - | ^^^^^^^^^^^^^^^^^^^^^^^ the trait `FromInputValue<__S>` is not implemented for `ObjA` - | - = help: the following other types implement trait `FromInputValue<S>`: - <Arc<T> as FromInputValue<S>> - <Box<T> as FromInputValue<S>> - <ID as FromInputValue<__S>> - <TypeKind as FromInputValue<__S>> - <Vec<T> as FromInputValue<S>> - <[T; N] as FromInputValue<S>> - <bool as FromInputValue<__S>> - <bson::datetime::DateTime as FromInputValue<__S>> - and 9 others -note: required by a bound in `Registry::<'r, S>::arg` - --> $WORKSPACE/juniper/src/executor/mod.rs - | - | 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) + and $N others error[E0277]: the trait bound `ObjA: FromInputValue<__S>` is not satisfied --> fail/subscription/argument_non_input_type.rs:15:1 @@ -53,5 +38,31 @@ error[E0277]: the trait bound `ObjA: FromInputValue<__S>` is not satisfied <[T; N] as FromInputValue<S>> <bool as FromInputValue<__S>> <bson::datetime::DateTime as FromInputValue<__S>> - and 9 others + 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_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 + | +15 | #[graphql_subscription] + | ^^^^^^^^^^^^^^^^^^^^^^^ the trait `FromInputValue<__S>` is not implemented for `ObjA` + | + = help: the following other types implement trait `FromInputValue<S>`: + <Arc<T> as FromInputValue<S>> + <Box<T> as FromInputValue<S>> + <ID as FromInputValue<__S>> + <TypeKind as FromInputValue<__S>> + <Vec<T> as FromInputValue<S>> + <[T; N] as FromInputValue<S>> + <bool as FromInputValue<__S>> + <bson::datetime::DateTime 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) diff --git a/tests/codegen/fail/subscription/argument_wrong_default_array.stderr b/tests/codegen/fail/subscription/argument_wrong_default_array.stderr index a04be192..c8db7559 100644 --- a/tests/codegen/fail/subscription/argument_wrong_default_array.stderr +++ b/tests/codegen/fail/subscription/argument_wrong_default_array.stderr @@ -9,10 +9,10 @@ error[E0277]: the trait bound `[bool; 2]: From<[bool; 3]>` is not satisfied <&'a [u32; 4] as From<&'a ppv_lite86::x86_64::vec128_storage>> <&'a [u8] as From<&'a ascii::ascii_str::AsciiStr>> <&'a mut [ascii::ascii_char::AsciiChar] as From<&'a mut ascii::ascii_str::AsciiStr>> - <[T; LANES] as From<Simd<T, LANES>>> - <[bool; LANES] as From<Mask<T, LANES>>> - <[u128; 1] as From<ppv_lite86::x86_64::vec128_storage>> - <[u128; 2] as From<ppv_lite86::x86_64::vec256_storage>> + <&'input [u8] as From<gimli::read::endian_slice::EndianSlice<'input, Endian>>> + <[T; 10] as From<(T, T, T, T, T, T, T, T, T, T)>> + <[T; 11] as From<(T, T, T, T, T, T, T, T, T, T, T)>> + <[T; 12] as From<(T, T, T, T, T, T, T, T, T, T, T, T)>> and $N others = note: required for `[bool; 3]` to implement `Into<[bool; 2]>` = note: this error originates in the attribute macro `graphql_subscription` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/codegen/fail/subscription/field_non_output_return_type.stderr b/tests/codegen/fail/subscription/field_non_output_return_type.stderr index 9b5be8a7..0665af98 100644 --- a/tests/codegen/fail/subscription/field_non_output_return_type.stderr +++ b/tests/codegen/fail/subscription/field_non_output_return_type.stderr @@ -7,10 +7,10 @@ error[E0277]: the trait bound `ObjB: IsOutputType<__S>` is not satisfied = help: the following other types implement trait `IsOutputType<S>`: <&T as IsOutputType<S>> <Arc<T> as IsOutputType<S>> + <Argument<'a, S> as IsOutputType<S>> <Box<T> as IsOutputType<S>> <EnumValue as IsOutputType<__S>> <ID as IsOutputType<__S>> <ObjA as IsOutputType<__S>> <SchemaType<'a, S> as IsOutputType<S>> - <TypeKind as IsOutputType<__S>> - and 18 others + and $N others diff --git a/tests/codegen/fail/union/enum_non_object_variant.stderr b/tests/codegen/fail/union/enum_non_object_variant.stderr index 7b047248..fe447651 100644 --- a/tests/codegen/fail/union/enum_non_object_variant.stderr +++ b/tests/codegen/fail/union/enum_non_object_variant.stderr @@ -7,10 +7,10 @@ error[E0277]: the trait bound `Test: GraphQLObject<__S>` is not satisfied = help: the following other types implement trait `GraphQLObject<S>`: <&T as GraphQLObject<S>> <Arc<T> as GraphQLObject<S>> + <Argument<'a, S> as GraphQLObject<S>> <Box<T> as GraphQLObject<S>> <EnumValue as GraphQLObject<__S>> <SchemaType<'a, S> as GraphQLObject<S>> - <juniper::meta::Argument<'a, S> as GraphQLObject<S>> <juniper::meta::Field<'a, S> as GraphQLObject<S>> <juniper::schema::model::DirectiveType<'a, S> as GraphQLObject<S>> <juniper::schema::model::TypeType<'a, S> as GraphQLObject<S>> diff --git a/tests/codegen/fail/union/struct_non_object_variant.stderr b/tests/codegen/fail/union/struct_non_object_variant.stderr index cd909028..3f928a25 100644 --- a/tests/codegen/fail/union/struct_non_object_variant.stderr +++ b/tests/codegen/fail/union/struct_non_object_variant.stderr @@ -7,10 +7,10 @@ error[E0277]: the trait bound `Test: GraphQLObject<__S>` is not satisfied = help: the following other types implement trait `GraphQLObject<S>`: <&T as GraphQLObject<S>> <Arc<T> as GraphQLObject<S>> + <Argument<'a, S> as GraphQLObject<S>> <Box<T> as GraphQLObject<S>> <EnumValue as GraphQLObject<__S>> <SchemaType<'a, S> as GraphQLObject<S>> - <juniper::meta::Argument<'a, S> as GraphQLObject<S>> <juniper::meta::Field<'a, S> as GraphQLObject<S>> <juniper::schema::model::DirectiveType<'a, S> as GraphQLObject<S>> <juniper::schema::model::TypeType<'a, S> as GraphQLObject<S>> diff --git a/tests/codegen/fail/union/trait_non_object_variant.stderr b/tests/codegen/fail/union/trait_non_object_variant.stderr index 4783de9f..7e1f12fa 100644 --- a/tests/codegen/fail/union/trait_non_object_variant.stderr +++ b/tests/codegen/fail/union/trait_non_object_variant.stderr @@ -7,10 +7,10 @@ error[E0277]: the trait bound `Test: GraphQLObject<__S>` is not satisfied = help: the following other types implement trait `GraphQLObject<S>`: <&T as GraphQLObject<S>> <Arc<T> as GraphQLObject<S>> + <Argument<'a, S> as GraphQLObject<S>> <Box<T> as GraphQLObject<S>> <EnumValue as GraphQLObject<__S>> <SchemaType<'a, S> as GraphQLObject<S>> - <juniper::meta::Argument<'a, S> as GraphQLObject<S>> <juniper::meta::Field<'a, S> as GraphQLObject<S>> <juniper::schema::model::DirectiveType<'a, S> as GraphQLObject<S>> <juniper::schema::model::TypeType<'a, S> as GraphQLObject<S>>