Update compile fail tests for nightly Rust (#710)
* Update compile fail tests for latest Rust The messages appear to have changed on nightly * Fix tests depending on fixture data * Fix more integration test paths * Fix doc warnings
This commit is contained in:
parent
825a35c686
commit
29930b002b
15 changed files with 35 additions and 32 deletions
|
@ -5,7 +5,7 @@ extern crate juniper;
|
||||||
use bencher::Bencher;
|
use bencher::Bencher;
|
||||||
|
|
||||||
use juniper::{execute_sync, RootNode, EmptyMutation, EmptySubscription, Variables};
|
use juniper::{execute_sync, RootNode, EmptyMutation, EmptySubscription, Variables};
|
||||||
use juniper::tests::model::Database;
|
use juniper::tests::fixtures::starwars::model::Database;
|
||||||
|
|
||||||
fn query_type_name(b: &mut Bencher) {
|
fn query_type_name(b: &mut Bencher) {
|
||||||
let database = Database::new();
|
let database = Database::new();
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
error[E0277]: the trait bound `ObjectA: juniper::ast::FromInputValue<__S>` is not satisfied
|
error[E0277]: the trait bound `ObjectA: juniper::FromInputValue<__S>` is not satisfied
|
||||||
--> $DIR/derive_incompatible_object.rs:6:10
|
--> $DIR/derive_incompatible_object.rs:6:10
|
||||||
|
|
|
|
||||||
6 | #[derive(juniper::GraphQLInputObject)]
|
6 | #[derive(juniper::GraphQLInputObject)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `juniper::ast::FromInputValue<__S>` is not implemented for `ObjectA`
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `juniper::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 a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
|
|
||||||
error[E0277]: the trait bound `ObjectA: juniper::ast::FromInputValue<__S>` is not satisfied
|
error[E0277]: the trait bound `ObjectA: juniper::FromInputValue<__S>` is not satisfied
|
||||||
--> $DIR/derive_incompatible_object.rs:6:10
|
--> $DIR/derive_incompatible_object.rs:6:10
|
||||||
|
|
|
|
||||||
6 | #[derive(juniper::GraphQLInputObject)]
|
6 | #[derive(juniper::GraphQLInputObject)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `juniper::ast::FromInputValue<__S>` is not implemented for `ObjectA`
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `juniper::FromInputValue<__S>` is not implemented for `ObjectA`
|
||||||
|
|
|
|
||||||
= note: required by `juniper::ast::FromInputValue::from_input_value`
|
= note: required by `juniper::FromInputValue::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 a derive macro (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
|
error[E0599]: no method named `to_input_value` found for struct `ObjectA` in the current scope
|
||||||
|
@ -26,5 +26,5 @@ 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
|
= 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:
|
= note: the following trait defines an item `to_input_value`, perhaps you need to implement it:
|
||||||
candidate #1: `juniper::ast::ToInputValue`
|
candidate #1: `juniper::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 a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
error[E0277]: the trait bound `ObjA: juniper::ast::FromInputValue` is not satisfied
|
error[E0277]: the trait bound `ObjA: juniper::FromInputValue` is not satisfied
|
||||||
--> $DIR/impl_argument_no_object.rs:11:1
|
--> $DIR/impl_argument_no_object.rs:11:1
|
||||||
|
|
|
|
||||||
11 | / juniper::graphql_interface!(Character: () where Scalar = juniper::DefaultScalarValue |&self| {
|
11 | / juniper::graphql_interface!(Character: () where Scalar = juniper::DefaultScalarValue |&self| {
|
||||||
|
@ -8,11 +8,11 @@ error[E0277]: the trait bound `ObjA: juniper::ast::FromInputValue` is not satisf
|
||||||
... |
|
... |
|
||||||
20 | | }
|
20 | | }
|
||||||
21 | | });
|
21 | | });
|
||||||
| |___^ the trait `juniper::ast::FromInputValue` is not implemented for `ObjA`
|
| |___^ the trait `juniper::FromInputValue` is not implemented for `ObjA`
|
||||||
|
|
|
|
||||||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
|
|
||||||
error[E0277]: the trait bound `ObjA: juniper::ast::FromInputValue` is not satisfied
|
error[E0277]: the trait bound `ObjA: juniper::FromInputValue` is not satisfied
|
||||||
--> $DIR/impl_argument_no_object.rs:11:1
|
--> $DIR/impl_argument_no_object.rs:11:1
|
||||||
|
|
|
|
||||||
11 | / juniper::graphql_interface!(Character: () where Scalar = juniper::DefaultScalarValue |&self| {
|
11 | / juniper::graphql_interface!(Character: () where Scalar = juniper::DefaultScalarValue |&self| {
|
||||||
|
@ -22,6 +22,6 @@ error[E0277]: the trait bound `ObjA: juniper::ast::FromInputValue` is not satisf
|
||||||
... |
|
... |
|
||||||
20 | | }
|
20 | | }
|
||||||
21 | | });
|
21 | | });
|
||||||
| |___^ the trait `juniper::ast::FromInputValue` is not implemented for `ObjA`
|
| |___^ the trait `juniper::FromInputValue` is not implemented for `ObjA`
|
||||||
|
|
|
|
||||||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
error[E0277]: the trait bound `Obj: juniper::ast::FromInputValue` is not satisfied
|
error[E0277]: the trait bound `Obj: juniper::FromInputValue` is not satisfied
|
||||||
--> $DIR/impl_argument_no_object.rs:8:1
|
--> $DIR/impl_argument_no_object.rs:8:1
|
||||||
|
|
|
|
||||||
8 | #[juniper::graphql_object]
|
8 | #[juniper::graphql_object]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `juniper::ast::FromInputValue` is not implemented for `Obj`
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `juniper::FromInputValue` 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 an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
error[E0277]: the trait bound `Test: juniper::types::marker::GraphQLObjectType<__S>` is not satisfied
|
error[E0277]: the trait bound `Test: juniper::marker::GraphQLObjectType<__S>` is not satisfied
|
||||||
--> $DIR/enum_non_object_variant.rs:9:10
|
--> $DIR/enum_non_object_variant.rs:9:10
|
||||||
|
|
|
|
||||||
9 | #[derive(GraphQLUnion)]
|
9 | #[derive(GraphQLUnion)]
|
||||||
| ^^^^^^^^^^^^ the trait `juniper::types::marker::GraphQLObjectType<__S>` is not implemented for `Test`
|
| ^^^^^^^^^^^^ the trait `juniper::marker::GraphQLObjectType<__S>` is not implemented for `Test`
|
||||||
|
|
|
|
||||||
= note: required by `juniper::types::marker::GraphQLObjectType::mark`
|
= 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 a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
error[E0119]: conflicting implementations of trait `<Character as juniper::types::marker::GraphQLUnion<__S>>::mark::_::{{closure}}#0::MutuallyExclusive` for type `std::string::String`:
|
error[E0119]: conflicting implementations of trait `<Character as juniper::GraphQLUnion<__S>>::mark::_::{{closure}}#0::MutuallyExclusive` for type `std::string::String`:
|
||||||
--> $DIR/enum_same_type_ugly.rs:3:10
|
--> $DIR/enum_same_type_ugly.rs:3:10
|
||||||
|
|
|
|
||||||
3 | #[derive(GraphQLUnion)]
|
3 | #[derive(GraphQLUnion)]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
error[E0277]: the trait bound `Test: juniper::types::marker::GraphQLObjectType<__S>` is not satisfied
|
error[E0277]: the trait bound `Test: juniper::marker::GraphQLObjectType<__S>` is not satisfied
|
||||||
--> $DIR/struct_non_object_variant.rs:9:10
|
--> $DIR/struct_non_object_variant.rs:9:10
|
||||||
|
|
|
|
||||||
9 | #[derive(GraphQLUnion)]
|
9 | #[derive(GraphQLUnion)]
|
||||||
| ^^^^^^^^^^^^ the trait `juniper::types::marker::GraphQLObjectType<__S>` is not implemented for `Test`
|
| ^^^^^^^^^^^^ the trait `juniper::marker::GraphQLObjectType<__S>` is not implemented for `Test`
|
||||||
|
|
|
|
||||||
= note: required by `juniper::types::marker::GraphQLObjectType::mark`
|
= 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 a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
error[E0119]: conflicting implementations of trait `<Character as juniper::types::marker::GraphQLUnion<__S>>::mark::_::{{closure}}#0::MutuallyExclusive` for type `std::string::String`:
|
error[E0119]: conflicting implementations of trait `<Character as juniper::GraphQLUnion<__S>>::mark::_::{{closure}}#0::MutuallyExclusive` for type `std::string::String`:
|
||||||
--> $DIR/struct_same_type_ugly.rs:3:10
|
--> $DIR/struct_same_type_ugly.rs:3:10
|
||||||
|
|
|
|
||||||
3 | #[derive(GraphQLUnion)]
|
3 | #[derive(GraphQLUnion)]
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
error[E0277]: the trait bound `CustomContext: juniper::executor::FromContext<SubContext>` is not satisfied
|
error[E0277]: the trait bound `CustomContext: juniper::FromContext<SubContext>` is not satisfied
|
||||||
--> $DIR/trait_fail_infer_context.rs:3:1
|
--> $DIR/trait_fail_infer_context.rs:3:1
|
||||||
|
|
|
|
||||||
3 | #[graphql_union]
|
3 | #[graphql_union]
|
||||||
| ^^^^^^^^^^^^^^^^ the trait `juniper::executor::FromContext<SubContext>` is not implemented for `CustomContext`
|
| ^^^^^^^^^^^^^^^^ the trait `juniper::FromContext<SubContext>` is not implemented for `CustomContext`
|
||||||
|
|
|
|
||||||
= note: required by `juniper::executor::FromContext::from`
|
= 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 an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
|
|
||||||
error[E0308]: mismatched types
|
error[E0308]: mismatched types
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
error[E0277]: the trait bound `Test: juniper::types::marker::GraphQLObjectType<__S>` is not satisfied
|
error[E0277]: the trait bound `Test: juniper::marker::GraphQLObjectType<__S>` is not satisfied
|
||||||
--> $DIR/trait_non_object_variant.rs:9:1
|
--> $DIR/trait_non_object_variant.rs:9:1
|
||||||
|
|
|
|
||||||
9 | #[graphql_union]
|
9 | #[graphql_union]
|
||||||
| ^^^^^^^^^^^^^^^^ the trait `juniper::types::marker::GraphQLObjectType<__S>` is not implemented for `Test`
|
| ^^^^^^^^^^^^^^^^ the trait `juniper::marker::GraphQLObjectType<__S>` is not implemented for `Test`
|
||||||
|
|
|
|
||||||
= note: required by `juniper::types::marker::GraphQLObjectType::mark`
|
= 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 an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
error[E0119]: conflicting implementations of trait `<(dyn Character + std::marker::Send + std::marker::Sync + '__obj) as juniper::types::marker::GraphQLUnion<__S>>::mark::_::{{closure}}#0::MutuallyExclusive` for type `std::string::String`:
|
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
|
--> $DIR/trait_same_type_ugly.rs:3:1
|
||||||
|
|
|
|
||||||
3 | #[graphql_union]
|
3 | #[graphql_union]
|
||||||
|
|
1
juniper/src/tests/fixtures/mod.rs
vendored
1
juniper/src/tests/fixtures/mod.rs
vendored
|
@ -1,3 +1,4 @@
|
||||||
//! Library fixtures
|
//! Library fixtures
|
||||||
|
|
||||||
|
/// GraphQL schema and data from Star Wars.
|
||||||
pub mod starwars;
|
pub mod starwars;
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#![allow(missing_docs)]
|
||||||
|
|
||||||
/// The schema as a static/hardcoded GraphQL Schema Language.
|
/// The schema as a static/hardcoded GraphQL Schema Language.
|
||||||
pub const STATIC_GRAPHQL_SCHEMA_DEFINITION: &str = include_str!("starwars.graphql");
|
pub const STATIC_GRAPHQL_SCHEMA_DEFINITION: &str = include_str!("starwars.graphql");
|
||||||
|
|
||||||
|
|
|
@ -141,8 +141,8 @@ impl GraphQLResponse {
|
||||||
/// # use rocket::response::content;
|
/// # use rocket::response::content;
|
||||||
/// # use rocket::State;
|
/// # use rocket::State;
|
||||||
/// #
|
/// #
|
||||||
/// # use juniper::tests::schema::Query;
|
/// # use juniper::tests::fixtures::starwars::schema::Query;
|
||||||
/// # use juniper::tests::model::Database;
|
/// # use juniper::tests::fixtures::starwars::model::Database;
|
||||||
/// # use juniper::{EmptyMutation, EmptySubscription, FieldError, RootNode, Value};
|
/// # use juniper::{EmptyMutation, EmptySubscription, FieldError, RootNode, Value};
|
||||||
/// #
|
/// #
|
||||||
/// # type Schema = RootNode<'static, Query, EmptyMutation<Database>, EmptySubscription<Database>>;
|
/// # type Schema = RootNode<'static, Query, EmptyMutation<Database>, EmptySubscription<Database>>;
|
||||||
|
|
|
@ -164,8 +164,8 @@ impl GraphQLResponse {
|
||||||
/// # use rocket::response::content;
|
/// # use rocket::response::content;
|
||||||
/// # use rocket::State;
|
/// # use rocket::State;
|
||||||
/// #
|
/// #
|
||||||
/// # use juniper::tests::schema::Query;
|
/// # use juniper::tests::fixtures::starwars::schema::Query;
|
||||||
/// # use juniper::tests::model::Database;
|
/// # use juniper::tests::fixtures::starwars::model::Database;
|
||||||
/// # use juniper::{EmptyMutation, EmptySubscription, FieldError, RootNode, Value};
|
/// # use juniper::{EmptyMutation, EmptySubscription, FieldError, RootNode, Value};
|
||||||
/// #
|
/// #
|
||||||
/// # type Schema = RootNode<'static, Query, EmptyMutation<Database>, EmptySubscription<Database>>;
|
/// # type Schema = RootNode<'static, Query, EmptyMutation<Database>, EmptySubscription<Database>>;
|
||||||
|
|
Loading…
Reference in a new issue