Resolve RFC 2565 related todos

This commit is contained in:
nWacky 2019-11-01 13:29:11 +03:00
parent ee9a82a817
commit bd3d289d59
No known key found for this signature in database
GPG key ID: 22EF2C62F6F79FD0

View file

@ -73,13 +73,12 @@ impl Root {
0 0
} }
// TODO: enable once [RFC 2565](https://github.com/rust-lang/rust/issues/60406) is implemented fn attr_arg_descr(#[doc = "The arg"] arg: i32) -> i32 { 0 }
// fn attr_arg_descr(#[doc = "The arg"] arg: i32) -> i32 { 0 } fn attr_arg_descr_collapse(
// fn attr_arg_descr_collapse( #[doc = "The arg"]
// #[doc = "The arg"] #[doc = "and more details"]
// #[doc = "and more details"] arg: i32,
// arg: i32, ) -> i32 { 0 }
// ) -> i32 { 0 }
#[graphql(arguments(arg(default = 123,),))] #[graphql(arguments(arg(default = 123,),))]
fn arg_with_default(arg: i32) -> i32 { fn arg_with_default(arg: i32) -> i32 {
@ -559,73 +558,71 @@ fn introspect_field_multi_args_descr_trailing_comma() {
}); });
} }
// TODO: enable once [RFC 2565](https://github.com/rust-lang/rust/issues/60406) is implemented #[test]
// #[test] fn introspect_field_attr_arg_descr() {
// fn introspect_field_attr_arg_descr() { run_args_info_query("attrArgDescr", |args| {
// run_args_info_query("attrArgDescr", |args| { assert_eq!(args.len(), 1);
// assert_eq!(args.len(), 1);
// assert!(args.contains(&Value::object( assert!(args.contains(&Value::object(
// vec![ vec![
// ("name", Value::scalar("arg")), ("name", Value::scalar("arg")),
// ("description", Value::scalar("The arg")), ("description", Value::scalar("The arg")),
// ("defaultValue", Value::null()), ("defaultValue", Value::null()),
// ( (
// "type", "type",
// Value::object( Value::object(
// vec![ vec![
// ("name", Value::null()), ("name", Value::null()),
// ( (
// "ofType", "ofType",
// Value::object( Value::object(
// vec![("name", Value::scalar("Int"))].into_iter().collect(), vec![("name", Value::scalar("Int"))].into_iter().collect(),
// ), ),
// ), ),
// ] ]
// .into_iter() .into_iter()
// .collect(), .collect(),
// ), ),
// ), ),
// ] ]
// .into_iter() .into_iter()
// .collect(), .collect(),
// ))); )));
// }); });
// } }
// TODO: enable once [RFC 2565](https://github.com/rust-lang/rust/issues/60406) is implemented #[test]
// #[test] fn introspect_field_attr_arg_descr_collapse() {
// fn introspect_field_attr_arg_descr_collapse() { run_args_info_query("attrArgDescrCollapse", |args| {
// run_args_info_query("attrArgDescrCollapse", |args| { assert_eq!(args.len(), 1);
// assert_eq!(args.len(), 1);
// assert!(args.contains(&Value::object( assert!(args.contains(&Value::object(
// vec![ vec![
// ("name", Value::scalar("arg")), ("name", Value::scalar("arg")),
// ("description", Value::scalar("The arg\nand more details")), ("description", Value::scalar("The arg\nand more details")),
// ("defaultValue", Value::null()), ("defaultValue", Value::null()),
// ( (
// "type", "type",
// Value::object( Value::object(
// vec![ vec![
// ("name", Value::null()), ("name", Value::null()),
// ( (
// "ofType", "ofType",
// Value::object( Value::object(
// vec![("name", Value::scalar("Int"))].into_iter().collect(), vec![("name", Value::scalar("Int"))].into_iter().collect(),
// ), ),
// ), ),
// ] ]
// .into_iter() .into_iter()
// .collect(), .collect(),
// ), ),
// ), ),
// ] ]
// .into_iter() .into_iter()
// .collect(), .collect(),
// ))); )));
// }); });
// } }
#[test] #[test]
fn introspect_field_arg_with_default() { fn introspect_field_arg_with_default() {