From bbeba319ba456c172a6f5be2515453ab2f40c8a3 Mon Sep 17 00:00:00 2001 From: Christian Legnitto Date: Sat, 6 Jun 2026 16:35:50 -0700 Subject: [PATCH] Refresh codegen failure-test snapshots for Rust 1.96 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rust 1.96 reworded several diagnostics, drifting 18 `tests/codegen/fail/*.stderr` snapshots; regenerate them. `union/struct_same_type_ugly` additionally emitted its two `E0277` errors in nondeterministic order on 1.96, making the snapshot flaky. Rewrite the fixture to alias a real `GraphQLObject` type under two spellings (`Test` / `self::Test`) so it exercises only the intended `MutuallyExclusive` conflict — a single, deterministic `E0119`. The non-object case stays covered by `union/struct_non_object_variant`. --- .../derive_incompatible_field_type.stderr | 48 ++++++------- .../derive_incompatible_field_type.stderr | 48 ++++++------- .../interface/struct/attr_cyclic_impl.stderr | 72 ------------------- .../attr_field_non_output_return_type.stderr | 16 ++--- .../struct/derive_cyclic_impl.stderr | 72 ------------------- ...derive_field_non_output_return_type.stderr | 16 ++--- .../trait/argument_non_input_type.stderr | 36 +++++----- .../fail/interface/trait/cyclic_impl.stderr | 72 ------------------- .../trait/field_non_output_return_type.stderr | 16 ++--- .../object/argument_non_input_type.stderr | 72 +++++++++---------- .../attr_field_non_output_return_type.stderr | 16 ++--- ...derive_field_non_output_return_type.stderr | 16 ++--- .../scalar_value/missing_attributes.stderr | 10 +-- .../argument_non_input_type.stderr | 72 +++++++++---------- .../field_non_output_return_type.stderr | 16 ++--- .../fail/union/enum_non_object_variant.stderr | 16 ++--- .../fail/union/enum_same_type_ugly.stderr | 32 ++++----- .../union/struct_non_object_variant.stderr | 16 ++--- .../fail/union/struct_same_type_ugly.rs | 15 ++-- .../fail/union/struct_same_type_ugly.stderr | 42 ++--------- 20 files changed, 229 insertions(+), 490 deletions(-) diff --git a/tests/codegen/fail/input_object/enum/derive_incompatible_field_type.stderr b/tests/codegen/fail/input_object/enum/derive_incompatible_field_type.stderr index 8826cb424..c84d5d632 100644 --- a/tests/codegen/fail/input_object/enum/derive_incompatible_field_type.stderr +++ b/tests/codegen/fail/input_object/enum/derive_incompatible_field_type.stderr @@ -10,14 +10,14 @@ help: the trait `IsInputType<__S>` is not implemented for `ObjectA` 4 | struct ObjectA { | ^^^^^^^^^^^^^^ = help: the following other types implement trait `IsInputType`: - `&T` implements `IsInputType` - `Arc` implements `IsInputType` - `ArcStr` implements `IsInputType<__S>` - `Box` implements `IsInputType` - `ID` implements `IsInputType<__S>` - `Nullable` implements `IsInputType` - `Object` implements `IsInputType<__S>` - `Vec` implements `IsInputType` + ArcStr + ID + Object + bool + compact_str::CompactString + f64 + i32 + juniper::TypeKind and $N others = note: required for `std::option::Option` to implement `IsInputType<__S>` = note: this error originates in the derive macro `GraphQLInputObject` (in Nightly builds, run with -Z macro-backtrace for more info) @@ -34,14 +34,14 @@ help: the trait `FromInputValue<__S>` is not implemented for `ObjectA` 4 | struct ObjectA { | ^^^^^^^^^^^^^^ = help: the following other types implement trait `FromInputValue`: - `Arc` implements `FromInputValue` - `ArcStr` implements `FromInputValue<__S>` - `Box` implements `FromInputValue` - `ID` implements `FromInputValue<__S>` - `Nullable` implements `FromInputValue` - `Object` implements `FromInputValue<__S>` - `Vec` implements `FromInputValue` - `[T; N]` implements `FromInputValue` + ArcStr + ID + Object + bool + compact_str::CompactString + f64 + i32 + juniper::TypeKind and $N others = note: required for `std::option::Option` to implement `FromInputValue<__S>` note: required by a bound in `Registry::::arg` @@ -66,14 +66,14 @@ help: the trait `FromInputValue<__S>` is not implemented for `ObjectA` 4 | struct ObjectA { | ^^^^^^^^^^^^^^ = help: the following other types implement trait `FromInputValue`: - `Arc` implements `FromInputValue` - `ArcStr` implements `FromInputValue<__S>` - `Box` implements `FromInputValue` - `ID` implements `FromInputValue<__S>` - `Nullable` implements `FromInputValue` - `Object` implements `FromInputValue<__S>` - `Vec` implements `FromInputValue` - `[T; N]` implements `FromInputValue` + ArcStr + ID + Object + bool + compact_str::CompactString + f64 + i32 + juniper::TypeKind 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/input_object/struct/derive_incompatible_field_type.stderr b/tests/codegen/fail/input_object/struct/derive_incompatible_field_type.stderr index c4fd2d7e6..45fd969e5 100644 --- a/tests/codegen/fail/input_object/struct/derive_incompatible_field_type.stderr +++ b/tests/codegen/fail/input_object/struct/derive_incompatible_field_type.stderr @@ -10,14 +10,14 @@ help: the trait `IsInputType<__S>` is not implemented for `ObjectA` 4 | struct ObjectA { | ^^^^^^^^^^^^^^ = help: the following other types implement trait `IsInputType`: - `&T` implements `IsInputType` - `Arc` implements `IsInputType` - `ArcStr` implements `IsInputType<__S>` - `Box` implements `IsInputType` - `ID` implements `IsInputType<__S>` - `Nullable` implements `IsInputType` - `Object` implements `IsInputType<__S>` - `Vec` implements `IsInputType` + ArcStr + ID + Object + bool + compact_str::CompactString + f64 + i32 + juniper::TypeKind and $N others error[E0277]: the trait bound `ObjectA: FromInputValue<__S>` is not satisfied @@ -35,14 +35,14 @@ help: the trait `FromInputValue<__S>` is not implemented for `ObjectA` 4 | struct ObjectA { | ^^^^^^^^^^^^^^ = help: the following other types implement trait `FromInputValue`: - `Arc` implements `FromInputValue` - `ArcStr` implements `FromInputValue<__S>` - `Box` implements `FromInputValue` - `ID` implements `FromInputValue<__S>` - `Nullable` implements `FromInputValue` - `Object` implements `FromInputValue<__S>` - `Vec` implements `FromInputValue` - `[T; N]` implements `FromInputValue` + ArcStr + ID + Object + bool + compact_str::CompactString + f64 + i32 + juniper::TypeKind and $N others note: required by a bound in `Registry::::arg` --> $WORKSPACE/juniper/src/executor/mod.rs @@ -65,14 +65,14 @@ help: the trait `FromInputValue<__S>` is not implemented for `ObjectA` 4 | struct ObjectA { | ^^^^^^^^^^^^^^ = help: the following other types implement trait `FromInputValue`: - `Arc` implements `FromInputValue` - `ArcStr` implements `FromInputValue<__S>` - `Box` implements `FromInputValue` - `ID` implements `FromInputValue<__S>` - `Nullable` implements `FromInputValue` - `Object` implements `FromInputValue<__S>` - `Vec` implements `FromInputValue` - `[T; N]` implements `FromInputValue` + ArcStr + ID + Object + bool + compact_str::CompactString + f64 + i32 + juniper::TypeKind 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_cyclic_impl.stderr b/tests/codegen/fail/interface/struct/attr_cyclic_impl.stderr index f5884f8fb..7d966d1f9 100644 --- a/tests/codegen/fail/interface/struct/attr_cyclic_impl.stderr +++ b/tests/codegen/fail/interface/struct/attr_cyclic_impl.stderr @@ -20,75 +20,3 @@ note: cycle used when computing type of ` fail/interface/struct/attr_cyclic_impl.rs:5:5 - | -5 | id: String, - | ^^ - | - = note: see issue #130366 for more information - = note: this error 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) - -error[E0658]: use of unstable library feature `str_as_str` - --> fail/interface/struct/attr_cyclic_impl.rs:5:5 - | -5 | id: String, - | ^^ - | - = note: see issue #130366 for more information - = note: this error 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) - -error[E0658]: use of unstable library feature `str_as_str` - --> fail/interface/struct/attr_cyclic_impl.rs:5:5 - | -5 | id: String, - | ^^ - | - = note: see issue #130366 for more information - = note: this error 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) - -error[E0658]: use of unstable library feature `str_as_str` - --> fail/interface/struct/attr_cyclic_impl.rs:5:5 - | -5 | id: String, - | ^^ - | - = note: see issue #130366 for more information - = note: this error 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) - -error[E0658]: use of unstable library feature `str_as_str` - --> fail/interface/struct/attr_cyclic_impl.rs:10:5 - | -10 | id: String, - | ^^ - | - = note: see issue #130366 for more information - = note: this error 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) - -error[E0658]: use of unstable library feature `str_as_str` - --> fail/interface/struct/attr_cyclic_impl.rs:10:5 - | -10 | id: String, - | ^^ - | - = note: see issue #130366 for more information - = note: this error 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) - -error[E0658]: use of unstable library feature `str_as_str` - --> fail/interface/struct/attr_cyclic_impl.rs:10:5 - | -10 | id: String, - | ^^ - | - = note: see issue #130366 for more information - = note: this error 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) - -error[E0658]: use of unstable library feature `str_as_str` - --> fail/interface/struct/attr_cyclic_impl.rs:10:5 - | -10 | id: String, - | ^^ - | - = note: see issue #130366 for more information - = note: this error 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) 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 954ed53a2..92bb26f02 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 @@ -10,12 +10,12 @@ help: the trait `IsOutputType<__S>` is not implemented for `ObjB` 4 | pub struct ObjB { | ^^^^^^^^^^^^^^^ = help: the following other types implement trait `IsOutputType`: - `&T` implements `IsOutputType` - `Arc` implements `IsOutputType` - `ArcStr` implements `IsOutputType<__S>` - `Argument` implements `IsOutputType` - `Box` implements `IsOutputType` - `CharacterValueEnum` implements `IsOutputType<__S>` - `EnumValue` implements `IsOutputType<__S>` - `ID` implements `IsOutputType<__S>` + ArcStr + CharacterValueEnum + EnumValue + ID + bool + compact_str::CompactString + f64 + i32 and $N others diff --git a/tests/codegen/fail/interface/struct/derive_cyclic_impl.stderr b/tests/codegen/fail/interface/struct/derive_cyclic_impl.stderr index bf0645486..c4546ffc2 100644 --- a/tests/codegen/fail/interface/struct/derive_cyclic_impl.stderr +++ b/tests/codegen/fail/interface/struct/derive_cyclic_impl.stderr @@ -20,75 +20,3 @@ note: cycle used when computing type of ` fail/interface/struct/derive_cyclic_impl.rs:6:5 - | -6 | id: String, - | ^^ - | - = note: see issue #130366 for more information - = note: this error 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) - -error[E0658]: use of unstable library feature `str_as_str` - --> fail/interface/struct/derive_cyclic_impl.rs:6:5 - | -6 | id: String, - | ^^ - | - = note: see issue #130366 for more information - = note: this error 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) - -error[E0658]: use of unstable library feature `str_as_str` - --> fail/interface/struct/derive_cyclic_impl.rs:6:5 - | -6 | id: String, - | ^^ - | - = note: see issue #130366 for more information - = note: this error 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) - -error[E0658]: use of unstable library feature `str_as_str` - --> fail/interface/struct/derive_cyclic_impl.rs:6:5 - | -6 | id: String, - | ^^ - | - = note: see issue #130366 for more information - = note: this error 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) - -error[E0658]: use of unstable library feature `str_as_str` - --> fail/interface/struct/derive_cyclic_impl.rs:12:5 - | -12 | id: String, - | ^^ - | - = note: see issue #130366 for more information - = note: this error 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) - -error[E0658]: use of unstable library feature `str_as_str` - --> fail/interface/struct/derive_cyclic_impl.rs:12:5 - | -12 | id: String, - | ^^ - | - = note: see issue #130366 for more information - = note: this error 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) - -error[E0658]: use of unstable library feature `str_as_str` - --> fail/interface/struct/derive_cyclic_impl.rs:12:5 - | -12 | id: String, - | ^^ - | - = note: see issue #130366 for more information - = note: this error 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) - -error[E0658]: use of unstable library feature `str_as_str` - --> fail/interface/struct/derive_cyclic_impl.rs:12:5 - | -12 | id: String, - | ^^ - | - = note: see issue #130366 for more information - = note: this error 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) 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 111e39f83..127c62f11 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 @@ -10,12 +10,12 @@ help: the trait `IsOutputType<__S>` is not implemented for `ObjB` 4 | pub struct ObjB { | ^^^^^^^^^^^^^^^ = help: the following other types implement trait `IsOutputType`: - `&T` implements `IsOutputType` - `Arc` implements `IsOutputType` - `ArcStr` implements `IsOutputType<__S>` - `Argument` implements `IsOutputType` - `Box` implements `IsOutputType` - `CharacterValueEnum` implements `IsOutputType<__S>` - `EnumValue` implements `IsOutputType<__S>` - `ID` implements `IsOutputType<__S>` + ArcStr + CharacterValueEnum + EnumValue + ID + bool + compact_str::CompactString + f64 + i32 and $N others 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 1a743bc34..ced03f9b0 100644 --- a/tests/codegen/fail/interface/trait/argument_non_input_type.stderr +++ b/tests/codegen/fail/interface/trait/argument_non_input_type.stderr @@ -10,15 +10,15 @@ help: the trait `IsInputType<__S>` is not implemented for `ObjA` 4 | pub struct ObjA { | ^^^^^^^^^^^^^^^ = help: the following other types implement trait `IsInputType`: - `&T` implements `IsInputType` - `Arc` implements `IsInputType` - `ArcStr` implements `IsInputType<__S>` - `Box` implements `IsInputType` - `ID` implements `IsInputType<__S>` - `Nullable` implements `IsInputType` - `Vec` implements `IsInputType` - `[T; N]` implements `IsInputType` - and $N others + ArcStr + ID + bool + compact_str::CompactString + f64 + i32 + juniper::TypeKind + juniper::schema::model::DirectiveLocation + std::string::String error[E0277]: the trait bound `ObjA: FromInputValue<__S>` is not satisfied --> fail/interface/trait/argument_non_input_type.rs:10:23 @@ -35,15 +35,15 @@ help: the trait `FromInputValue<__S>` is not implemented for `ObjA` 4 | pub struct ObjA { | ^^^^^^^^^^^^^^^ = help: the following other types implement trait `FromInputValue`: - `Arc` implements `FromInputValue` - `ArcStr` implements `FromInputValue<__S>` - `Box` implements `FromInputValue` - `ID` implements `FromInputValue<__S>` - `Nullable` implements `FromInputValue` - `Vec` implements `FromInputValue` - `[T; N]` implements `FromInputValue` - `bool` implements `FromInputValue<__S>` - and $N others + ArcStr + ID + bool + compact_str::CompactString + f64 + i32 + juniper::TypeKind + juniper::schema::model::DirectiveLocation + std::string::String note: required by a bound in `Registry::::arg` --> $WORKSPACE/juniper/src/executor/mod.rs | diff --git a/tests/codegen/fail/interface/trait/cyclic_impl.stderr b/tests/codegen/fail/interface/trait/cyclic_impl.stderr index 0c857d19b..af2728541 100644 --- a/tests/codegen/fail/interface/trait/cyclic_impl.stderr +++ b/tests/codegen/fail/interface/trait/cyclic_impl.stderr @@ -20,75 +20,3 @@ note: cycle used when computing type of ` fail/interface/trait/cyclic_impl.rs:5:8 - | -5 | fn id(&self) -> &str; - | ^^ - | - = note: see issue #130366 for more information - = note: this error 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) - -error[E0658]: use of unstable library feature `str_as_str` - --> fail/interface/trait/cyclic_impl.rs:5:8 - | -5 | fn id(&self) -> &str; - | ^^ - | - = note: see issue #130366 for more information - = note: this error 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) - -error[E0658]: use of unstable library feature `str_as_str` - --> fail/interface/trait/cyclic_impl.rs:5:8 - | -5 | fn id(&self) -> &str; - | ^^ - | - = note: see issue #130366 for more information - = note: this error 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) - -error[E0658]: use of unstable library feature `str_as_str` - --> fail/interface/trait/cyclic_impl.rs:5:8 - | -5 | fn id(&self) -> &str; - | ^^ - | - = note: see issue #130366 for more information - = note: this error 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) - -error[E0658]: use of unstable library feature `str_as_str` - --> fail/interface/trait/cyclic_impl.rs:10:8 - | -10 | fn id() -> String; - | ^^ - | - = note: see issue #130366 for more information - = note: this error 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) - -error[E0658]: use of unstable library feature `str_as_str` - --> fail/interface/trait/cyclic_impl.rs:10:8 - | -10 | fn id() -> String; - | ^^ - | - = note: see issue #130366 for more information - = note: this error 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) - -error[E0658]: use of unstable library feature `str_as_str` - --> fail/interface/trait/cyclic_impl.rs:10:8 - | -10 | fn id() -> String; - | ^^ - | - = note: see issue #130366 for more information - = note: this error 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) - -error[E0658]: use of unstable library feature `str_as_str` - --> fail/interface/trait/cyclic_impl.rs:10:8 - | -10 | fn id() -> String; - | ^^ - | - = note: see issue #130366 for more information - = note: this error 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) 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 f63b88e0f..75450e729 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 @@ -10,12 +10,12 @@ help: the trait `IsOutputType<__S>` is not implemented for `ObjB` 4 | pub struct ObjB { | ^^^^^^^^^^^^^^^ = help: the following other types implement trait `IsOutputType`: - `&T` implements `IsOutputType` - `Arc` implements `IsOutputType` - `ArcStr` implements `IsOutputType<__S>` - `Argument` implements `IsOutputType` - `Box` implements `IsOutputType` - `CharacterValueEnum` implements `IsOutputType<__S>` - `EnumValue` implements `IsOutputType<__S>` - `ID` implements `IsOutputType<__S>` + ArcStr + CharacterValueEnum + EnumValue + ID + bool + compact_str::CompactString + f64 + i32 and $N others diff --git a/tests/codegen/fail/object/argument_non_input_type.stderr b/tests/codegen/fail/object/argument_non_input_type.stderr index ba4fb9c4b..91ad09bbb 100644 --- a/tests/codegen/fail/object/argument_non_input_type.stderr +++ b/tests/codegen/fail/object/argument_non_input_type.stderr @@ -10,15 +10,15 @@ help: the trait `IsInputType<__S>` is not implemented for `ObjA` 4 | struct ObjA { | ^^^^^^^^^^^ = help: the following other types implement trait `IsInputType`: - `&T` implements `IsInputType` - `Arc` implements `IsInputType` - `ArcStr` implements `IsInputType<__S>` - `Box` implements `IsInputType` - `ID` implements `IsInputType<__S>` - `Nullable` implements `IsInputType` - `Vec` implements `IsInputType` - `[T; N]` implements `IsInputType` - and $N others + ArcStr + ID + bool + compact_str::CompactString + f64 + i32 + juniper::TypeKind + juniper::schema::model::DirectiveLocation + std::string::String error[E0277]: the trait bound `ObjA: FromInputValue<__S>` is not satisfied --> fail/object/argument_non_input_type.rs:12:23 @@ -35,15 +35,15 @@ help: the trait `FromInputValue<__S>` is not implemented for `ObjA` 4 | struct ObjA { | ^^^^^^^^^^^ = help: the following other types implement trait `FromInputValue`: - `Arc` implements `FromInputValue` - `ArcStr` implements `FromInputValue<__S>` - `Box` implements `FromInputValue` - `ID` implements `FromInputValue<__S>` - `Nullable` implements `FromInputValue` - `Vec` implements `FromInputValue` - `[T; N]` implements `FromInputValue` - `bool` implements `FromInputValue<__S>` - and $N others + ArcStr + ID + bool + compact_str::CompactString + f64 + i32 + juniper::TypeKind + juniper::schema::model::DirectiveLocation + std::string::String note: required by a bound in `Registry::::arg` --> $WORKSPACE/juniper/src/executor/mod.rs | @@ -65,15 +65,15 @@ help: the trait `FromInputValue<__S>` is not implemented for `ObjA` 4 | struct ObjA { | ^^^^^^^^^^^ = help: the following other types implement trait `FromInputValue`: - `Arc` implements `FromInputValue` - `ArcStr` implements `FromInputValue<__S>` - `Box` implements `FromInputValue` - `ID` implements `FromInputValue<__S>` - `Nullable` implements `FromInputValue` - `Vec` implements `FromInputValue` - `[T; N]` implements `FromInputValue` - `bool` implements `FromInputValue<__S>` - and $N others + ArcStr + ID + bool + compact_str::CompactString + f64 + i32 + juniper::TypeKind + juniper::schema::model::DirectiveLocation + std::string::String = 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 @@ -88,15 +88,15 @@ help: the trait `FromInputValue<__S>` is not implemented for `ObjA` 4 | struct ObjA { | ^^^^^^^^^^^ = help: the following other types implement trait `FromInputValue`: - `Arc` implements `FromInputValue` - `ArcStr` implements `FromInputValue<__S>` - `Box` implements `FromInputValue` - `ID` implements `FromInputValue<__S>` - `Nullable` implements `FromInputValue` - `Vec` implements `FromInputValue` - `[T; N]` implements `FromInputValue` - `bool` implements `FromInputValue<__S>` - and $N others + ArcStr + ID + bool + compact_str::CompactString + f64 + i32 + juniper::TypeKind + juniper::schema::model::DirectiveLocation + std::string::String warning: unused variable: `obj` --> fail/object/argument_non_input_type.rs:12:18 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 8834fb32e..850a20f4a 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 @@ -10,12 +10,12 @@ help: the trait `IsOutputType<__S>` is not implemented for `ObjB` 4 | struct ObjB { | ^^^^^^^^^^^ = help: the following other types implement trait `IsOutputType`: - `&T` implements `IsOutputType` - `Arc` implements `IsOutputType` - `ArcStr` implements `IsOutputType<__S>` - `Argument` implements `IsOutputType` - `Box` implements `IsOutputType` - `EnumValue` implements `IsOutputType<__S>` - `ID` implements `IsOutputType<__S>` - `ObjA` implements `IsOutputType<__S>` + ArcStr + EnumValue + ID + ObjA + bool + compact_str::CompactString + f64 + i32 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 860e38fa4..655a3a458 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 @@ -10,12 +10,12 @@ help: the trait `IsOutputType<__S>` is not implemented for `ObjB` 4 | struct ObjB { | ^^^^^^^^^^^ = help: the following other types implement trait `IsOutputType`: - `&T` implements `IsOutputType` - `Arc` implements `IsOutputType` - `ArcStr` implements `IsOutputType<__S>` - `Argument` implements `IsOutputType` - `Box` implements `IsOutputType` - `EnumValue` implements `IsOutputType<__S>` - `ID` implements `IsOutputType<__S>` - `ObjA` implements `IsOutputType<__S>` + ArcStr + EnumValue + ID + ObjA + bool + compact_str::CompactString + f64 + i32 and $N others diff --git a/tests/codegen/fail/scalar_value/missing_attributes.stderr b/tests/codegen/fail/scalar_value/missing_attributes.stderr index 1611f7bf9..48ff33f1a 100644 --- a/tests/codegen/fail/scalar_value/missing_attributes.stderr +++ b/tests/codegen/fail/scalar_value/missing_attributes.stderr @@ -9,14 +9,14 @@ help: the trait `for<'a> TryToPrimitive<'a, i32>` is not implemented for `Defaul | 6 | pub enum DefaultScalarValue { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -help: the following other types implement trait `TryToPrimitive<'me, T>` +help: `DefaultScalarValue` implements trait `TryToPrimitive<'me, T>` --> fail/scalar_value/missing_attributes.rs:5:63 | 5 | #[derive(Clone, Debug, Deserialize, Display, From, PartialEq, ScalarValue, Serialize, TryInto)] | ^^^^^^^^^^^ | | - | `DefaultScalarValue` implements `TryToPrimitive<'_, &str>` - | `DefaultScalarValue` implements `TryToPrimitive<'_, bool>` - | `DefaultScalarValue` implements `TryToPrimitive<'_, f64>` - | `DefaultScalarValue` implements `TryToPrimitive<'_, std::string::String>` + | `TryToPrimitive<'_, &str>` + | `TryToPrimitive<'_, bool>` + | `TryToPrimitive<'_, f64>` + | `TryToPrimitive<'_, std::string::String>` = note: this error originates in the derive macro `ScalarValue` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/codegen/fail/subscription/argument_non_input_type.stderr b/tests/codegen/fail/subscription/argument_non_input_type.stderr index ded9ea016..c339ce2fb 100644 --- a/tests/codegen/fail/subscription/argument_non_input_type.stderr +++ b/tests/codegen/fail/subscription/argument_non_input_type.stderr @@ -10,15 +10,15 @@ help: the trait `IsInputType<__S>` is not implemented for `ObjA` 9 | struct ObjA { | ^^^^^^^^^^^ = help: the following other types implement trait `IsInputType`: - `&T` implements `IsInputType` - `Arc` implements `IsInputType` - `ArcStr` implements `IsInputType<__S>` - `Box` implements `IsInputType` - `ID` implements `IsInputType<__S>` - `Nullable` implements `IsInputType` - `Vec` implements `IsInputType` - `[T; N]` implements `IsInputType` - and $N others + ArcStr + ID + bool + compact_str::CompactString + f64 + i32 + juniper::TypeKind + juniper::schema::model::DirectiveLocation + std::string::String error[E0277]: the trait bound `ObjA: FromInputValue<__S>` is not satisfied --> fail/subscription/argument_non_input_type.rs:17:29 @@ -35,15 +35,15 @@ help: the trait `FromInputValue<__S>` is not implemented for `ObjA` 9 | struct ObjA { | ^^^^^^^^^^^ = help: the following other types implement trait `FromInputValue`: - `Arc` implements `FromInputValue` - `ArcStr` implements `FromInputValue<__S>` - `Box` implements `FromInputValue` - `ID` implements `FromInputValue<__S>` - `Nullable` implements `FromInputValue` - `Vec` implements `FromInputValue` - `[T; N]` implements `FromInputValue` - `bool` implements `FromInputValue<__S>` - and $N others + ArcStr + ID + bool + compact_str::CompactString + f64 + i32 + juniper::TypeKind + juniper::schema::model::DirectiveLocation + std::string::String note: required by a bound in `Registry::::arg` --> $WORKSPACE/juniper/src/executor/mod.rs | @@ -65,15 +65,15 @@ help: the trait `FromInputValue<__S>` is not implemented for `ObjA` 9 | struct ObjA { | ^^^^^^^^^^^ = help: the following other types implement trait `FromInputValue`: - `Arc` implements `FromInputValue` - `ArcStr` implements `FromInputValue<__S>` - `Box` implements `FromInputValue` - `ID` implements `FromInputValue<__S>` - `Nullable` implements `FromInputValue` - `Vec` implements `FromInputValue` - `[T; N]` implements `FromInputValue` - `bool` implements `FromInputValue<__S>` - and $N others + ArcStr + ID + bool + compact_str::CompactString + f64 + i32 + juniper::TypeKind + juniper::schema::model::DirectiveLocation + std::string::String = 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 @@ -88,15 +88,15 @@ help: the trait `FromInputValue<__S>` is not implemented for `ObjA` 9 | struct ObjA { | ^^^^^^^^^^^ = help: the following other types implement trait `FromInputValue`: - `Arc` implements `FromInputValue` - `ArcStr` implements `FromInputValue<__S>` - `Box` implements `FromInputValue` - `ID` implements `FromInputValue<__S>` - `Nullable` implements `FromInputValue` - `Vec` implements `FromInputValue` - `[T; N]` implements `FromInputValue` - `bool` implements `FromInputValue<__S>` - and $N others + ArcStr + ID + bool + compact_str::CompactString + f64 + i32 + juniper::TypeKind + juniper::schema::model::DirectiveLocation + std::string::String warning: unused variable: `obj` --> fail/subscription/argument_non_input_type.rs:17:24 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 881a5b24e..3742e37d2 100644 --- a/tests/codegen/fail/subscription/field_non_output_return_type.stderr +++ b/tests/codegen/fail/subscription/field_non_output_return_type.stderr @@ -10,12 +10,12 @@ help: the trait `IsOutputType<__S>` is not implemented for `ObjB` 9 | struct ObjB { | ^^^^^^^^^^^ = help: the following other types implement trait `IsOutputType`: - `&T` implements `IsOutputType` - `Arc` implements `IsOutputType` - `ArcStr` implements `IsOutputType<__S>` - `Argument` implements `IsOutputType` - `Box` implements `IsOutputType` - `EnumValue` implements `IsOutputType<__S>` - `ID` implements `IsOutputType<__S>` - `ObjA` implements `IsOutputType<__S>` + ArcStr + EnumValue + ID + ObjA + bool + compact_str::CompactString + f64 + i32 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 e62643190..7045169d6 100644 --- a/tests/codegen/fail/union/enum_non_object_variant.stderr +++ b/tests/codegen/fail/union/enum_non_object_variant.stderr @@ -9,13 +9,9 @@ help: the trait `GraphQLObject<__S>` is not implemented for `Test` | 4 | pub enum Test { | ^^^^^^^^^^^^^ - = help: the following other types implement trait `GraphQLObject`: - `&T` implements `GraphQLObject` - `Arc` implements `GraphQLObject` - `Argument` implements `GraphQLObject` - `Box` implements `GraphQLObject` - `EnumValue` implements `GraphQLObject<__S>` - `SchemaType` implements `GraphQLObject` - `juniper::meta::Field` implements `GraphQLObject` - `juniper::schema::model::DirectiveType` implements `GraphQLObject` - `juniper::schema::model::TypeType<'a, S>` implements `GraphQLObject` +help: the trait `GraphQLObject<__S>` is implemented for `EnumValue` + --> $WORKSPACE/juniper/src/schema/schema.rs + | + | #[graphql_object] + | ^^^^^^^^^^^^^^^^^ + = 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/union/enum_same_type_ugly.stderr b/tests/codegen/fail/union/enum_same_type_ugly.stderr index b68e7ec41..93c59fd39 100644 --- a/tests/codegen/fail/union/enum_same_type_ugly.stderr +++ b/tests/codegen/fail/union/enum_same_type_ugly.stderr @@ -15,16 +15,12 @@ error[E0277]: the trait bound `std::string::String: GraphQLObject<__S>` is not s 5 | A(std::string::String), | ^^^^^^^^^^^^^^^^^^^ the trait `GraphQLObject<__S>` is not implemented for `std::string::String` | - = help: the following other types implement trait `GraphQLObject`: - `&T` implements `GraphQLObject` - `Arc` implements `GraphQLObject` - `Argument` implements `GraphQLObject` - `Box` implements `GraphQLObject` - `EnumValue` implements `GraphQLObject<__S>` - `SchemaType` implements `GraphQLObject` - `juniper::meta::Field` implements `GraphQLObject` - `juniper::schema::model::DirectiveType` implements `GraphQLObject` - `juniper::schema::model::TypeType<'a, S>` implements `GraphQLObject` +help: the trait `GraphQLObject<__S>` is implemented for `EnumValue` + --> $WORKSPACE/juniper/src/schema/schema.rs + | + | #[graphql_object] + | ^^^^^^^^^^^^^^^^^ + = 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 `std::string::String: GraphQLObject<__S>` is not satisfied --> fail/union/enum_same_type_ugly.rs:6:7 @@ -32,13 +28,9 @@ error[E0277]: the trait bound `std::string::String: GraphQLObject<__S>` is not s 6 | B(String), | ^^^^^^ the trait `GraphQLObject<__S>` is not implemented for `std::string::String` | - = help: the following other types implement trait `GraphQLObject`: - `&T` implements `GraphQLObject` - `Arc` implements `GraphQLObject` - `Argument` implements `GraphQLObject` - `Box` implements `GraphQLObject` - `EnumValue` implements `GraphQLObject<__S>` - `SchemaType` implements `GraphQLObject` - `juniper::meta::Field` implements `GraphQLObject` - `juniper::schema::model::DirectiveType` implements `GraphQLObject` - `juniper::schema::model::TypeType<'a, S>` implements `GraphQLObject` +help: the trait `GraphQLObject<__S>` is implemented for `EnumValue` + --> $WORKSPACE/juniper/src/schema/schema.rs + | + | #[graphql_object] + | ^^^^^^^^^^^^^^^^^ + = 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/union/struct_non_object_variant.stderr b/tests/codegen/fail/union/struct_non_object_variant.stderr index 5fe00a310..b5caf6637 100644 --- a/tests/codegen/fail/union/struct_non_object_variant.stderr +++ b/tests/codegen/fail/union/struct_non_object_variant.stderr @@ -9,13 +9,9 @@ help: the trait `GraphQLObject<__S>` is not implemented for `Test` | 4 | pub enum Test { | ^^^^^^^^^^^^^ - = help: the following other types implement trait `GraphQLObject`: - `&T` implements `GraphQLObject` - `Arc` implements `GraphQLObject` - `Argument` implements `GraphQLObject` - `Box` implements `GraphQLObject` - `EnumValue` implements `GraphQLObject<__S>` - `SchemaType` implements `GraphQLObject` - `juniper::meta::Field` implements `GraphQLObject` - `juniper::schema::model::DirectiveType` implements `GraphQLObject` - `juniper::schema::model::TypeType<'a, S>` implements `GraphQLObject` +help: the trait `GraphQLObject<__S>` is implemented for `EnumValue` + --> $WORKSPACE/juniper/src/schema/schema.rs + | + | #[graphql_object] + | ^^^^^^^^^^^^^^^^^ + = 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/union/struct_same_type_ugly.rs b/tests/codegen/fail/union/struct_same_type_ugly.rs index b1467262c..35e9ae05a 100644 --- a/tests/codegen/fail/union/struct_same_type_ugly.rs +++ b/tests/codegen/fail/union/struct_same_type_ugly.rs @@ -1,16 +1,21 @@ -use juniper::GraphQLUnion; +use juniper::{GraphQLObject, GraphQLUnion}; + +#[derive(GraphQLObject)] +struct Test { + id: i32, +} #[derive(GraphQLUnion)] -#[graphql(on String = Character::a)] -#[graphql(on std::string::String = Character::b)] +#[graphql(on Test = Character::a)] +#[graphql(on self::Test = Character::b)] struct Character; impl Character { - fn a(&self, _: &()) -> Option<&String> { + fn a(&self, _: &()) -> Option<&Test> { None } - fn b(&self, _: &()) -> Option<&String> { + fn b(&self, _: &()) -> Option<&Test> { None } } diff --git a/tests/codegen/fail/union/struct_same_type_ugly.stderr b/tests/codegen/fail/union/struct_same_type_ugly.stderr index e926cc421..312a8f540 100644 --- a/tests/codegen/fail/union/struct_same_type_ugly.stderr +++ b/tests/codegen/fail/union/struct_same_type_ugly.stderr @@ -1,44 +1,10 @@ -error[E0119]: conflicting implementations of trait `MutuallyExclusive` for type `std::string::String` - --> fail/union/struct_same_type_ugly.rs:3:10 +error[E0119]: conflicting implementations of trait `MutuallyExclusive` for type `Test` + --> fail/union/struct_same_type_ugly.rs:8:10 | -3 | #[derive(GraphQLUnion)] +8 | #[derive(GraphQLUnion)] | ^^^^^^^^^^^^ | | | first implementation here - | conflicting implementation for `std::string::String` + | conflicting implementation for `Test` | = note: this error originates in the macro `::juniper::sa::assert_type_ne_all` which comes from the expansion of the derive macro `GraphQLUnion` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `std::string::String: GraphQLObject<__S>` is not satisfied - --> fail/union/struct_same_type_ugly.rs:5:14 - | -5 | #[graphql(on std::string::String = Character::b)] - | ^^^^^^^^^^^^^^^^^^^ the trait `GraphQLObject<__S>` is not implemented for `std::string::String` - | - = help: the following other types implement trait `GraphQLObject`: - `&T` implements `GraphQLObject` - `Arc` implements `GraphQLObject` - `Argument` implements `GraphQLObject` - `Box` implements `GraphQLObject` - `EnumValue` implements `GraphQLObject<__S>` - `SchemaType` implements `GraphQLObject` - `juniper::meta::Field` implements `GraphQLObject` - `juniper::schema::model::DirectiveType` implements `GraphQLObject` - `juniper::schema::model::TypeType<'a, S>` implements `GraphQLObject` - -error[E0277]: the trait bound `std::string::String: GraphQLObject<__S>` is not satisfied - --> fail/union/struct_same_type_ugly.rs:4:14 - | -4 | #[graphql(on String = Character::a)] - | ^^^^^^ the trait `GraphQLObject<__S>` is not implemented for `std::string::String` - | - = help: the following other types implement trait `GraphQLObject`: - `&T` implements `GraphQLObject` - `Arc` implements `GraphQLObject` - `Argument` implements `GraphQLObject` - `Box` implements `GraphQLObject` - `EnumValue` implements `GraphQLObject<__S>` - `SchemaType` implements `GraphQLObject` - `juniper::meta::Field` implements `GraphQLObject` - `juniper::schema::model::DirectiveType` implements `GraphQLObject` - `juniper::schema::model::TypeType<'a, S>` implements `GraphQLObject`