Skip to content

Commit b27fa33

Browse files
committed
updated snapshots
1 parent e175921 commit b27fa33

File tree

6 files changed

+44
-77
lines changed

6 files changed

+44
-77
lines changed

crates/ra_hir/src/ty/.tests.rs.pending-snap

-28
This file was deleted.

crates/ra_hir/src/ty/tests.rs

+41-41
Original file line numberDiff line numberDiff line change
@@ -697,58 +697,58 @@ fn test(x: &str, y: isize) {
697697
[9; 10) 'x': &str
698698
[18; 19) 'y': isize
699699
[28; 324) '{ ... 3]; }': ()
700-
[38; 39) 'a': [&str]
701-
[42; 45) '[x]': [&str]
700+
[38; 39) 'a': [&str;_]
701+
[42; 45) '[x]': [&str;_]
702702
[43; 44) 'x': &str
703-
[55; 56) 'b': [[&str]]
704-
[59; 65) '[a, a]': [[&str]]
705-
[60; 61) 'a': [&str]
706-
[63; 64) 'a': [&str]
707-
[75; 76) 'c': [[[&str]]]
708-
[79; 85) '[b, b]': [[[&str]]]
709-
[80; 81) 'b': [[&str]]
710-
[83; 84) 'b': [[&str]]
711-
[96; 97) 'd': [isize]
712-
[100; 112) '[y, 1, 2, 3]': [isize]
703+
[55; 56) 'b': [[&str;_];_]
704+
[59; 65) '[a, a]': [[&str;_];_]
705+
[60; 61) 'a': [&str;_]
706+
[63; 64) 'a': [&str;_]
707+
[75; 76) 'c': [[[&str;_];_];_]
708+
[79; 85) '[b, b]': [[[&str;_];_];_]
709+
[80; 81) 'b': [[&str;_];_]
710+
[83; 84) 'b': [[&str;_];_]
711+
[96; 97) 'd': [isize;_]
712+
[100; 112) '[y, 1, 2, 3]': [isize;_]
713713
[101; 102) 'y': isize
714714
[104; 105) '1': isize
715715
[107; 108) '2': isize
716716
[110; 111) '3': isize
717-
[122; 123) 'd': [isize]
718-
[126; 138) '[1, y, 2, 3]': [isize]
717+
[122; 123) 'd': [isize;_]
718+
[126; 138) '[1, y, 2, 3]': [isize;_]
719719
[127; 128) '1': isize
720720
[130; 131) 'y': isize
721721
[133; 134) '2': isize
722722
[136; 137) '3': isize
723-
[148; 149) 'e': [isize]
724-
[152; 155) '[y]': [isize]
723+
[148; 149) 'e': [isize;_]
724+
[152; 155) '[y]': [isize;_]
725725
[153; 154) 'y': isize
726-
[165; 166) 'f': [[isize]]
727-
[169; 175) '[d, d]': [[isize]]
728-
[170; 171) 'd': [isize]
729-
[173; 174) 'd': [isize]
730-
[185; 186) 'g': [[isize]]
731-
[189; 195) '[e, e]': [[isize]]
732-
[190; 191) 'e': [isize]
733-
[193; 194) 'e': [isize]
734-
[206; 207) 'h': [i32]
735-
[210; 216) '[1, 2]': [i32]
726+
[165; 166) 'f': [[isize;_];_]
727+
[169; 175) '[d, d]': [[isize;_];_]
728+
[170; 171) 'd': [isize;_]
729+
[173; 174) 'd': [isize;_]
730+
[185; 186) 'g': [[isize;_];_]
731+
[189; 195) '[e, e]': [[isize;_];_]
732+
[190; 191) 'e': [isize;_]
733+
[193; 194) 'e': [isize;_]
734+
[206; 207) 'h': [i32;_]
735+
[210; 216) '[1, 2]': [i32;_]
736736
[211; 212) '1': i32
737737
[214; 215) '2': i32
738-
[226; 227) 'i': [&str]
739-
[230; 240) '["a", "b"]': [&str]
738+
[226; 227) 'i': [&str;_]
739+
[230; 240) '["a", "b"]': [&str;_]
740740
[231; 234) '"a"': &str
741741
[236; 239) '"b"': &str
742-
[251; 252) 'b': [[&str]]
743-
[255; 265) '[a, ["b"]]': [[&str]]
744-
[256; 257) 'a': [&str]
745-
[259; 264) '["b"]': [&str]
742+
[251; 252) 'b': [[&str;_];_]
743+
[255; 265) '[a, ["b"]]': [[&str;_];_]
744+
[256; 257) 'a': [&str;_]
745+
[259; 264) '["b"]': [&str;_]
746746
[260; 263) '"b"': &str
747-
[275; 276) 'x': [u8]
748-
[288; 290) '[]': [u8]
749-
[300; 301) 'z': &[u8]
750-
[311; 321) '&[1, 2, 3]': &[u8]
751-
[312; 321) '[1, 2, 3]': [u8]
747+
[275; 276) 'x': [u8;_]
748+
[288; 290) '[]': [u8;_]
749+
[300; 301) 'z': &[u8;_]
750+
[311; 321) '&[1, 2, 3]': &[u8;_]
751+
[312; 321) '[1, 2, 3]': [u8;_]
752752
[313; 314) '1': u8
753753
[316; 317) '2': u8
754754
[319; 320) '3': u8"###
@@ -1553,7 +1553,7 @@ fn test() {
15531553
[11; 48) '{ ...&y]; }': ()
15541554
[21; 22) 'y': &{unknown}
15551555
[25; 32) 'unknown': &{unknown}
1556-
[38; 45) '[y, &y]': [&&{unknown}]
1556+
[38; 45) '[y, &y]': [&&{unknown};_]
15571557
[39; 40) 'y': &{unknown}
15581558
[42; 44) '&y': &&{unknown}
15591559
[43; 44) 'y': &{unknown}"###
@@ -1578,7 +1578,7 @@ fn test() {
15781578
[25; 32) 'unknown': &&{unknown}
15791579
[42; 43) 'y': &&{unknown}
15801580
[46; 53) 'unknown': &&{unknown}
1581-
[59; 77) '[(x, y..., &x)]': [(&&{unknown}, &&{unknown})]
1581+
[59; 77) '[(x, y..., &x)]': [(&&{unknown}, &&{unknown});_]
15821582
[60; 66) '(x, y)': (&&{unknown}, &&{unknown})
15831583
[61; 62) 'x': &&{unknown}
15841584
[64; 65) 'y': &&{unknown}
@@ -1670,8 +1670,8 @@ fn test_line_buffer() {
16701670
"#),
16711671
@r###"
16721672
[23; 53) '{ ...n']; }': ()
1673-
[29; 50) '&[0, b...b'\n']': &[u8]
1674-
[30; 50) '[0, b'...b'\n']': [u8]
1673+
[29; 50) '&[0, b...b'\n']': &[u8;_]
1674+
[30; 50) '[0, b'...b'\n']': [u8;_]
16751675
[31; 32) '0': u8
16761676
[34; 39) 'b'\n'': u8
16771677
[41; 42) '1': u8

crates/ra_syntax/src/ast.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pub use self::{
1717
generated::*,
1818
traits::*,
1919
tokens::*,
20-
extensions::{PathSegmentKind, StructKind, SelfParamKind},
20+
extensions::{PathSegmentKind, StructKind,FieldKind, SelfParamKind},
2121
expr_extensions::{ElseBranch, PrefixOp, BinOp, LiteralKind,ArrayExprKind},
2222
};
2323

crates/ra_syntax/src/ast/expr_extensions.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ impl ast::ArrayExpr {
203203
if self.is_repeat() {
204204
ArrayExprKind::Repeat {
205205
initializer: children(self).nth(0),
206-
repeat: children(self).nth(2),
206+
repeat: children(self).nth(1),
207207
}
208208
} else {
209209
ArrayExprKind::ElementList(children(self))

crates/ra_syntax/src/ast/generated.rs

-4
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,6 @@ impl ArrayExpr {
108108
pub fn exprs(&self) -> impl Iterator<Item = &Expr> {
109109
super::children(self)
110110
}
111-
112-
pub fn repeat(&self) -> Option<&Expr> {
113-
super::child_opt(self)
114-
}
115111
}
116112

117113
// ArrayType

crates/ra_syntax/src/grammar.ron

+1-2
Original file line numberDiff line numberDiff line change
@@ -395,8 +395,7 @@ Grammar(
395395
collections: [["exprs", "Expr"]]
396396
),
397397
"ArrayExpr": (
398-
collections: [["exprs", "Expr"]],
399-
options:[["repeat","Expr"]]
398+
collections: [["exprs", "Expr"]]
400399
),
401400
"ParenExpr": (options: ["Expr"]),
402401
"PathExpr": (options: ["Path"]),

0 commit comments

Comments
 (0)