show error offsets in tests
This commit is contained in:
parent
7a1cae59ac
commit
2e722ec54b
@ -76,7 +76,7 @@ impl Parse {
|
||||
pub fn debug_dump(&self) -> String {
|
||||
let mut buf = self.tree.syntax().debug_dump();
|
||||
for err in self.errors.iter() {
|
||||
writeln!(buf, "err: `{}`", err).unwrap();
|
||||
writeln!(buf, "error {:?}: {}", err.location(), err.kind()).unwrap();
|
||||
}
|
||||
buf
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ pub struct SyntaxError {
|
||||
location: Location,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
|
||||
#[derive(Clone, PartialEq, Eq, Hash)]
|
||||
pub enum Location {
|
||||
Offset(TextUnit),
|
||||
Range(TextRange),
|
||||
@ -31,6 +31,15 @@ impl Into<Location> for TextRange {
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Debug for Location {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
match self {
|
||||
Location::Offset(it) => fmt::Debug::fmt(it, f),
|
||||
Location::Range(it) => fmt::Debug::fmt(it, f),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl SyntaxError {
|
||||
pub fn new<L: Into<Location>>(kind: SyntaxErrorKind, loc: L) -> SyntaxError {
|
||||
SyntaxError { kind, location: loc.into() }
|
||||
|
@ -31,4 +31,4 @@ SOURCE_FILE@[0; 34)
|
||||
IDENT@[29; 32) "u32"
|
||||
WHITESPACE@[32; 33) "\n"
|
||||
R_CURLY@[33; 34) "}"
|
||||
err: `expected COMMA`
|
||||
error 21: expected COMMA
|
||||
|
@ -14,5 +14,5 @@ SOURCE_FILE@[0; 21)
|
||||
NAMED_FIELD_DEF_LIST@[19; 21)
|
||||
L_CURLY@[19; 20) "{"
|
||||
R_CURLY@[20; 21) "}"
|
||||
err: `expected an item`
|
||||
err: `expected an item`
|
||||
error 0: expected an item
|
||||
error 3: expected an item
|
||||
|
@ -4,4 +4,4 @@ SOURCE_FILE@[0; 42)
|
||||
ERROR@[21; 41)
|
||||
SHEBANG@[21; 41) "#!/use/bin/env rusti"
|
||||
WHITESPACE@[41; 42) "\n"
|
||||
err: `expected an item`
|
||||
error 21: expected an item
|
||||
|
@ -35,5 +35,5 @@ SOURCE_FILE@[0; 40)
|
||||
R_CURLY@[38; 39) "}"
|
||||
ERROR@[39; 40)
|
||||
SEMI@[39; 40) ";"
|
||||
err: `expected item, found `;`
|
||||
consider removing this semicolon`
|
||||
error 39: expected item, found `;`
|
||||
consider removing this semicolon
|
||||
|
@ -13,4 +13,4 @@ SOURCE_FILE@[0; 12)
|
||||
ERROR@[9; 11)
|
||||
INT_NUMBER@[9; 11) "92"
|
||||
SEMI@[11; 12) ";"
|
||||
err: `expected identifier`
|
||||
error 9: expected identifier
|
||||
|
@ -50,6 +50,6 @@ SOURCE_FILE@[0; 54)
|
||||
WHITESPACE@[51; 52) "\n"
|
||||
R_CURLY@[52; 53) "}"
|
||||
WHITESPACE@[53; 54) "\n"
|
||||
err: `expected R_PAREN`
|
||||
err: `expected R_BRACK`
|
||||
err: `expected an item`
|
||||
error 53: expected R_PAREN
|
||||
error 53: expected R_BRACK
|
||||
error 53: expected an item
|
||||
|
@ -64,11 +64,11 @@ SOURCE_FILE@[0; 74)
|
||||
WHITESPACE@[71; 72) "\n"
|
||||
R_CURLY@[72; 73) "}"
|
||||
WHITESPACE@[73; 74) "\n"
|
||||
err: `expected field declaration`
|
||||
err: `expected COMMA`
|
||||
err: `expected field declaration`
|
||||
err: `expected COMMA`
|
||||
err: `expected field declaration`
|
||||
err: `expected COMMA`
|
||||
err: `expected field declaration`
|
||||
err: `expected COMMA`
|
||||
error 31: expected field declaration
|
||||
error 33: expected COMMA
|
||||
error 38: expected field declaration
|
||||
error 39: expected COMMA
|
||||
error 40: expected field declaration
|
||||
error 41: expected COMMA
|
||||
error 42: expected field declaration
|
||||
error 43: expected COMMA
|
||||
|
@ -27,6 +27,6 @@ SOURCE_FILE@[0; 31)
|
||||
ERROR@[29; 30)
|
||||
R_CURLY@[29; 30) "}"
|
||||
WHITESPACE@[30; 31) "\n"
|
||||
err: `unmatched `}``
|
||||
err: `unmatched `}``
|
||||
err: `unmatched `}``
|
||||
error 0: unmatched `}`
|
||||
error 14: unmatched `}`
|
||||
error 29: unmatched `}`
|
||||
|
@ -72,6 +72,6 @@ SOURCE_FILE@[0; 95)
|
||||
WHITESPACE@[92; 93) "\n"
|
||||
R_CURLY@[93; 94) "}"
|
||||
WHITESPACE@[94; 95) "\n"
|
||||
err: `expected EXCL`
|
||||
err: `expected SEMI`
|
||||
err: `expected an item`
|
||||
error 17: expected EXCL
|
||||
error 19: expected SEMI
|
||||
error 20: expected an item
|
||||
|
@ -45,14 +45,14 @@ SOURCE_FILE@[0; 43)
|
||||
IDENT@[40; 41) "T"
|
||||
SEMI@[41; 42) ";"
|
||||
WHITESPACE@[42; 43) "\n"
|
||||
err: `expected type parameter`
|
||||
err: `expected COMMA`
|
||||
err: `expected R_ANGLE`
|
||||
err: `expected `;`, `{`, or `(``
|
||||
err: `expected an item`
|
||||
err: `expected an item`
|
||||
err: `expected an item`
|
||||
err: `expected an item`
|
||||
err: `expected SEMI`
|
||||
err: `expected expression`
|
||||
err: `expected SEMI`
|
||||
error 9: expected type parameter
|
||||
error 11: expected COMMA
|
||||
error 11: expected R_ANGLE
|
||||
error 11: expected `;`, `{`, or `(`
|
||||
error 12: expected an item
|
||||
error 14: expected an item
|
||||
error 15: expected an item
|
||||
error 17: expected an item
|
||||
error 24: expected SEMI
|
||||
error 24: expected expression
|
||||
error 25: expected SEMI
|
||||
|
@ -39,4 +39,4 @@ SOURCE_FILE@[0; 42)
|
||||
WHITESPACE@[39; 40) "\n"
|
||||
R_CURLY@[40; 41) "}"
|
||||
WHITESPACE@[41; 42) "\n"
|
||||
err: `expected `{``
|
||||
error 24: expected `{`
|
||||
|
@ -10,4 +10,4 @@ SOURCE_FILE@[0; 19)
|
||||
IDENT@[14; 17) "Foo"
|
||||
SEMI@[17; 18) ";"
|
||||
WHITESPACE@[18; 19) "\n"
|
||||
err: `expected fn, trait or impl`
|
||||
error 6: expected fn, trait or impl
|
||||
|
@ -69,21 +69,21 @@ SOURCE_FILE@[0; 86)
|
||||
ERROR@[83; 84)
|
||||
SEMI@[83; 84) ";"
|
||||
WHITESPACE@[84; 86) "\n\n"
|
||||
err: `expected type`
|
||||
err: `expected COMMA`
|
||||
err: `expected R_ANGLE`
|
||||
err: `expected COMMA`
|
||||
err: `expected R_ANGLE`
|
||||
err: `expected COMMA`
|
||||
err: `expected R_ANGLE`
|
||||
err: `expected COMMA`
|
||||
err: `expected COMMA`
|
||||
err: `expected a type`
|
||||
err: `expected R_PAREN`
|
||||
err: `expected SEMI`
|
||||
err: `expected an item`
|
||||
err: `expected an item`
|
||||
err: `expected an item`
|
||||
err: `expected an item`
|
||||
err: `expected an item`
|
||||
err: `expected an item`
|
||||
error 67: expected type
|
||||
error 68: expected COMMA
|
||||
error 68: expected R_ANGLE
|
||||
error 68: expected COMMA
|
||||
error 68: expected R_ANGLE
|
||||
error 68: expected COMMA
|
||||
error 68: expected R_ANGLE
|
||||
error 68: expected COMMA
|
||||
error 72: expected COMMA
|
||||
error 72: expected a type
|
||||
error 72: expected R_PAREN
|
||||
error 72: expected SEMI
|
||||
error 72: expected an item
|
||||
error 73: expected an item
|
||||
error 79: expected an item
|
||||
error 80: expected an item
|
||||
error 82: expected an item
|
||||
error 83: expected an item
|
||||
|
@ -28,4 +28,4 @@ SOURCE_FILE@[0; 23)
|
||||
L_CURLY@[20; 21) "{"
|
||||
R_CURLY@[21; 22) "}"
|
||||
WHITESPACE@[22; 23) "\n"
|
||||
err: `expected colon`
|
||||
error 19: expected colon
|
||||
|
@ -16,9 +16,9 @@ SOURCE_FILE@[0; 14)
|
||||
WHITESPACE@[11; 12) "\n"
|
||||
R_CURLY@[12; 13) "}"
|
||||
WHITESPACE@[13; 14) "\n"
|
||||
err: `expected value parameter`
|
||||
err: `expected R_PAREN`
|
||||
err: `expected a block`
|
||||
err: `unmatched `}``
|
||||
err: `expected an item`
|
||||
err: `expected an item`
|
||||
error 7: expected value parameter
|
||||
error 7: expected R_PAREN
|
||||
error 7: expected a block
|
||||
error 7: unmatched `}`
|
||||
error 8: expected an item
|
||||
error 10: expected an item
|
||||
|
@ -40,4 +40,4 @@ SOURCE_FILE@[0; 56)
|
||||
WHITESPACE@[53; 54) "\n"
|
||||
R_CURLY@[54; 55) "}"
|
||||
WHITESPACE@[55; 56) "\n"
|
||||
err: `expected SEMI`
|
||||
error 38: expected SEMI
|
||||
|
@ -43,4 +43,4 @@ SOURCE_FILE@[0; 47)
|
||||
WHITESPACE@[44; 45) "\n"
|
||||
R_CURLY@[45; 46) "}"
|
||||
WHITESPACE@[46; 47) "\n"
|
||||
err: `expected expression`
|
||||
error 44: expected expression
|
||||
|
@ -124,8 +124,8 @@ SOURCE_FILE@[0; 183)
|
||||
WHITESPACE@[180; 181) "\n"
|
||||
R_CURLY@[181; 182) "}"
|
||||
WHITESPACE@[182; 183) "\n"
|
||||
err: `expected pattern`
|
||||
err: `expected COLON`
|
||||
err: `expected type`
|
||||
err: `expected function arguments`
|
||||
err: `expected a block`
|
||||
error 34: expected pattern
|
||||
error 34: expected COLON
|
||||
error 34: expected type
|
||||
error 180: expected function arguments
|
||||
error 180: expected a block
|
||||
|
@ -91,13 +91,13 @@ SOURCE_FILE@[0; 139)
|
||||
WHITESPACE@[136; 137) "\n"
|
||||
R_CURLY@[137; 138) "}"
|
||||
WHITESPACE@[138; 139) "\n"
|
||||
err: `expected expression`
|
||||
err: `expected SEMI`
|
||||
err: `expected pattern`
|
||||
err: `expected SEMI`
|
||||
err: `expected pattern`
|
||||
err: `expected SEMI`
|
||||
err: `expected pattern`
|
||||
err: `expected SEMI`
|
||||
err: `expected pattern`
|
||||
err: `expected SEMI`
|
||||
error 24: expected expression
|
||||
error 24: expected SEMI
|
||||
error 49: expected pattern
|
||||
error 49: expected SEMI
|
||||
error 75: expected pattern
|
||||
error 75: expected SEMI
|
||||
error 98: expected pattern
|
||||
error 98: expected SEMI
|
||||
error 124: expected pattern
|
||||
error 124: expected SEMI
|
||||
|
@ -15,6 +15,6 @@ SOURCE_FILE@[0; 16)
|
||||
L_CURLY@[13; 14) "{"
|
||||
R_CURLY@[14; 15) "}"
|
||||
WHITESPACE@[15; 16) "\n"
|
||||
err: `expected a name`
|
||||
err: `expected function arguments`
|
||||
err: `expected a block`
|
||||
error 2: expected a name
|
||||
error 2: expected function arguments
|
||||
error 2: expected a block
|
||||
|
@ -30,5 +30,5 @@ SOURCE_FILE@[0; 22)
|
||||
WHITESPACE@[19; 20) "\n"
|
||||
R_CURLY@[20; 21) "}"
|
||||
WHITESPACE@[21; 22) "\n"
|
||||
err: `expected COLON`
|
||||
err: `expected type`
|
||||
error 16: expected COLON
|
||||
error 16: expected type
|
||||
|
@ -148,42 +148,42 @@ SOURCE_FILE@[0; 112)
|
||||
WHITESPACE@[109; 110) " "
|
||||
R_CURLY@[110; 111) "}"
|
||||
WHITESPACE@[111; 112) "\n"
|
||||
err: `expected expression`
|
||||
err: `expected R_BRACK`
|
||||
err: `expected SEMI`
|
||||
err: `expected expression`
|
||||
err: `expected SEMI`
|
||||
err: `expected expression`
|
||||
err: `expected SEMI`
|
||||
err: `expected a name`
|
||||
err: `expected `;`, `{`, or `(``
|
||||
err: `expected pattern`
|
||||
err: `expected SEMI`
|
||||
err: `expected expression`
|
||||
err: `expected SEMI`
|
||||
err: `expected expression`
|
||||
err: `expected SEMI`
|
||||
err: `expected expression`
|
||||
err: `expected SEMI`
|
||||
err: `expected type`
|
||||
err: `expected `{``
|
||||
err: `expected expression`
|
||||
err: `expected SEMI`
|
||||
err: `expected pattern`
|
||||
err: `expected SEMI`
|
||||
err: `expected expression`
|
||||
err: `expected expression`
|
||||
err: `expected SEMI`
|
||||
err: `expected expression`
|
||||
err: `expected SEMI`
|
||||
err: `expected expression`
|
||||
err: `expected SEMI`
|
||||
err: `expected expression`
|
||||
err: `expected SEMI`
|
||||
err: `expected expression`
|
||||
err: `expected SEMI`
|
||||
err: `expected a name`
|
||||
err: `expected `{``
|
||||
err: `expected pattern`
|
||||
err: `expected SEMI`
|
||||
err: `expected expression`
|
||||
error 15: expected expression
|
||||
error 15: expected R_BRACK
|
||||
error 15: expected SEMI
|
||||
error 16: expected expression
|
||||
error 17: expected SEMI
|
||||
error 17: expected expression
|
||||
error 18: expected SEMI
|
||||
error 25: expected a name
|
||||
error 26: expected `;`, `{`, or `(`
|
||||
error 30: expected pattern
|
||||
error 31: expected SEMI
|
||||
error 52: expected expression
|
||||
error 52: expected SEMI
|
||||
error 53: expected expression
|
||||
error 54: expected SEMI
|
||||
error 54: expected expression
|
||||
error 55: expected SEMI
|
||||
error 60: expected type
|
||||
error 60: expected `{`
|
||||
error 60: expected expression
|
||||
error 61: expected SEMI
|
||||
error 65: expected pattern
|
||||
error 65: expected SEMI
|
||||
error 65: expected expression
|
||||
error 91: expected expression
|
||||
error 91: expected SEMI
|
||||
error 92: expected expression
|
||||
error 93: expected SEMI
|
||||
error 93: expected expression
|
||||
error 94: expected SEMI
|
||||
error 95: expected expression
|
||||
error 96: expected SEMI
|
||||
error 96: expected expression
|
||||
error 97: expected SEMI
|
||||
error 103: expected a name
|
||||
error 104: expected `{`
|
||||
error 108: expected pattern
|
||||
error 108: expected SEMI
|
||||
error 108: expected expression
|
||||
|
@ -39,5 +39,5 @@ SOURCE_FILE@[0; 94)
|
||||
ERROR@[92; 93)
|
||||
R_CURLY@[92; 93) "}"
|
||||
WHITESPACE@[93; 94) "\n"
|
||||
err: `unmatched `}``
|
||||
err: `unmatched `}``
|
||||
error 49: unmatched `}`
|
||||
error 92: unmatched `}`
|
||||
|
@ -291,34 +291,34 @@ SOURCE_FILE@[0; 240)
|
||||
WHITESPACE@[237; 238) "\n"
|
||||
R_CURLY@[238; 239) "}"
|
||||
WHITESPACE@[239; 240) "\n"
|
||||
err: `expected COMMA`
|
||||
err: `expected R_ANGLE`
|
||||
err: `expected SEMI`
|
||||
err: `expected expression`
|
||||
err: `expected type`
|
||||
err: `expected R_PAREN`
|
||||
err: `expected COMMA`
|
||||
err: `expected R_ANGLE`
|
||||
err: `expected SEMI`
|
||||
err: `expected SEMI`
|
||||
err: `expected expression`
|
||||
err: `expected SEMI`
|
||||
err: `expected expression`
|
||||
err: `expected SEMI`
|
||||
err: `expected expression`
|
||||
err: `expected R_PAREN`
|
||||
err: `expected SEMI`
|
||||
err: `expected pattern`
|
||||
err: `expected IN_KW`
|
||||
err: `expected expression`
|
||||
err: `expected a block`
|
||||
err: `expected expression`
|
||||
err: `expected SEMI`
|
||||
err: `expected expression`
|
||||
err: `expected expression`
|
||||
err: `expected expression`
|
||||
err: `expected SEMI`
|
||||
err: `expected COMMA`
|
||||
err: `expected R_ANGLE`
|
||||
err: `expected SEMI`
|
||||
err: `expected expression`
|
||||
error 88: expected COMMA
|
||||
error 88: expected R_ANGLE
|
||||
error 121: expected SEMI
|
||||
error 121: expected expression
|
||||
error 140: expected type
|
||||
error 141: expected R_PAREN
|
||||
error 141: expected COMMA
|
||||
error 141: expected R_ANGLE
|
||||
error 141: expected SEMI
|
||||
error 146: expected SEMI
|
||||
error 146: expected expression
|
||||
error 147: expected SEMI
|
||||
error 148: expected expression
|
||||
error 149: expected SEMI
|
||||
error 151: expected expression
|
||||
error 151: expected R_PAREN
|
||||
error 151: expected SEMI
|
||||
error 154: expected pattern
|
||||
error 155: expected IN_KW
|
||||
error 155: expected expression
|
||||
error 157: expected a block
|
||||
error 157: expected expression
|
||||
error 158: expected SEMI
|
||||
error 165: expected expression
|
||||
error 168: expected expression
|
||||
error 179: expected expression
|
||||
error 180: expected SEMI
|
||||
error 215: expected COMMA
|
||||
error 215: expected R_ANGLE
|
||||
error 235: expected SEMI
|
||||
error 235: expected expression
|
||||
|
@ -190,14 +190,14 @@ SOURCE_FILE@[0; 575)
|
||||
WHITESPACE@[572; 573) "\n"
|
||||
R_CURLY@[573; 574) "}"
|
||||
WHITESPACE@[574; 575) "\n"
|
||||
err: `expected type`
|
||||
err: `expected COMMA`
|
||||
err: `expected field`
|
||||
err: `expected field declaration`
|
||||
err: `expected COMMA`
|
||||
err: `expected a type`
|
||||
err: `expected R_PAREN`
|
||||
err: `expected COMMA`
|
||||
err: `expected enum variant`
|
||||
err: `expected enum variant`
|
||||
err: `expected expression`
|
||||
error 95: expected type
|
||||
error 95: expected COMMA
|
||||
error 96: expected field
|
||||
error 98: expected field declaration
|
||||
error 371: expected COMMA
|
||||
error 372: expected a type
|
||||
error 372: expected R_PAREN
|
||||
error 372: expected COMMA
|
||||
error 372: expected enum variant
|
||||
error 374: expected enum variant
|
||||
error 508: expected expression
|
||||
|
@ -45,5 +45,5 @@ SOURCE_FILE@[0; 38)
|
||||
L_CURLY@[35; 36) "{"
|
||||
R_CURLY@[36; 37) "}"
|
||||
WHITESPACE@[37; 38) "\n"
|
||||
err: `expected trait or type`
|
||||
err: `expected `{``
|
||||
error 14: expected trait or type
|
||||
error 14: expected `{`
|
||||
|
@ -24,5 +24,5 @@ SOURCE_FILE@[0; 30)
|
||||
L_CURLY@[27; 28) "{"
|
||||
R_CURLY@[28; 29) "}"
|
||||
WHITESPACE@[29; 30) "\n"
|
||||
err: `expected a path`
|
||||
err: `expected colon`
|
||||
error 26: expected a path
|
||||
error 26: expected colon
|
||||
|
@ -256,70 +256,70 @@ SOURCE_FILE@[0; 349)
|
||||
WHITESPACE@[346; 347) "\n"
|
||||
R_CURLY@[347; 348) "}"
|
||||
WHITESPACE@[348; 349) "\n"
|
||||
err: `expected EXCL`
|
||||
err: `expected SEMI`
|
||||
err: `expected an item`
|
||||
err: `expected SEMI`
|
||||
err: `expected expression`
|
||||
err: `expected COMMA`
|
||||
err: `expected expression`
|
||||
err: `expected R_PAREN`
|
||||
err: `expected COMMA`
|
||||
err: `expected expression`
|
||||
err: `expected R_BRACK`
|
||||
err: `expected COMMA`
|
||||
err: `expected SEMI`
|
||||
err: `expected expression`
|
||||
err: `expected SEMI`
|
||||
err: `expected SEMI`
|
||||
err: `expected expression`
|
||||
err: `expected SEMI`
|
||||
err: `expected SEMI`
|
||||
err: `expected expression`
|
||||
err: `expected SEMI`
|
||||
err: `expected expression`
|
||||
err: `expected SEMI`
|
||||
err: `expected expression`
|
||||
err: `expected SEMI`
|
||||
err: `expected expression`
|
||||
err: `expected R_PAREN`
|
||||
err: `expected SEMI`
|
||||
err: `expected expression`
|
||||
err: `expected SEMI`
|
||||
err: `expected expression`
|
||||
err: `expected SEMI`
|
||||
err: `expected expression`
|
||||
err: `expected SEMI`
|
||||
err: `expected expression`
|
||||
err: `expected SEMI`
|
||||
err: `expected expression`
|
||||
err: `expected COMMA`
|
||||
err: `expected expression`
|
||||
err: `expected R_PAREN`
|
||||
err: `expected COMMA`
|
||||
err: `expected expression`
|
||||
err: `expected R_BRACK`
|
||||
err: `expected SEMI`
|
||||
err: `expected expression`
|
||||
err: `expected SEMI`
|
||||
err: `expected SEMI`
|
||||
err: `expected expression`
|
||||
err: `expected SEMI`
|
||||
err: `expected SEMI`
|
||||
err: `expected expression`
|
||||
err: `expected SEMI`
|
||||
err: `expected expression`
|
||||
err: `expected SEMI`
|
||||
err: `expected expression`
|
||||
err: `expected SEMI`
|
||||
err: `expected expression`
|
||||
err: `expected R_PAREN`
|
||||
err: `expected SEMI`
|
||||
err: `expected expression`
|
||||
err: `expected SEMI`
|
||||
err: `expected expression`
|
||||
err: `expected SEMI`
|
||||
err: `expected expression`
|
||||
err: `expected SEMI`
|
||||
err: `expected expression`
|
||||
err: `expected SEMI`
|
||||
error 5: expected EXCL
|
||||
error 41: expected SEMI
|
||||
error 42: expected an item
|
||||
error 139: expected SEMI
|
||||
error 152: expected expression
|
||||
error 153: expected COMMA
|
||||
error 154: expected expression
|
||||
error 154: expected R_PAREN
|
||||
error 154: expected COMMA
|
||||
error 154: expected expression
|
||||
error 154: expected R_BRACK
|
||||
error 154: expected COMMA
|
||||
error 154: expected SEMI
|
||||
error 154: expected expression
|
||||
error 155: expected SEMI
|
||||
error 160: expected SEMI
|
||||
error 160: expected expression
|
||||
error 161: expected SEMI
|
||||
error 165: expected SEMI
|
||||
error 165: expected expression
|
||||
error 166: expected SEMI
|
||||
error 166: expected expression
|
||||
error 167: expected SEMI
|
||||
error 169: expected expression
|
||||
error 170: expected SEMI
|
||||
error 171: expected expression
|
||||
error 171: expected R_PAREN
|
||||
error 171: expected SEMI
|
||||
error 171: expected expression
|
||||
error 172: expected SEMI
|
||||
error 172: expected expression
|
||||
error 173: expected SEMI
|
||||
error 174: expected expression
|
||||
error 175: expected SEMI
|
||||
error 175: expected expression
|
||||
error 176: expected SEMI
|
||||
error 178: expected expression
|
||||
error 179: expected COMMA
|
||||
error 180: expected expression
|
||||
error 180: expected R_PAREN
|
||||
error 180: expected COMMA
|
||||
error 180: expected expression
|
||||
error 180: expected R_BRACK
|
||||
error 180: expected SEMI
|
||||
error 180: expected expression
|
||||
error 181: expected SEMI
|
||||
error 187: expected SEMI
|
||||
error 187: expected expression
|
||||
error 188: expected SEMI
|
||||
error 192: expected SEMI
|
||||
error 192: expected expression
|
||||
error 193: expected SEMI
|
||||
error 193: expected expression
|
||||
error 194: expected SEMI
|
||||
error 196: expected expression
|
||||
error 197: expected SEMI
|
||||
error 198: expected expression
|
||||
error 198: expected R_PAREN
|
||||
error 198: expected SEMI
|
||||
error 198: expected expression
|
||||
error 199: expected SEMI
|
||||
error 199: expected expression
|
||||
error 200: expected SEMI
|
||||
error 201: expected expression
|
||||
error 202: expected SEMI
|
||||
error 202: expected expression
|
||||
error 203: expected SEMI
|
||||
|
@ -32,4 +32,4 @@ SOURCE_FILE@[0; 24)
|
||||
WHITESPACE@[21; 22) "\n"
|
||||
R_CURLY@[22; 23) "}"
|
||||
WHITESPACE@[23; 24) "\n"
|
||||
err: `expected field name or number`
|
||||
error 21: expected field name or number
|
||||
|
@ -67,4 +67,4 @@ SOURCE_FILE@[0; 112)
|
||||
WHITESPACE@[109; 110) "\n"
|
||||
R_CURLY@[110; 111) "}"
|
||||
WHITESPACE@[111; 112) "\n"
|
||||
err: `expected SEMI`
|
||||
error 27: expected SEMI
|
||||
|
@ -108,7 +108,7 @@ SOURCE_FILE@[0; 350)
|
||||
WHITESPACE@[347; 348) "\n"
|
||||
R_CURLY@[348; 349) "}"
|
||||
WHITESPACE@[349; 350) "\n"
|
||||
err: `A block in this position cannot accept inner attributes`
|
||||
err: `A block in this position cannot accept inner attributes`
|
||||
err: `A block in this position cannot accept inner attributes`
|
||||
err: `A block in this position cannot accept inner attributes`
|
||||
error [39; 83): A block in this position cannot accept inner attributes
|
||||
error [152; 171): A block in this position cannot accept inner attributes
|
||||
error [180; 212): A block in this position cannot accept inner attributes
|
||||
error [283; 302): A block in this position cannot accept inner attributes
|
||||
|
@ -188,14 +188,14 @@ SOURCE_FILE@[0; 293)
|
||||
WHITESPACE@[290; 291) "\n"
|
||||
R_CURLY@[291; 292) "}"
|
||||
WHITESPACE@[292; 293) "\n"
|
||||
err: `expected `[``
|
||||
err: `expected pattern`
|
||||
err: `expected FAT_ARROW`
|
||||
err: `expected COMMA`
|
||||
err: `expected `[``
|
||||
err: `expected pattern`
|
||||
err: `expected FAT_ARROW`
|
||||
err: `expected `[``
|
||||
err: `expected pattern`
|
||||
err: `expected FAT_ARROW`
|
||||
err: `expected COMMA`
|
||||
error 52: expected `[`
|
||||
error 52: expected pattern
|
||||
error 53: expected FAT_ARROW
|
||||
error 78: expected COMMA
|
||||
error 161: expected `[`
|
||||
error 161: expected pattern
|
||||
error 162: expected FAT_ARROW
|
||||
error 232: expected `[`
|
||||
error 232: expected pattern
|
||||
error 233: expected FAT_ARROW
|
||||
error 250: expected COMMA
|
||||
|
@ -59,6 +59,6 @@ SOURCE_FILE@[0; 89)
|
||||
WHITESPACE@[86; 87) "\n"
|
||||
R_CURLY@[87; 88) "}"
|
||||
WHITESPACE@[88; 89) "\n"
|
||||
err: `expected pattern`
|
||||
err: `expected FAT_ARROW`
|
||||
err: `expected expression`
|
||||
error 80: expected pattern
|
||||
error 80: expected FAT_ARROW
|
||||
error 80: expected expression
|
||||
|
@ -20,8 +20,8 @@ SOURCE_FILE@[0; 18)
|
||||
ERROR@[16; 17)
|
||||
SEMI@[16; 17) ";"
|
||||
WHITESPACE@[17; 18) "\n"
|
||||
err: `expected `;` or `]``
|
||||
err: `expected SEMI`
|
||||
err: `expected an item`
|
||||
err: `expected an item`
|
||||
err: `expected an item`
|
||||
error 12: expected `;` or `]`
|
||||
error 12: expected SEMI
|
||||
error 13: expected an item
|
||||
error 15: expected an item
|
||||
error 16: expected an item
|
||||
|
@ -22,7 +22,7 @@ SOURCE_FILE@[0; 30)
|
||||
WHITESPACE@[27; 28) "\n"
|
||||
R_CURLY@[28; 29) "}"
|
||||
WHITESPACE@[29; 30) "\n"
|
||||
err: `expected a loop`
|
||||
err: `expected SEMI`
|
||||
err: `expected type`
|
||||
err: `expected `{``
|
||||
error 22: expected a loop
|
||||
error 22: expected SEMI
|
||||
error 27: expected type
|
||||
error 27: expected `{`
|
||||
|
@ -14,4 +14,4 @@ SOURCE_FILE@[0; 14)
|
||||
R_PAREN@[11; 12) ")"
|
||||
SEMI@[12; 13) ";"
|
||||
WHITESPACE@[13; 14) "\n"
|
||||
err: `expected mut or const in raw pointer type (use `*mut T` or `*const T` as appropriate)`
|
||||
error 10: expected mut or const in raw pointer type (use `*mut T` or `*const T` as appropriate)
|
||||
|
@ -73,7 +73,7 @@ SOURCE_FILE@[0; 87)
|
||||
L_CURLY@[84; 85) "{"
|
||||
R_CURLY@[85; 86) "}"
|
||||
WHITESPACE@[86; 87) "\n"
|
||||
err: `expected trait or type`
|
||||
err: `expected `{``
|
||||
err: `expected trait or type`
|
||||
err: `expected `{``
|
||||
error 38: expected trait or type
|
||||
error 38: expected `{`
|
||||
error 70: expected trait or type
|
||||
error 70: expected `{`
|
||||
|
@ -16,8 +16,8 @@ SOURCE_FILE@[0; 20)
|
||||
ERROR@[18; 19)
|
||||
SEMI@[18; 19) ";"
|
||||
WHITESPACE@[19; 20) "\n"
|
||||
err: `expected `fn``
|
||||
err: `expected SEMI`
|
||||
err: `expected an item`
|
||||
err: `expected an item`
|
||||
err: `expected an item`
|
||||
error 15: expected `fn`
|
||||
error 15: expected SEMI
|
||||
error 16: expected an item
|
||||
error 17: expected an item
|
||||
error 18: expected an item
|
||||
|
@ -31,5 +31,5 @@ SOURCE_FILE@[0; 33)
|
||||
L_CURLY@[30; 31) "{"
|
||||
R_CURLY@[31; 32) "}"
|
||||
WHITESPACE@[32; 33) "\n"
|
||||
err: `expected an item`
|
||||
err: `expected an item`
|
||||
error 11: expected an item
|
||||
error 18: expected an item
|
||||
|
@ -28,4 +28,4 @@ SOURCE_FILE@[0; 30)
|
||||
WHITESPACE@[27; 28) " "
|
||||
R_CURLY@[28; 29) "}"
|
||||
WHITESPACE@[29; 30) "\n"
|
||||
err: `expected SEMI`
|
||||
error 27: expected SEMI
|
||||
|
@ -22,4 +22,4 @@ SOURCE_FILE@[0; 21)
|
||||
WHITESPACE@[18; 19) " "
|
||||
R_CURLY@[19; 20) "}"
|
||||
WHITESPACE@[20; 21) "\n"
|
||||
err: `expected an item`
|
||||
error 14: expected an item
|
||||
|
@ -51,5 +51,5 @@ SOURCE_FILE@[0; 48)
|
||||
WHITESPACE@[45; 46) "\n"
|
||||
R_CURLY@[46; 47) "}"
|
||||
WHITESPACE@[47; 48) "\n"
|
||||
err: `attributes are not allowed on BIN_EXPR`
|
||||
err: `attributes are not allowed on IF_EXPR`
|
||||
error 24: attributes are not allowed on BIN_EXPR
|
||||
error 44: attributes are not allowed on IF_EXPR
|
||||
|
@ -46,6 +46,6 @@ SOURCE_FILE@[0; 47)
|
||||
WHITESPACE@[44; 45) "\n"
|
||||
R_CURLY@[45; 46) "}"
|
||||
WHITESPACE@[46; 47) "\n"
|
||||
err: `Tuple (struct) field access is only allowed through decimal integers with no underscores or suffix`
|
||||
err: `Tuple (struct) field access is only allowed through decimal integers with no underscores or suffix`
|
||||
err: `Tuple (struct) field access is only allowed through decimal integers with no underscores or suffix`
|
||||
error [17; 19): Tuple (struct) field access is only allowed through decimal integers with no underscores or suffix
|
||||
error [27; 31): Tuple (struct) field access is only allowed through decimal integers with no underscores or suffix
|
||||
error [39; 43): Tuple (struct) field access is only allowed through decimal integers with no underscores or suffix
|
||||
|
@ -35,5 +35,5 @@ SOURCE_FILE@[0; 50)
|
||||
L_CURLY@[47; 48) "{"
|
||||
R_CURLY@[48; 49) "}"
|
||||
WHITESPACE@[49; 50) "\n"
|
||||
err: `expected fn, trait or impl`
|
||||
err: `expected fn, trait or impl`
|
||||
error 5: expected fn, trait or impl
|
||||
error 31: expected fn, trait or impl
|
||||
|
Loading…
x
Reference in New Issue
Block a user