File tree Expand file tree Collapse file tree 3 files changed +31
-0
lines changed Expand file tree Collapse file tree 3 files changed +31
-0
lines changed Original file line number Diff line number Diff line change
1
+ // Local types overriding the stdlib Result should not affect generated code
2
+
3
+ type Result < T > = std:: result:: Result < T , ( ) > ;
4
+
5
+ #[ derive( juniper:: GraphQLInputObject ) ]
6
+ #[ graphql( name = "UserInformation" ) ]
7
+ pub struct Update {
8
+ pub email : Option < String > ,
9
+ pub username : Option < String > ,
10
+ }
11
+
12
+ pub fn main ( ) { }
Original file line number Diff line number Diff line change
1
+ // Local types overriding the stdlib Send should not affect generated code
2
+
3
+ trait Send { }
4
+
5
+ #[ derive( juniper:: GraphQLInputObject ) ]
6
+ #[ graphql( name = "UserInformation" ) ]
7
+ pub struct Update {
8
+ pub email : Option < String > ,
9
+ pub username : Option < String > ,
10
+ }
11
+
12
+ pub fn main ( ) { }
Original file line number Diff line number Diff line change @@ -7,3 +7,10 @@ fn test_failing_compilation() {
7
7
let t = trybuild:: TestCases :: new ( ) ;
8
8
t. compile_fail ( "fail/**/*.rs" ) ;
9
9
}
10
+
11
+ #[ rustversion:: nightly]
12
+ #[ test]
13
+ fn test_passing_compilation ( ) {
14
+ let t = trybuild:: TestCases :: new ( ) ;
15
+ t. pass ( "pass/**/*.rs" ) ;
16
+ }
You can’t perform that action at this time.
0 commit comments