diff options
author | Aleksey Kladov <[email protected]> | 2018-08-13 15:42:43 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-08-13 15:42:43 +0100 |
commit | d1eceefeb8b683da3f64b89446f04f01803962e1 (patch) | |
tree | b5e80856cadc70dbc5f9a8e2cbe6cbf751e5f716 /crates/libsyntax2/tests | |
parent | 5a56ac4b72e7f57fb20d49bcf531611f144cc0e0 (diff) |
dyn type
Diffstat (limited to 'crates/libsyntax2/tests')
-rw-r--r-- | crates/libsyntax2/tests/data/parser/err/0013_invalid_type.rs | 7 | ||||
-rw-r--r-- | crates/libsyntax2/tests/data/parser/err/0013_invalid_type.txt | 82 | ||||
-rw-r--r-- | crates/libsyntax2/tests/test/main.rs | 1 |
3 files changed, 90 insertions, 0 deletions
diff --git a/crates/libsyntax2/tests/data/parser/err/0013_invalid_type.rs b/crates/libsyntax2/tests/data/parser/err/0013_invalid_type.rs new file mode 100644 index 000000000..20dde3bc3 --- /dev/null +++ b/crates/libsyntax2/tests/data/parser/err/0013_invalid_type.rs | |||
@@ -0,0 +1,7 @@ | |||
1 | pub struct Cache( | ||
2 | RefCell<HashMap< | ||
3 | TypeId, | ||
4 | Box<@ Any>, | ||
5 | >> | ||
6 | ); | ||
7 | |||
diff --git a/crates/libsyntax2/tests/data/parser/err/0013_invalid_type.txt b/crates/libsyntax2/tests/data/parser/err/0013_invalid_type.txt new file mode 100644 index 000000000..8b56f699f --- /dev/null +++ b/crates/libsyntax2/tests/data/parser/err/0013_invalid_type.txt | |||
@@ -0,0 +1,82 @@ | |||
1 | FILE@[0; 86) | ||
2 | STRUCT@[0; 84) | ||
3 | VISIBILITY@[0; 3) | ||
4 | PUB_KW@[0; 3) | ||
5 | WHITESPACE@[3; 4) | ||
6 | STRUCT_KW@[4; 10) | ||
7 | WHITESPACE@[10; 11) | ||
8 | NAME@[11; 16) | ||
9 | IDENT@[11; 16) "Cache" | ||
10 | L_PAREN@[16; 17) | ||
11 | WHITESPACE@[17; 22) | ||
12 | POS_FIELD@[22; 68) | ||
13 | PATH_TYPE@[22; 68) | ||
14 | PATH@[22; 68) | ||
15 | PATH_SEGMENT@[22; 68) | ||
16 | NAME_REF@[22; 29) | ||
17 | IDENT@[22; 29) "RefCell" | ||
18 | TYPE_ARG_LIST@[29; 68) | ||
19 | L_ANGLE@[29; 30) | ||
20 | TYPE_ARG@[30; 68) | ||
21 | PATH_TYPE@[30; 68) | ||
22 | PATH@[30; 68) | ||
23 | PATH_SEGMENT@[30; 68) | ||
24 | NAME_REF@[30; 37) | ||
25 | IDENT@[30; 37) "HashMap" | ||
26 | TYPE_ARG_LIST@[37; 68) | ||
27 | L_ANGLE@[37; 38) | ||
28 | WHITESPACE@[38; 47) | ||
29 | TYPE_ARG@[47; 53) | ||
30 | PATH_TYPE@[47; 53) | ||
31 | PATH@[47; 53) | ||
32 | PATH_SEGMENT@[47; 53) | ||
33 | NAME_REF@[47; 53) | ||
34 | IDENT@[47; 53) "TypeId" | ||
35 | COMMA@[53; 54) | ||
36 | WHITESPACE@[54; 63) | ||
37 | TYPE_ARG@[63; 68) | ||
38 | PATH_TYPE@[63; 68) | ||
39 | PATH@[63; 68) | ||
40 | PATH_SEGMENT@[63; 68) | ||
41 | NAME_REF@[63; 66) | ||
42 | IDENT@[63; 66) "Box" | ||
43 | TYPE_ARG_LIST@[66; 68) | ||
44 | L_ANGLE@[66; 67) | ||
45 | err: `expected type` | ||
46 | TYPE_ARG@[67; 68) | ||
47 | ERROR@[67; 68) | ||
48 | AT@[67; 68) | ||
49 | err: `expected COMMA` | ||
50 | err: `expected R_ANGLE` | ||
51 | err: `expected COMMA` | ||
52 | err: `expected R_ANGLE` | ||
53 | err: `expected COMMA` | ||
54 | err: `expected R_ANGLE` | ||
55 | err: `expected COMMA` | ||
56 | WHITESPACE@[68; 69) | ||
57 | POS_FIELD@[69; 72) | ||
58 | PATH_TYPE@[69; 72) | ||
59 | PATH@[69; 72) | ||
60 | PATH_SEGMENT@[69; 72) | ||
61 | NAME_REF@[69; 72) | ||
62 | IDENT@[69; 72) "Any" | ||
63 | err: `expected COMMA` | ||
64 | err: `expected type` | ||
65 | POS_FIELD@[72; 73) | ||
66 | ERROR@[72; 73) | ||
67 | R_ANGLE@[72; 73) | ||
68 | COMMA@[73; 74) | ||
69 | WHITESPACE@[74; 79) | ||
70 | err: `expected type` | ||
71 | POS_FIELD@[79; 80) | ||
72 | ERROR@[79; 80) | ||
73 | R_ANGLE@[79; 80) | ||
74 | err: `expected COMMA` | ||
75 | err: `expected type` | ||
76 | POS_FIELD@[80; 81) | ||
77 | ERROR@[80; 81) | ||
78 | R_ANGLE@[80; 81) | ||
79 | WHITESPACE@[81; 82) | ||
80 | R_PAREN@[82; 83) | ||
81 | SEMI@[83; 84) | ||
82 | WHITESPACE@[84; 86) | ||
diff --git a/crates/libsyntax2/tests/test/main.rs b/crates/libsyntax2/tests/test/main.rs index 64d080dfd..6b0a44d0c 100644 --- a/crates/libsyntax2/tests/test/main.rs +++ b/crates/libsyntax2/tests/test/main.rs | |||
@@ -1,6 +1,7 @@ | |||
1 | extern crate libsyntax2; | 1 | extern crate libsyntax2; |
2 | #[macro_use] | 2 | #[macro_use] |
3 | extern crate assert_eq_text; | 3 | extern crate assert_eq_text; |
4 | extern crate walkdir; | ||
4 | 5 | ||
5 | use std::{ | 6 | use std::{ |
6 | fs, | 7 | fs, |