From 84a07c4a93f96d4352a9a6a23732c46eae486be6 Mon Sep 17 00:00:00 2001 From: Christian Legnitto Date: Sun, 6 Jun 2021 18:57:14 -0400 Subject: [PATCH] Re-record fixtures for latest `nightly` error messages (#941) --- .../fail/enum/derive_no_fields.stderr | 16 +++++++++++++ .../derive_incompatible_object.stderr | 24 +++++++++++++++---- .../fail/input-object/derive_no_fields.stderr | 16 +++++++++++++ .../input-object/derive_no_underscore.stderr | 16 +++++++++++++ .../input-object/derive_unique_name.stderr | 16 +++++++++++++ .../argument_double_underscored.stderr | 16 +++++++++++++ .../interface/argument_non_input_type.stderr | 20 ++++++++++++++-- ...conflicts_with_external_downcast_fn.stderr | 16 +++++++++++++ .../downcast_method_wrong_input_args.stderr | 16 +++++++++++++ .../downcast_method_wrong_return_type.stderr | 16 +++++++++++++ .../interface/field_double_underscored.stderr | 16 +++++++++++++ .../field_non_output_return_type.stderr | 18 +++++++++++++- .../fail/interface/fields_duplicate.stderr | 16 +++++++++++++ .../implementer_non_object_type.stderr | 20 ++++++++++++++-- .../implementers_duplicate_pretty.stderr | 16 +++++++++++++ .../implementers_duplicate_ugly.stderr | 20 ++++++++++++++-- .../interface/name_double_underscored.stderr | 16 +++++++++++++ .../fail/interface/no_fields.stderr | 16 +++++++++++++ .../fail/interface/wrong_item.stderr | 18 +++++++++++++- .../fail/object/derive_fields_unique.stderr | 16 +++++++++++++ .../fail/object/derive_no_fields.stderr | 16 +++++++++++++ .../fail/object/derive_no_underscore.stderr | 16 +++++++++++++ .../object/impl_argument_no_object.stderr | 22 ++++++++++++++--- .../fail/object/impl_fields_unique.stderr | 16 +++++++++++++ .../object/impl_no_argument_underscore.stderr | 16 +++++++++++++ .../fail/object/impl_no_fields.stderr | 16 +++++++++++++ .../fail/object/impl_no_underscore.stderr | 16 +++++++++++++ .../fail/union/attr_wrong_item.stderr | 18 +++++++++++++- .../fail/union/derive_wrong_item.stderr | 16 +++++++++++++ ...s_with_variant_external_resolver_fn.stderr | 16 +++++++++++++ .../union/enum_name_double_underscored.stderr | 16 +++++++++++++ .../fail/union/enum_no_fields.stderr | 16 +++++++++++++ .../fail/union/enum_non_object_variant.stderr | 18 +++++++++++++- .../fail/union/enum_same_type_pretty.stderr | 16 +++++++++++++ .../fail/union/enum_same_type_ugly.stderr | 18 +++++++++++++- .../union/enum_wrong_variant_field.stderr | 16 +++++++++++++ .../struct_name_double_underscored.stderr | 16 +++++++++++++ .../fail/union/struct_no_fields.stderr | 16 +++++++++++++ .../union/struct_non_object_variant.stderr | 18 +++++++++++++- .../fail/union/struct_same_type_pretty.stderr | 16 +++++++++++++ .../fail/union/struct_same_type_ugly.stderr | 18 +++++++++++++- .../union/trait_fail_infer_context.stderr | 22 ++++++++++++++--- ...conflicts_with_external_resolver_fn.stderr | 16 +++++++++++++ .../trait_name_double_underscored.stderr | 16 +++++++++++++ .../fail/union/trait_no_fields.stderr | 16 +++++++++++++ .../union/trait_non_object_variant.stderr | 18 +++++++++++++- .../fail/union/trait_same_type_pretty.stderr | 16 +++++++++++++ .../fail/union/trait_same_type_ugly.stderr | 18 +++++++++++++- .../union/trait_with_attr_on_method.stderr | 16 +++++++++++++ .../trait_wrong_method_input_args.stderr | 16 +++++++++++++ .../trait_wrong_method_return_type.stderr | 16 +++++++++++++ 51 files changed, 841 insertions(+), 25 deletions(-) diff --git a/integration_tests/codegen_fail/fail/enum/derive_no_fields.stderr b/integration_tests/codegen_fail/fail/enum/derive_no_fields.stderr index ccfc4951..1c9238f7 100644 --- a/integration_tests/codegen_fail/fail/enum/derive_no_fields.stderr +++ b/integration_tests/codegen_fail/fail/enum/derive_no_fields.stderr @@ -1,3 +1,19 @@ +warning: field is never read: `enum_path` + --> $DIR/mod.rs:282:5 + | +282 | pub enum_path: Option, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(dead_code)]` on by default + +warning: field is never read: `span` + --> $DIR/mod.rs:296:5 + | +296 | pub span: Span, + | ^^^^^^^^^^^^^^ + +warning: 2 warnings emitted + error: GraphQL enum expects at least one field --> $DIR/derive_no_fields.rs:2:1 | diff --git a/integration_tests/codegen_fail/fail/input-object/derive_incompatible_object.stderr b/integration_tests/codegen_fail/fail/input-object/derive_incompatible_object.stderr index c55c2e79..e86e7f91 100644 --- a/integration_tests/codegen_fail/fail/input-object/derive_incompatible_object.stderr +++ b/integration_tests/codegen_fail/fail/input-object/derive_incompatible_object.stderr @@ -1,3 +1,19 @@ +warning: field is never read: `enum_path` + --> $DIR/mod.rs:282:5 + | +282 | pub enum_path: Option, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(dead_code)]` on by default + +warning: field is never read: `span` + --> $DIR/mod.rs:296:5 + | +296 | pub span: Span, + | ^^^^^^^^^^^^^^ + +warning: 2 warnings emitted + error[E0277]: the trait bound `ObjectA: IsInputType<__S>` is not satisfied --> $DIR/derive_incompatible_object.rs:6:10 | @@ -5,7 +21,7 @@ error[E0277]: the trait bound `ObjectA: IsInputType<__S>` is not satisfied | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `IsInputType<__S>` is not implemented for `ObjectA` | = note: required by `juniper::marker::IsInputType::mark` - = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the derive macro `juniper::GraphQLInputObject` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `ObjectA: FromInputValue<__S>` is not satisfied --> $DIR/derive_incompatible_object.rs:6:10 @@ -13,7 +29,7 @@ error[E0277]: the trait bound `ObjectA: FromInputValue<__S>` is not satisfied 6 | #[derive(juniper::GraphQLInputObject)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `FromInputValue<__S>` is not implemented for `ObjectA` | - = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the derive macro `juniper::GraphQLInputObject` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `ObjectA: FromInputValue<__S>` is not satisfied --> $DIR/derive_incompatible_object.rs:6:10 @@ -22,7 +38,7 @@ error[E0277]: the trait bound `ObjectA: FromInputValue<__S>` is not satisfied | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `FromInputValue<__S>` is not implemented for `ObjectA` | = note: required by `from_input_value` - = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the derive macro `juniper::GraphQLInputObject` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0599]: no method named `to_input_value` found for struct `ObjectA` in the current scope --> $DIR/derive_incompatible_object.rs:6:10 @@ -36,4 +52,4 @@ error[E0599]: no method named `to_input_value` found for struct `ObjectA` in the = help: items from traits can only be used if the trait is implemented and in scope = note: the following trait defines an item `to_input_value`, perhaps you need to implement it: candidate #1: `ToInputValue` - = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the derive macro `juniper::GraphQLInputObject` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/integration_tests/codegen_fail/fail/input-object/derive_no_fields.stderr b/integration_tests/codegen_fail/fail/input-object/derive_no_fields.stderr index 88329232..45d2fed2 100644 --- a/integration_tests/codegen_fail/fail/input-object/derive_no_fields.stderr +++ b/integration_tests/codegen_fail/fail/input-object/derive_no_fields.stderr @@ -1,3 +1,19 @@ +warning: field is never read: `enum_path` + --> $DIR/mod.rs:282:5 + | +282 | pub enum_path: Option, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(dead_code)]` on by default + +warning: field is never read: `span` + --> $DIR/mod.rs:296:5 + | +296 | pub span: Span, + | ^^^^^^^^^^^^^^ + +warning: 2 warnings emitted + error: GraphQL input object expects at least one field --> $DIR/derive_no_fields.rs:2:1 | diff --git a/integration_tests/codegen_fail/fail/input-object/derive_no_underscore.stderr b/integration_tests/codegen_fail/fail/input-object/derive_no_underscore.stderr index eb7eb67b..62bea978 100644 --- a/integration_tests/codegen_fail/fail/input-object/derive_no_underscore.stderr +++ b/integration_tests/codegen_fail/fail/input-object/derive_no_underscore.stderr @@ -1,3 +1,19 @@ +warning: field is never read: `enum_path` + --> $DIR/mod.rs:282:5 + | +282 | pub enum_path: Option, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(dead_code)]` on by default + +warning: field is never read: `span` + --> $DIR/mod.rs:296:5 + | +296 | pub span: Span, + | ^^^^^^^^^^^^^^ + +warning: 2 warnings emitted + error: All types and directives defined within a schema must not have a name which begins with `__` (two underscores), as this is used exclusively by GraphQL’s introspection system. --> $DIR/derive_no_underscore.rs:3:15 | diff --git a/integration_tests/codegen_fail/fail/input-object/derive_unique_name.stderr b/integration_tests/codegen_fail/fail/input-object/derive_unique_name.stderr index ccecaf48..fcc78329 100644 --- a/integration_tests/codegen_fail/fail/input-object/derive_unique_name.stderr +++ b/integration_tests/codegen_fail/fail/input-object/derive_unique_name.stderr @@ -1,3 +1,19 @@ +warning: field is never read: `enum_path` + --> $DIR/mod.rs:282:5 + | +282 | pub enum_path: Option, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(dead_code)]` on by default + +warning: field is never read: `span` + --> $DIR/mod.rs:296:5 + | +296 | pub span: Span, + | ^^^^^^^^^^^^^^ + +warning: 2 warnings emitted + error: GraphQL input object does not allow fields with the same name --> $DIR/derive_unique_name.rs:4:5 | diff --git a/integration_tests/codegen_fail/fail/interface/argument_double_underscored.stderr b/integration_tests/codegen_fail/fail/interface/argument_double_underscored.stderr index f06c385c..708b12f5 100644 --- a/integration_tests/codegen_fail/fail/interface/argument_double_underscored.stderr +++ b/integration_tests/codegen_fail/fail/interface/argument_double_underscored.stderr @@ -1,3 +1,19 @@ +warning: field is never read: `enum_path` + --> $DIR/mod.rs:282:5 + | +282 | pub enum_path: Option, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(dead_code)]` on by default + +warning: field is never read: `span` + --> $DIR/mod.rs:296:5 + | +296 | pub span: Span, + | ^^^^^^^^^^^^^^ + +warning: 2 warnings emitted + error: All types and directives defined within a schema must not have a name which begins with `__` (two underscores), as this is used exclusively by GraphQL’s introspection system. --> $DIR/argument_double_underscored.rs:14:18 | diff --git a/integration_tests/codegen_fail/fail/interface/argument_non_input_type.stderr b/integration_tests/codegen_fail/fail/interface/argument_non_input_type.stderr index c4e89fc4..95c219d0 100644 --- a/integration_tests/codegen_fail/fail/interface/argument_non_input_type.stderr +++ b/integration_tests/codegen_fail/fail/interface/argument_non_input_type.stderr @@ -1,3 +1,19 @@ +warning: field is never read: `enum_path` + --> $DIR/mod.rs:282:5 + | +282 | pub enum_path: Option, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(dead_code)]` on by default + +warning: field is never read: `span` + --> $DIR/mod.rs:296:5 + | +296 | pub span: Span, + | ^^^^^^^^^^^^^^ + +warning: 2 warnings emitted + error[E0277]: the trait bound `ObjA: IsInputType<__S>` is not satisfied --> $DIR/argument_non_input_type.rs:16:1 | @@ -5,7 +21,7 @@ error[E0277]: the trait bound `ObjA: IsInputType<__S>` is not satisfied | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `IsInputType<__S>` is not implemented for `ObjA` | = note: required by `juniper::marker::IsInputType::mark` - = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the attribute macro `graphql_interface` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `ObjA: FromInputValue<__S>` is not satisfied --> $DIR/argument_non_input_type.rs:16:1 @@ -13,4 +29,4 @@ error[E0277]: the trait bound `ObjA: FromInputValue<__S>` is not satisfied 16 | #[graphql_interface(for = ObjA)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `FromInputValue<__S>` is not implemented for `ObjA` | - = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the attribute macro `graphql_interface` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/integration_tests/codegen_fail/fail/interface/downcast_method_conflicts_with_external_downcast_fn.stderr b/integration_tests/codegen_fail/fail/interface/downcast_method_conflicts_with_external_downcast_fn.stderr index a8abef2d..ee167360 100644 --- a/integration_tests/codegen_fail/fail/interface/downcast_method_conflicts_with_external_downcast_fn.stderr +++ b/integration_tests/codegen_fail/fail/interface/downcast_method_conflicts_with_external_downcast_fn.stderr @@ -1,3 +1,19 @@ +warning: field is never read: `enum_path` + --> $DIR/mod.rs:282:5 + | +282 | pub enum_path: Option, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(dead_code)]` on by default + +warning: field is never read: `span` + --> $DIR/mod.rs:296:5 + | +296 | pub span: Span, + | ^^^^^^^^^^^^^^ + +warning: 2 warnings emitted + error: GraphQL interface trait method `as_obja` conflicts with the external downcast function `downcast_obja` declared on the trait to downcast into the implementer type `ObjA` --> $DIR/downcast_method_conflicts_with_external_downcast_fn.rs:26:5 | diff --git a/integration_tests/codegen_fail/fail/interface/downcast_method_wrong_input_args.stderr b/integration_tests/codegen_fail/fail/interface/downcast_method_wrong_input_args.stderr index 718a0a25..9bbfbba4 100644 --- a/integration_tests/codegen_fail/fail/interface/downcast_method_wrong_input_args.stderr +++ b/integration_tests/codegen_fail/fail/interface/downcast_method_wrong_input_args.stderr @@ -1,3 +1,19 @@ +warning: field is never read: `enum_path` + --> $DIR/mod.rs:282:5 + | +282 | pub enum_path: Option, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(dead_code)]` on by default + +warning: field is never read: `span` + --> $DIR/mod.rs:296:5 + | +296 | pub span: Span, + | ^^^^^^^^^^^^^^ + +warning: 2 warnings emitted + error: GraphQL interface expects trait method to accept `&self` only and, optionally, `&Context` --> $DIR/downcast_method_wrong_input_args.rs:10:10 | diff --git a/integration_tests/codegen_fail/fail/interface/downcast_method_wrong_return_type.stderr b/integration_tests/codegen_fail/fail/interface/downcast_method_wrong_return_type.stderr index 8c459495..36f90b81 100644 --- a/integration_tests/codegen_fail/fail/interface/downcast_method_wrong_return_type.stderr +++ b/integration_tests/codegen_fail/fail/interface/downcast_method_wrong_return_type.stderr @@ -1,3 +1,19 @@ +warning: field is never read: `enum_path` + --> $DIR/mod.rs:282:5 + | +282 | pub enum_path: Option, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(dead_code)]` on by default + +warning: field is never read: `span` + --> $DIR/mod.rs:296:5 + | +296 | pub span: Span, + | ^^^^^^^^^^^^^^ + +warning: 2 warnings emitted + error: GraphQL interface expects trait method return type to be `Option<&ImplementerType>` only --> $DIR/downcast_method_wrong_return_type.rs:10:40 | diff --git a/integration_tests/codegen_fail/fail/interface/field_double_underscored.stderr b/integration_tests/codegen_fail/fail/interface/field_double_underscored.stderr index adebb09f..25c13c59 100644 --- a/integration_tests/codegen_fail/fail/interface/field_double_underscored.stderr +++ b/integration_tests/codegen_fail/fail/interface/field_double_underscored.stderr @@ -1,3 +1,19 @@ +warning: field is never read: `enum_path` + --> $DIR/mod.rs:282:5 + | +282 | pub enum_path: Option, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(dead_code)]` on by default + +warning: field is never read: `span` + --> $DIR/mod.rs:296:5 + | +296 | pub span: Span, + | ^^^^^^^^^^^^^^ + +warning: 2 warnings emitted + error: All types and directives defined within a schema must not have a name which begins with `__` (two underscores), as this is used exclusively by GraphQL’s introspection system. --> $DIR/field_double_underscored.rs:14:8 | diff --git a/integration_tests/codegen_fail/fail/interface/field_non_output_return_type.stderr b/integration_tests/codegen_fail/fail/interface/field_non_output_return_type.stderr index 73b266d3..7d319afe 100644 --- a/integration_tests/codegen_fail/fail/interface/field_non_output_return_type.stderr +++ b/integration_tests/codegen_fail/fail/interface/field_non_output_return_type.stderr @@ -1,3 +1,19 @@ +warning: field is never read: `enum_path` + --> $DIR/mod.rs:282:5 + | +282 | pub enum_path: Option, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(dead_code)]` on by default + +warning: field is never read: `span` + --> $DIR/mod.rs:296:5 + | +296 | pub span: Span, + | ^^^^^^^^^^^^^^ + +warning: 2 warnings emitted + error[E0277]: the trait bound `ObjB: IsOutputType<__S>` is not satisfied --> $DIR/field_non_output_return_type.rs:17:1 | @@ -5,4 +21,4 @@ error[E0277]: the trait bound `ObjB: IsOutputType<__S>` is not satisfied | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `IsOutputType<__S>` is not implemented for `ObjB` | = note: required by `juniper::marker::IsOutputType::mark` - = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the attribute macro `graphql_interface` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/integration_tests/codegen_fail/fail/interface/fields_duplicate.stderr b/integration_tests/codegen_fail/fail/interface/fields_duplicate.stderr index db133386..44f6a698 100644 --- a/integration_tests/codegen_fail/fail/interface/fields_duplicate.stderr +++ b/integration_tests/codegen_fail/fail/interface/fields_duplicate.stderr @@ -1,3 +1,19 @@ +warning: field is never read: `enum_path` + --> $DIR/mod.rs:282:5 + | +282 | pub enum_path: Option, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(dead_code)]` on by default + +warning: field is never read: `span` + --> $DIR/mod.rs:296:5 + | +296 | pub span: Span, + | ^^^^^^^^^^^^^^ + +warning: 2 warnings emitted + error: GraphQL interface must have a different name for each field --> $DIR/fields_duplicate.rs:13:1 | diff --git a/integration_tests/codegen_fail/fail/interface/implementer_non_object_type.stderr b/integration_tests/codegen_fail/fail/interface/implementer_non_object_type.stderr index 2de9329c..9b2542f8 100644 --- a/integration_tests/codegen_fail/fail/interface/implementer_non_object_type.stderr +++ b/integration_tests/codegen_fail/fail/interface/implementer_non_object_type.stderr @@ -1,3 +1,19 @@ +warning: field is never read: `enum_path` + --> $DIR/mod.rs:282:5 + | +282 | pub enum_path: Option, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(dead_code)]` on by default + +warning: field is never read: `span` + --> $DIR/mod.rs:296:5 + | +296 | pub span: Span, + | ^^^^^^^^^^^^^^ + +warning: 2 warnings emitted + error[E0277]: the trait bound `ObjA: GraphQLObjectType<__S>` is not satisfied --> $DIR/implementer_non_object_type.rs:15:1 | @@ -5,7 +21,7 @@ error[E0277]: the trait bound `ObjA: GraphQLObjectType<__S>` is not satisfied | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `GraphQLObjectType<__S>` is not implemented for `ObjA` | = note: required by `juniper::marker::GraphQLObjectType::mark` - = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the attribute macro `graphql_interface` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `ObjA: IsOutputType<__S>` is not satisfied --> $DIR/implementer_non_object_type.rs:15:1 @@ -14,4 +30,4 @@ error[E0277]: the trait bound `ObjA: IsOutputType<__S>` is not satisfied | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `IsOutputType<__S>` is not implemented for `ObjA` | = note: required by `juniper::marker::IsOutputType::mark` - = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the attribute macro `graphql_interface` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/integration_tests/codegen_fail/fail/interface/implementers_duplicate_pretty.stderr b/integration_tests/codegen_fail/fail/interface/implementers_duplicate_pretty.stderr index 40db273e..dce26278 100644 --- a/integration_tests/codegen_fail/fail/interface/implementers_duplicate_pretty.stderr +++ b/integration_tests/codegen_fail/fail/interface/implementers_duplicate_pretty.stderr @@ -1,3 +1,19 @@ +warning: field is never read: `enum_path` + --> $DIR/mod.rs:282:5 + | +282 | pub enum_path: Option, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(dead_code)]` on by default + +warning: field is never read: `span` + --> $DIR/mod.rs:296:5 + | +296 | pub span: Span, + | ^^^^^^^^^^^^^^ + +warning: 2 warnings emitted + error: duplicated attribute argument found --> $DIR/implementers_duplicate_pretty.rs:16:34 | diff --git a/integration_tests/codegen_fail/fail/interface/implementers_duplicate_ugly.stderr b/integration_tests/codegen_fail/fail/interface/implementers_duplicate_ugly.stderr index c7a14090..e71aecd8 100644 --- a/integration_tests/codegen_fail/fail/interface/implementers_duplicate_ugly.stderr +++ b/integration_tests/codegen_fail/fail/interface/implementers_duplicate_ugly.stderr @@ -1,3 +1,19 @@ +warning: field is never read: `enum_path` + --> $DIR/mod.rs:282:5 + | +282 | pub enum_path: Option, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(dead_code)]` on by default + +warning: field is never read: `span` + --> $DIR/mod.rs:296:5 + | +296 | pub span: Span, + | ^^^^^^^^^^^^^^ + +warning: 2 warnings emitted + error[E0119]: conflicting implementations of trait `>::mark::_::{closure#0}::MutuallyExclusive` for type `ObjA` --> $DIR/implementers_duplicate_ugly.rs:18:1 | @@ -7,7 +23,7 @@ error[E0119]: conflicting implementations of trait `` for type `CharacterValue` --> $DIR/implementers_duplicate_ugly.rs:18:1 @@ -18,4 +34,4 @@ error[E0119]: conflicting implementations of trait `std::convert::From` fo | first implementation here | conflicting implementation for `CharacterValue` | - = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the attribute macro `graphql_interface` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/integration_tests/codegen_fail/fail/interface/name_double_underscored.stderr b/integration_tests/codegen_fail/fail/interface/name_double_underscored.stderr index de8c6715..ce9cefa0 100644 --- a/integration_tests/codegen_fail/fail/interface/name_double_underscored.stderr +++ b/integration_tests/codegen_fail/fail/interface/name_double_underscored.stderr @@ -1,3 +1,19 @@ +warning: field is never read: `enum_path` + --> $DIR/mod.rs:282:5 + | +282 | pub enum_path: Option, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(dead_code)]` on by default + +warning: field is never read: `span` + --> $DIR/mod.rs:296:5 + | +296 | pub span: Span, + | ^^^^^^^^^^^^^^ + +warning: 2 warnings emitted + error: All types and directives defined within a schema must not have a name which begins with `__` (two underscores), as this is used exclusively by GraphQL’s introspection system. --> $DIR/name_double_underscored.rs:4:7 | diff --git a/integration_tests/codegen_fail/fail/interface/no_fields.stderr b/integration_tests/codegen_fail/fail/interface/no_fields.stderr index 367a5e9b..1c83db3c 100644 --- a/integration_tests/codegen_fail/fail/interface/no_fields.stderr +++ b/integration_tests/codegen_fail/fail/interface/no_fields.stderr @@ -1,3 +1,19 @@ +warning: field is never read: `enum_path` + --> $DIR/mod.rs:282:5 + | +282 | pub enum_path: Option, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(dead_code)]` on by default + +warning: field is never read: `span` + --> $DIR/mod.rs:296:5 + | +296 | pub span: Span, + | ^^^^^^^^^^^^^^ + +warning: 2 warnings emitted + error: GraphQL interface must have at least one field --> $DIR/no_fields.rs:13:1 | diff --git a/integration_tests/codegen_fail/fail/interface/wrong_item.stderr b/integration_tests/codegen_fail/fail/interface/wrong_item.stderr index 8bb40afa..7a8c4082 100644 --- a/integration_tests/codegen_fail/fail/interface/wrong_item.stderr +++ b/integration_tests/codegen_fail/fail/interface/wrong_item.stderr @@ -1,7 +1,23 @@ +warning: field is never read: `enum_path` + --> $DIR/mod.rs:282:5 + | +282 | pub enum_path: Option, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(dead_code)]` on by default + +warning: field is never read: `span` + --> $DIR/mod.rs:296:5 + | +296 | pub span: Span, + | ^^^^^^^^^^^^^^ + +warning: 2 warnings emitted + error: #[graphql_interface] attribute is applicable to trait definitions and trait implementations only --> $DIR/wrong_item.rs:8:1 | 8 | #[graphql_interface(for = ObjA)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the attribute macro `graphql_interface` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/integration_tests/codegen_fail/fail/object/derive_fields_unique.stderr b/integration_tests/codegen_fail/fail/object/derive_fields_unique.stderr index 999b0116..666a2d0a 100644 --- a/integration_tests/codegen_fail/fail/object/derive_fields_unique.stderr +++ b/integration_tests/codegen_fail/fail/object/derive_fields_unique.stderr @@ -1,3 +1,19 @@ +warning: field is never read: `enum_path` + --> $DIR/mod.rs:282:5 + | +282 | pub enum_path: Option, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(dead_code)]` on by default + +warning: field is never read: `span` + --> $DIR/mod.rs:296:5 + | +296 | pub span: Span, + | ^^^^^^^^^^^^^^ + +warning: 2 warnings emitted + error: GraphQL object does not allow fields with the same name --> $DIR/derive_fields_unique.rs:4:5 | diff --git a/integration_tests/codegen_fail/fail/object/derive_no_fields.stderr b/integration_tests/codegen_fail/fail/object/derive_no_fields.stderr index 183cd430..db218167 100644 --- a/integration_tests/codegen_fail/fail/object/derive_no_fields.stderr +++ b/integration_tests/codegen_fail/fail/object/derive_no_fields.stderr @@ -1,3 +1,19 @@ +warning: field is never read: `enum_path` + --> $DIR/mod.rs:282:5 + | +282 | pub enum_path: Option, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(dead_code)]` on by default + +warning: field is never read: `span` + --> $DIR/mod.rs:296:5 + | +296 | pub span: Span, + | ^^^^^^^^^^^^^^ + +warning: 2 warnings emitted + error: GraphQL object expects at least one field --> $DIR/derive_no_fields.rs:2:1 | diff --git a/integration_tests/codegen_fail/fail/object/derive_no_underscore.stderr b/integration_tests/codegen_fail/fail/object/derive_no_underscore.stderr index eb7eb67b..62bea978 100644 --- a/integration_tests/codegen_fail/fail/object/derive_no_underscore.stderr +++ b/integration_tests/codegen_fail/fail/object/derive_no_underscore.stderr @@ -1,3 +1,19 @@ +warning: field is never read: `enum_path` + --> $DIR/mod.rs:282:5 + | +282 | pub enum_path: Option, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(dead_code)]` on by default + +warning: field is never read: `span` + --> $DIR/mod.rs:296:5 + | +296 | pub span: Span, + | ^^^^^^^^^^^^^^ + +warning: 2 warnings emitted + error: All types and directives defined within a schema must not have a name which begins with `__` (two underscores), as this is used exclusively by GraphQL’s introspection system. --> $DIR/derive_no_underscore.rs:3:15 | diff --git a/integration_tests/codegen_fail/fail/object/impl_argument_no_object.stderr b/integration_tests/codegen_fail/fail/object/impl_argument_no_object.stderr index 87040d36..b98e7e05 100644 --- a/integration_tests/codegen_fail/fail/object/impl_argument_no_object.stderr +++ b/integration_tests/codegen_fail/fail/object/impl_argument_no_object.stderr @@ -1,3 +1,19 @@ +warning: field is never read: `enum_path` + --> $DIR/mod.rs:282:5 + | +282 | pub enum_path: Option, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(dead_code)]` on by default + +warning: field is never read: `span` + --> $DIR/mod.rs:296:5 + | +296 | pub span: Span, + | ^^^^^^^^^^^^^^ + +warning: 2 warnings emitted + error[E0277]: the trait bound `Obj: IsInputType<__S>` is not satisfied --> $DIR/impl_argument_no_object.rs:8:1 | @@ -5,7 +21,7 @@ error[E0277]: the trait bound `Obj: IsInputType<__S>` is not satisfied | ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `IsInputType<__S>` is not implemented for `Obj` | = note: required by `juniper::marker::IsInputType::mark` - = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the attribute macro `juniper::graphql_object` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `Obj: FromInputValue<__S>` is not satisfied --> $DIR/impl_argument_no_object.rs:8:1 @@ -13,7 +29,7 @@ error[E0277]: the trait bound `Obj: FromInputValue<__S>` is not satisfied 8 | #[juniper::graphql_object] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `FromInputValue<__S>` is not implemented for `Obj` | - = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the attribute macro `juniper::graphql_object` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `Obj: FromInputValue` is not satisfied --> $DIR/impl_argument_no_object.rs:8:1 @@ -26,4 +42,4 @@ error[E0277]: the trait bound `Obj: FromInputValue` is not satisfied | pub trait FromInputValue: Sized { | ------------------------------------------------------- required by this bound in `FromInputValue` | - = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the attribute macro `juniper::graphql_object` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/integration_tests/codegen_fail/fail/object/impl_fields_unique.stderr b/integration_tests/codegen_fail/fail/object/impl_fields_unique.stderr index 49649a2a..01e75168 100644 --- a/integration_tests/codegen_fail/fail/object/impl_fields_unique.stderr +++ b/integration_tests/codegen_fail/fail/object/impl_fields_unique.stderr @@ -1,3 +1,19 @@ +warning: field is never read: `enum_path` + --> $DIR/mod.rs:282:5 + | +282 | pub enum_path: Option, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(dead_code)]` on by default + +warning: field is never read: `span` + --> $DIR/mod.rs:296:5 + | +296 | pub span: Span, + | ^^^^^^^^^^^^^^ + +warning: 2 warnings emitted + error: GraphQL object does not allow fields with the same name --> $DIR/impl_fields_unique.rs:9:5 | diff --git a/integration_tests/codegen_fail/fail/object/impl_no_argument_underscore.stderr b/integration_tests/codegen_fail/fail/object/impl_no_argument_underscore.stderr index 40eea80d..b4f10e5a 100644 --- a/integration_tests/codegen_fail/fail/object/impl_no_argument_underscore.stderr +++ b/integration_tests/codegen_fail/fail/object/impl_no_argument_underscore.stderr @@ -1,3 +1,19 @@ +warning: field is never read: `enum_path` + --> $DIR/mod.rs:282:5 + | +282 | pub enum_path: Option, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(dead_code)]` on by default + +warning: field is never read: `span` + --> $DIR/mod.rs:296:5 + | +296 | pub span: Span, + | ^^^^^^^^^^^^^^ + +warning: 2 warnings emitted + error: All types and directives defined within a schema must not have a name which begins with `__` (two underscores), as this is used exclusively by GraphQL’s introspection system. --> $DIR/impl_no_argument_underscore.rs:5:29 | diff --git a/integration_tests/codegen_fail/fail/object/impl_no_fields.stderr b/integration_tests/codegen_fail/fail/object/impl_no_fields.stderr index 798a7db2..7e7e6059 100644 --- a/integration_tests/codegen_fail/fail/object/impl_no_fields.stderr +++ b/integration_tests/codegen_fail/fail/object/impl_no_fields.stderr @@ -1,3 +1,19 @@ +warning: field is never read: `enum_path` + --> $DIR/mod.rs:282:5 + | +282 | pub enum_path: Option, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(dead_code)]` on by default + +warning: field is never read: `span` + --> $DIR/mod.rs:296:5 + | +296 | pub span: Span, + | ^^^^^^^^^^^^^^ + +warning: 2 warnings emitted + error: GraphQL object expects at least one field --> $DIR/impl_no_fields.rs:4:1 | diff --git a/integration_tests/codegen_fail/fail/object/impl_no_underscore.stderr b/integration_tests/codegen_fail/fail/object/impl_no_underscore.stderr index b7e531e5..96c8a533 100644 --- a/integration_tests/codegen_fail/fail/object/impl_no_underscore.stderr +++ b/integration_tests/codegen_fail/fail/object/impl_no_underscore.stderr @@ -1,3 +1,19 @@ +warning: field is never read: `enum_path` + --> $DIR/mod.rs:282:5 + | +282 | pub enum_path: Option, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(dead_code)]` on by default + +warning: field is never read: `span` + --> $DIR/mod.rs:296:5 + | +296 | pub span: Span, + | ^^^^^^^^^^^^^^ + +warning: 2 warnings emitted + error: All types and directives defined within a schema must not have a name which begins with `__` (two underscores), as this is used exclusively by GraphQL’s introspection system. --> $DIR/impl_no_underscore.rs:5:15 | diff --git a/integration_tests/codegen_fail/fail/union/attr_wrong_item.stderr b/integration_tests/codegen_fail/fail/union/attr_wrong_item.stderr index 419835d5..bf16d8c3 100644 --- a/integration_tests/codegen_fail/fail/union/attr_wrong_item.stderr +++ b/integration_tests/codegen_fail/fail/union/attr_wrong_item.stderr @@ -1,7 +1,23 @@ +warning: field is never read: `enum_path` + --> $DIR/mod.rs:282:5 + | +282 | pub enum_path: Option, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(dead_code)]` on by default + +warning: field is never read: `span` + --> $DIR/mod.rs:296:5 + | +296 | pub span: Span, + | ^^^^^^^^^^^^^^ + +warning: 2 warnings emitted + error: #[graphql_union] attribute is applicable to trait definitions only --> $DIR/attr_wrong_item.rs:3:1 | 3 | #[graphql_union] | ^^^^^^^^^^^^^^^^ | - = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the attribute macro `graphql_union` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/integration_tests/codegen_fail/fail/union/derive_wrong_item.stderr b/integration_tests/codegen_fail/fail/union/derive_wrong_item.stderr index fdeb15b4..c0c7b73a 100644 --- a/integration_tests/codegen_fail/fail/union/derive_wrong_item.stderr +++ b/integration_tests/codegen_fail/fail/union/derive_wrong_item.stderr @@ -1,3 +1,19 @@ +warning: field is never read: `enum_path` + --> $DIR/mod.rs:282:5 + | +282 | pub enum_path: Option, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(dead_code)]` on by default + +warning: field is never read: `span` + --> $DIR/mod.rs:296:5 + | +296 | pub span: Span, + | ^^^^^^^^^^^^^^ + +warning: 2 warnings emitted + error: GraphQL union can only be derived for enums and structs --> $DIR/derive_wrong_item.rs:4:1 | diff --git a/integration_tests/codegen_fail/fail/union/enum_external_resolver_fn_conflicts_with_variant_external_resolver_fn.stderr b/integration_tests/codegen_fail/fail/union/enum_external_resolver_fn_conflicts_with_variant_external_resolver_fn.stderr index 12957f13..f35ab1c0 100644 --- a/integration_tests/codegen_fail/fail/union/enum_external_resolver_fn_conflicts_with_variant_external_resolver_fn.stderr +++ b/integration_tests/codegen_fail/fail/union/enum_external_resolver_fn_conflicts_with_variant_external_resolver_fn.stderr @@ -1,3 +1,19 @@ +warning: field is never read: `enum_path` + --> $DIR/mod.rs:282:5 + | +282 | pub enum_path: Option, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(dead_code)]` on by default + +warning: field is never read: `span` + --> $DIR/mod.rs:296:5 + | +296 | pub span: Span, + | ^^^^^^^^^^^^^^ + +warning: 2 warnings emitted + error: GraphQL union variant `Human` already has external resolver function `resolve_fn1` declared on the enum --> $DIR/enum_external_resolver_fn_conflicts_with_variant_external_resolver_fn.rs:6:15 | diff --git a/integration_tests/codegen_fail/fail/union/enum_name_double_underscored.stderr b/integration_tests/codegen_fail/fail/union/enum_name_double_underscored.stderr index df5db23f..5d8610c9 100644 --- a/integration_tests/codegen_fail/fail/union/enum_name_double_underscored.stderr +++ b/integration_tests/codegen_fail/fail/union/enum_name_double_underscored.stderr @@ -1,3 +1,19 @@ +warning: field is never read: `enum_path` + --> $DIR/mod.rs:282:5 + | +282 | pub enum_path: Option, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(dead_code)]` on by default + +warning: field is never read: `span` + --> $DIR/mod.rs:296:5 + | +296 | pub span: Span, + | ^^^^^^^^^^^^^^ + +warning: 2 warnings emitted + error: All types and directives defined within a schema must not have a name which begins with `__` (two underscores), as this is used exclusively by GraphQL’s introspection system. --> $DIR/enum_name_double_underscored.rs:4:6 | diff --git a/integration_tests/codegen_fail/fail/union/enum_no_fields.stderr b/integration_tests/codegen_fail/fail/union/enum_no_fields.stderr index 85ea2585..1b6253dd 100644 --- a/integration_tests/codegen_fail/fail/union/enum_no_fields.stderr +++ b/integration_tests/codegen_fail/fail/union/enum_no_fields.stderr @@ -1,3 +1,19 @@ +warning: field is never read: `enum_path` + --> $DIR/mod.rs:282:5 + | +282 | pub enum_path: Option, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(dead_code)]` on by default + +warning: field is never read: `span` + --> $DIR/mod.rs:296:5 + | +296 | pub span: Span, + | ^^^^^^^^^^^^^^ + +warning: 2 warnings emitted + error: GraphQL union expects at least one union variant --> $DIR/enum_no_fields.rs:4:1 | diff --git a/integration_tests/codegen_fail/fail/union/enum_non_object_variant.stderr b/integration_tests/codegen_fail/fail/union/enum_non_object_variant.stderr index d2c750f3..f4b871bd 100644 --- a/integration_tests/codegen_fail/fail/union/enum_non_object_variant.stderr +++ b/integration_tests/codegen_fail/fail/union/enum_non_object_variant.stderr @@ -1,3 +1,19 @@ +warning: field is never read: `enum_path` + --> $DIR/mod.rs:282:5 + | +282 | pub enum_path: Option, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(dead_code)]` on by default + +warning: field is never read: `span` + --> $DIR/mod.rs:296:5 + | +296 | pub span: Span, + | ^^^^^^^^^^^^^^ + +warning: 2 warnings emitted + error[E0277]: the trait bound `Test: GraphQLObjectType<__S>` is not satisfied --> $DIR/enum_non_object_variant.rs:9:10 | @@ -5,4 +21,4 @@ error[E0277]: the trait bound `Test: GraphQLObjectType<__S>` is not satisfied | ^^^^^^^^^^^^ the trait `GraphQLObjectType<__S>` is not implemented for `Test` | = note: required by `juniper::marker::GraphQLObjectType::mark` - = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the derive macro `GraphQLUnion` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/integration_tests/codegen_fail/fail/union/enum_same_type_pretty.stderr b/integration_tests/codegen_fail/fail/union/enum_same_type_pretty.stderr index 65cac9c3..cc86a17d 100644 --- a/integration_tests/codegen_fail/fail/union/enum_same_type_pretty.stderr +++ b/integration_tests/codegen_fail/fail/union/enum_same_type_pretty.stderr @@ -1,3 +1,19 @@ +warning: field is never read: `enum_path` + --> $DIR/mod.rs:282:5 + | +282 | pub enum_path: Option, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(dead_code)]` on by default + +warning: field is never read: `span` + --> $DIR/mod.rs:296:5 + | +296 | pub span: Span, + | ^^^^^^^^^^^^^^ + +warning: 2 warnings emitted + error: GraphQL union must have a different type for each union variant --> $DIR/enum_same_type_pretty.rs:4:1 | diff --git a/integration_tests/codegen_fail/fail/union/enum_same_type_ugly.stderr b/integration_tests/codegen_fail/fail/union/enum_same_type_ugly.stderr index 8ddbe884..9425d7a3 100644 --- a/integration_tests/codegen_fail/fail/union/enum_same_type_ugly.stderr +++ b/integration_tests/codegen_fail/fail/union/enum_same_type_ugly.stderr @@ -1,3 +1,19 @@ +warning: field is never read: `enum_path` + --> $DIR/mod.rs:282:5 + | +282 | pub enum_path: Option, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(dead_code)]` on by default + +warning: field is never read: `span` + --> $DIR/mod.rs:296:5 + | +296 | pub span: Span, + | ^^^^^^^^^^^^^^ + +warning: 2 warnings emitted + error[E0119]: conflicting implementations of trait `>::mark::_::{closure#0}::MutuallyExclusive` for type `std::string::String` --> $DIR/enum_same_type_ugly.rs:3:10 | @@ -7,4 +23,4 @@ error[E0119]: conflicting implementations of trait ` $DIR/mod.rs:282:5 + | +282 | pub enum_path: Option, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(dead_code)]` on by default + +warning: field is never read: `span` + --> $DIR/mod.rs:296:5 + | +296 | pub span: Span, + | ^^^^^^^^^^^^^^ + +warning: 2 warnings emitted + error: GraphQL union enum allows only unnamed variants with a single field, e.g. `Some(T)` --> $DIR/enum_wrong_variant_field.rs:5:5 | diff --git a/integration_tests/codegen_fail/fail/union/struct_name_double_underscored.stderr b/integration_tests/codegen_fail/fail/union/struct_name_double_underscored.stderr index 48054c63..fec65cf5 100644 --- a/integration_tests/codegen_fail/fail/union/struct_name_double_underscored.stderr +++ b/integration_tests/codegen_fail/fail/union/struct_name_double_underscored.stderr @@ -1,3 +1,19 @@ +warning: field is never read: `enum_path` + --> $DIR/mod.rs:282:5 + | +282 | pub enum_path: Option, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(dead_code)]` on by default + +warning: field is never read: `span` + --> $DIR/mod.rs:296:5 + | +296 | pub span: Span, + | ^^^^^^^^^^^^^^ + +warning: 2 warnings emitted + error: All types and directives defined within a schema must not have a name which begins with `__` (two underscores), as this is used exclusively by GraphQL’s introspection system. --> $DIR/struct_name_double_underscored.rs:5:8 | diff --git a/integration_tests/codegen_fail/fail/union/struct_no_fields.stderr b/integration_tests/codegen_fail/fail/union/struct_no_fields.stderr index 3d6aaeb2..e1303d27 100644 --- a/integration_tests/codegen_fail/fail/union/struct_no_fields.stderr +++ b/integration_tests/codegen_fail/fail/union/struct_no_fields.stderr @@ -1,3 +1,19 @@ +warning: field is never read: `enum_path` + --> $DIR/mod.rs:282:5 + | +282 | pub enum_path: Option, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(dead_code)]` on by default + +warning: field is never read: `span` + --> $DIR/mod.rs:296:5 + | +296 | pub span: Span, + | ^^^^^^^^^^^^^^ + +warning: 2 warnings emitted + error: GraphQL union expects at least one union variant --> $DIR/struct_no_fields.rs:4:1 | diff --git a/integration_tests/codegen_fail/fail/union/struct_non_object_variant.stderr b/integration_tests/codegen_fail/fail/union/struct_non_object_variant.stderr index c3cbd2c0..588a1c80 100644 --- a/integration_tests/codegen_fail/fail/union/struct_non_object_variant.stderr +++ b/integration_tests/codegen_fail/fail/union/struct_non_object_variant.stderr @@ -1,3 +1,19 @@ +warning: field is never read: `enum_path` + --> $DIR/mod.rs:282:5 + | +282 | pub enum_path: Option, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(dead_code)]` on by default + +warning: field is never read: `span` + --> $DIR/mod.rs:296:5 + | +296 | pub span: Span, + | ^^^^^^^^^^^^^^ + +warning: 2 warnings emitted + error[E0277]: the trait bound `Test: GraphQLObjectType<__S>` is not satisfied --> $DIR/struct_non_object_variant.rs:9:10 | @@ -5,4 +21,4 @@ error[E0277]: the trait bound `Test: GraphQLObjectType<__S>` is not satisfied | ^^^^^^^^^^^^ the trait `GraphQLObjectType<__S>` is not implemented for `Test` | = note: required by `juniper::marker::GraphQLObjectType::mark` - = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the derive macro `GraphQLUnion` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/integration_tests/codegen_fail/fail/union/struct_same_type_pretty.stderr b/integration_tests/codegen_fail/fail/union/struct_same_type_pretty.stderr index 9e3152bd..f6e069e1 100644 --- a/integration_tests/codegen_fail/fail/union/struct_same_type_pretty.stderr +++ b/integration_tests/codegen_fail/fail/union/struct_same_type_pretty.stderr @@ -1,3 +1,19 @@ +warning: field is never read: `enum_path` + --> $DIR/mod.rs:282:5 + | +282 | pub enum_path: Option, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(dead_code)]` on by default + +warning: field is never read: `span` + --> $DIR/mod.rs:296:5 + | +296 | pub span: Span, + | ^^^^^^^^^^^^^^ + +warning: 2 warnings emitted + error: duplicated attribute argument found --> $DIR/struct_same_type_pretty.rs:5:14 | diff --git a/integration_tests/codegen_fail/fail/union/struct_same_type_ugly.stderr b/integration_tests/codegen_fail/fail/union/struct_same_type_ugly.stderr index 44454b02..bf4f46a0 100644 --- a/integration_tests/codegen_fail/fail/union/struct_same_type_ugly.stderr +++ b/integration_tests/codegen_fail/fail/union/struct_same_type_ugly.stderr @@ -1,3 +1,19 @@ +warning: field is never read: `enum_path` + --> $DIR/mod.rs:282:5 + | +282 | pub enum_path: Option, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(dead_code)]` on by default + +warning: field is never read: `span` + --> $DIR/mod.rs:296:5 + | +296 | pub span: Span, + | ^^^^^^^^^^^^^^ + +warning: 2 warnings emitted + error[E0119]: conflicting implementations of trait `>::mark::_::{closure#0}::MutuallyExclusive` for type `std::string::String` --> $DIR/struct_same_type_ugly.rs:3:10 | @@ -7,4 +23,4 @@ error[E0119]: conflicting implementations of trait ` $DIR/mod.rs:282:5 + | +282 | pub enum_path: Option, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(dead_code)]` on by default + +warning: field is never read: `span` + --> $DIR/mod.rs:296:5 + | +296 | pub span: Span, + | ^^^^^^^^^^^^^^ + +warning: 2 warnings emitted + error[E0277]: the trait bound `CustomContext: FromContext` is not satisfied --> $DIR/trait_fail_infer_context.rs:3:1 | 3 | #[graphql_union] - | ^^^^^^^^^^^^^^^^ the trait `FromContext` is not implemented for `CustomContext` + | ^^^^^^^^^^^^^^^^ expected an implementor of trait `FromContext` | = note: required by `juniper::FromContext::from` - = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the attribute macro `graphql_union` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0308]: mismatched types --> $DIR/trait_fail_infer_context.rs:3:1 @@ -15,4 +31,4 @@ error[E0308]: mismatched types | = note: expected reference `&CustomContext` found reference `&SubContext` - = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the attribute macro `graphql_union` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/integration_tests/codegen_fail/fail/union/trait_method_conflicts_with_external_resolver_fn.stderr b/integration_tests/codegen_fail/fail/union/trait_method_conflicts_with_external_resolver_fn.stderr index 6fff3782..b5eb6db0 100644 --- a/integration_tests/codegen_fail/fail/union/trait_method_conflicts_with_external_resolver_fn.stderr +++ b/integration_tests/codegen_fail/fail/union/trait_method_conflicts_with_external_resolver_fn.stderr @@ -1,3 +1,19 @@ +warning: field is never read: `enum_path` + --> $DIR/mod.rs:282:5 + | +282 | pub enum_path: Option, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(dead_code)]` on by default + +warning: field is never read: `span` + --> $DIR/mod.rs:296:5 + | +296 | pub span: Span, + | ^^^^^^^^^^^^^^ + +warning: 2 warnings emitted + error: GraphQL union trait method `a` conflicts with the external resolver function `some_fn` declared on the trait to resolve the variant type `Human` --> $DIR/trait_method_conflicts_with_external_resolver_fn.rs:5:5 | diff --git a/integration_tests/codegen_fail/fail/union/trait_name_double_underscored.stderr b/integration_tests/codegen_fail/fail/union/trait_name_double_underscored.stderr index d010fee2..4ed665b0 100644 --- a/integration_tests/codegen_fail/fail/union/trait_name_double_underscored.stderr +++ b/integration_tests/codegen_fail/fail/union/trait_name_double_underscored.stderr @@ -1,3 +1,19 @@ +warning: field is never read: `enum_path` + --> $DIR/mod.rs:282:5 + | +282 | pub enum_path: Option, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(dead_code)]` on by default + +warning: field is never read: `span` + --> $DIR/mod.rs:296:5 + | +296 | pub span: Span, + | ^^^^^^^^^^^^^^ + +warning: 2 warnings emitted + error: All types and directives defined within a schema must not have a name which begins with `__` (two underscores), as this is used exclusively by GraphQL’s introspection system. --> $DIR/trait_name_double_underscored.rs:4:7 | diff --git a/integration_tests/codegen_fail/fail/union/trait_no_fields.stderr b/integration_tests/codegen_fail/fail/union/trait_no_fields.stderr index 8261623d..341c60ab 100644 --- a/integration_tests/codegen_fail/fail/union/trait_no_fields.stderr +++ b/integration_tests/codegen_fail/fail/union/trait_no_fields.stderr @@ -1,3 +1,19 @@ +warning: field is never read: `enum_path` + --> $DIR/mod.rs:282:5 + | +282 | pub enum_path: Option, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(dead_code)]` on by default + +warning: field is never read: `span` + --> $DIR/mod.rs:296:5 + | +296 | pub span: Span, + | ^^^^^^^^^^^^^^ + +warning: 2 warnings emitted + error: GraphQL union expects at least one union variant --> $DIR/trait_no_fields.rs:4:1 | diff --git a/integration_tests/codegen_fail/fail/union/trait_non_object_variant.stderr b/integration_tests/codegen_fail/fail/union/trait_non_object_variant.stderr index 41c24d9e..8c8bce6f 100644 --- a/integration_tests/codegen_fail/fail/union/trait_non_object_variant.stderr +++ b/integration_tests/codegen_fail/fail/union/trait_non_object_variant.stderr @@ -1,3 +1,19 @@ +warning: field is never read: `enum_path` + --> $DIR/mod.rs:282:5 + | +282 | pub enum_path: Option, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(dead_code)]` on by default + +warning: field is never read: `span` + --> $DIR/mod.rs:296:5 + | +296 | pub span: Span, + | ^^^^^^^^^^^^^^ + +warning: 2 warnings emitted + error[E0277]: the trait bound `Test: GraphQLObjectType<__S>` is not satisfied --> $DIR/trait_non_object_variant.rs:9:1 | @@ -5,4 +21,4 @@ error[E0277]: the trait bound `Test: GraphQLObjectType<__S>` is not satisfied | ^^^^^^^^^^^^^^^^ the trait `GraphQLObjectType<__S>` is not implemented for `Test` | = note: required by `juniper::marker::GraphQLObjectType::mark` - = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the attribute macro `graphql_union` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/integration_tests/codegen_fail/fail/union/trait_same_type_pretty.stderr b/integration_tests/codegen_fail/fail/union/trait_same_type_pretty.stderr index f899e307..f9259408 100644 --- a/integration_tests/codegen_fail/fail/union/trait_same_type_pretty.stderr +++ b/integration_tests/codegen_fail/fail/union/trait_same_type_pretty.stderr @@ -1,3 +1,19 @@ +warning: field is never read: `enum_path` + --> $DIR/mod.rs:282:5 + | +282 | pub enum_path: Option, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(dead_code)]` on by default + +warning: field is never read: `span` + --> $DIR/mod.rs:296:5 + | +296 | pub span: Span, + | ^^^^^^^^^^^^^^ + +warning: 2 warnings emitted + error: GraphQL union must have a different type for each union variant --> $DIR/trait_same_type_pretty.rs:4:1 | diff --git a/integration_tests/codegen_fail/fail/union/trait_same_type_ugly.stderr b/integration_tests/codegen_fail/fail/union/trait_same_type_ugly.stderr index ea9575aa..fbf25a13 100644 --- a/integration_tests/codegen_fail/fail/union/trait_same_type_ugly.stderr +++ b/integration_tests/codegen_fail/fail/union/trait_same_type_ugly.stderr @@ -1,3 +1,19 @@ +warning: field is never read: `enum_path` + --> $DIR/mod.rs:282:5 + | +282 | pub enum_path: Option, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(dead_code)]` on by default + +warning: field is never read: `span` + --> $DIR/mod.rs:296:5 + | +296 | pub span: Span, + | ^^^^^^^^^^^^^^ + +warning: 2 warnings emitted + error[E0119]: conflicting implementations of trait `<(dyn Character + std::marker::Send + std::marker::Sync + '__obj) as juniper::GraphQLUnion<__S>>::mark::_::{closure#0}::MutuallyExclusive` for type `std::string::String` --> $DIR/trait_same_type_ugly.rs:3:1 | @@ -7,4 +23,4 @@ error[E0119]: conflicting implementations of trait `<(dyn Character + std::marke | first implementation here | conflicting implementation for `std::string::String` | - = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `::juniper::sa::assert_type_ne_all` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/integration_tests/codegen_fail/fail/union/trait_with_attr_on_method.stderr b/integration_tests/codegen_fail/fail/union/trait_with_attr_on_method.stderr index 427163a8..812052c9 100644 --- a/integration_tests/codegen_fail/fail/union/trait_with_attr_on_method.stderr +++ b/integration_tests/codegen_fail/fail/union/trait_with_attr_on_method.stderr @@ -1,3 +1,19 @@ +warning: field is never read: `enum_path` + --> $DIR/mod.rs:282:5 + | +282 | pub enum_path: Option, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(dead_code)]` on by default + +warning: field is never read: `span` + --> $DIR/mod.rs:296:5 + | +296 | pub span: Span, + | ^^^^^^^^^^^^^^ + +warning: 2 warnings emitted + error: GraphQL union cannot use #[graphql(with = ...)] attribute on a trait method --> $DIR/trait_with_attr_on_method.rs:5:15 | diff --git a/integration_tests/codegen_fail/fail/union/trait_wrong_method_input_args.stderr b/integration_tests/codegen_fail/fail/union/trait_wrong_method_input_args.stderr index 9b2fa2d8..8818943d 100644 --- a/integration_tests/codegen_fail/fail/union/trait_wrong_method_input_args.stderr +++ b/integration_tests/codegen_fail/fail/union/trait_wrong_method_input_args.stderr @@ -1,3 +1,19 @@ +warning: field is never read: `enum_path` + --> $DIR/mod.rs:282:5 + | +282 | pub enum_path: Option, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(dead_code)]` on by default + +warning: field is never read: `span` + --> $DIR/mod.rs:296:5 + | +296 | pub span: Span, + | ^^^^^^^^^^^^^^ + +warning: 2 warnings emitted + error: GraphQL union expects trait method to accept `&self` only and, optionally, `&Context` --> $DIR/trait_wrong_method_input_args.rs:5:10 | diff --git a/integration_tests/codegen_fail/fail/union/trait_wrong_method_return_type.stderr b/integration_tests/codegen_fail/fail/union/trait_wrong_method_return_type.stderr index bbc40568..615ec244 100644 --- a/integration_tests/codegen_fail/fail/union/trait_wrong_method_return_type.stderr +++ b/integration_tests/codegen_fail/fail/union/trait_wrong_method_return_type.stderr @@ -1,3 +1,19 @@ +warning: field is never read: `enum_path` + --> $DIR/mod.rs:282:5 + | +282 | pub enum_path: Option, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(dead_code)]` on by default + +warning: field is never read: `span` + --> $DIR/mod.rs:296:5 + | +296 | pub span: Span, + | ^^^^^^^^^^^^^^ + +warning: 2 warnings emitted + error: GraphQL union expects trait method return type to be `Option<&VariantType>` only --> $DIR/trait_wrong_method_return_type.rs:5:20 |