Fix unittests
This commit is contained in:
@@ -571,7 +571,7 @@ impl<'a> Parser<'a> {
|
|||||||
label_sp
|
label_sp
|
||||||
};
|
};
|
||||||
err.span_label(sp, &label_exp);
|
err.span_label(sp, &label_exp);
|
||||||
if label_sp != self.span {
|
if !sp.source_equal(&self.span) {
|
||||||
err.span_label(self.span, &"unexpected token");
|
err.span_label(self.span, &"unexpected token");
|
||||||
}
|
}
|
||||||
Err(err)
|
Err(err)
|
||||||
|
|||||||
@@ -81,8 +81,8 @@ impl Span {
|
|||||||
|
|
||||||
/// Returns a new span representing the next character after the end-point of this span
|
/// Returns a new span representing the next character after the end-point of this span
|
||||||
pub fn next_point(self) -> Span {
|
pub fn next_point(self) -> Span {
|
||||||
let lo = BytePos(cmp::max(self.hi.0, self.lo.0 + 1));
|
let lo = cmp::max(self.hi.0, self.lo.0 + 1);
|
||||||
Span { lo: lo, hi: lo, expn_id: self.expn_id}
|
Span { lo: BytePos(lo), hi: BytePos(lo + 1), expn_id: self.expn_id}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns `self` if `self` is not the dummy span, and `other` otherwise.
|
/// Returns `self` if `self` is not the dummy span, and `other` otherwise.
|
||||||
|
|||||||
@@ -5,3 +5,4 @@ error: expected one of `!` or `::`, found `<eof>`
|
|||||||
| ^^^^ expected one of `!` or `::` here
|
| ^^^^ expected one of `!` or `::` here
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|||||||
@@ -25,3 +25,4 @@ error: expected expression, found `)`
|
|||||||
error: main function not found
|
error: main function not found
|
||||||
|
|
||||||
error: aborting due to 4 previous errors
|
error: aborting due to 4 previous errors
|
||||||
|
|
||||||
|
|||||||
@@ -29,3 +29,4 @@ note: caused by the macro expansion here; the usage of `ignored_pat!` is likely
|
|||||||
| ^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: aborting due to 3 previous errors
|
error: aborting due to 3 previous errors
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
error: expected one of `!` or `::`, found `<eof>`
|
error: expected one of `!` or `::`, found `<eof>`
|
||||||
--> ../../src/test/ui/token/trailing-plus-in-bounds.rs:19:1
|
--> $DIR/trailing-plus-in-bounds.rs:19:1
|
||||||
|
|
|
|
||||||
19 | FAIL
|
19 | FAIL
|
||||||
| ^^^^ expected one of `!` or `::` here
|
| ^^^^ expected one of `!` or `::` here
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user