Tweak wording
This commit is contained in:
parent
38fd5a9acf
commit
698ebe357f
14 changed files with 94 additions and 39 deletions
|
@ -2586,7 +2586,6 @@ impl<'a> Parser<'a> {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if let Some(span) = self.diff_marker(&TokenKind::EqEq, &TokenKind::Eq) {
|
if let Some(span) = self.diff_marker(&TokenKind::EqEq, &TokenKind::Eq) {
|
||||||
spans.push(span);
|
|
||||||
middle = Some(span);
|
middle = Some(span);
|
||||||
}
|
}
|
||||||
if let Some(span) = self.diff_marker(&TokenKind::BinOp(token::Shr), &TokenKind::Gt) {
|
if let Some(span) = self.diff_marker(&TokenKind::BinOp(token::Shr), &TokenKind::Gt) {
|
||||||
|
@ -2597,13 +2596,25 @@ impl<'a> Parser<'a> {
|
||||||
self.bump();
|
self.bump();
|
||||||
}
|
}
|
||||||
let mut err = self.struct_span_err(spans, "encountered diff marker");
|
let mut err = self.struct_span_err(spans, "encountered diff marker");
|
||||||
err.span_label(start, "start");
|
err.span_label(start, "after this is the code before the merge");
|
||||||
if let Some(middle) = middle {
|
if let Some(middle) = middle {
|
||||||
err.span_label(middle, "middle");
|
err.span_label(middle, "");
|
||||||
}
|
}
|
||||||
if let Some(end) = end {
|
if let Some(end) = end {
|
||||||
err.span_label(end, "end");
|
err.span_label(end, "above this are the incoming code changes");
|
||||||
}
|
}
|
||||||
|
err.help(
|
||||||
|
"if you're having merge conflicts after pulling new code, the top section is the code \
|
||||||
|
you already had and the bottom section is the remote code",
|
||||||
|
);
|
||||||
|
err.help(
|
||||||
|
"if you're in the middle of a rebase, the top section is the code being rebased onto \
|
||||||
|
and the bottom section is the code coming from the current commit being rebased",
|
||||||
|
);
|
||||||
|
err.note(
|
||||||
|
"for an explanation on these markers from the `git` documentation, visit \
|
||||||
|
<https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging#_checking_out_conflicts>",
|
||||||
|
);
|
||||||
err.emit();
|
err.emit();
|
||||||
FatalError.raise()
|
FatalError.raise()
|
||||||
}
|
}
|
||||||
|
|
|
@ -1583,7 +1583,7 @@ impl<'a> Parser<'a> {
|
||||||
p.collect_tokens_trailing_token(attrs, ForceCollect::No, |p, attrs| {
|
p.collect_tokens_trailing_token(attrs, ForceCollect::No, |p, attrs| {
|
||||||
let mut snapshot = None;
|
let mut snapshot = None;
|
||||||
if p.is_diff_marker(&TokenKind::BinOp(token::Shl), &TokenKind::Lt) {
|
if p.is_diff_marker(&TokenKind::BinOp(token::Shl), &TokenKind::Lt) {
|
||||||
// Account for `<<<<<<<` diff markers. We can't proactivelly error here because
|
// Account for `<<<<<<<` diff markers. We can't proactively error here because
|
||||||
// that can be a valid type start, so we snapshot and reparse only we've
|
// that can be a valid type start, so we snapshot and reparse only we've
|
||||||
// encountered another parse error.
|
// encountered another parse error.
|
||||||
snapshot = Some(p.create_snapshot_for_diagnostic());
|
snapshot = Some(p.create_snapshot_for_diagnostic());
|
||||||
|
|
|
@ -537,7 +537,7 @@ impl<'a> Parser<'a> {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if self.is_diff_marker(&TokenKind::BinOp(token::Shl), &TokenKind::Lt) {
|
if self.is_diff_marker(&TokenKind::BinOp(token::Shl), &TokenKind::Lt) {
|
||||||
// Account for `<<<<<<<` diff markers. We can't proactivelly error here because
|
// Account for `<<<<<<<` diff markers. We can't proactively error here because
|
||||||
// that can be a valid path start, so we snapshot and reparse only we've
|
// that can be a valid path start, so we snapshot and reparse only we've
|
||||||
// encountered another parse error.
|
// encountered another parse error.
|
||||||
snapshot = Some(self.create_snapshot_for_diagnostic());
|
snapshot = Some(self.create_snapshot_for_diagnostic());
|
||||||
|
|
|
@ -2,13 +2,17 @@ error: encountered diff marker
|
||||||
--> $DIR/enum-2.rs:3:1
|
--> $DIR/enum-2.rs:3:1
|
||||||
|
|
|
|
||||||
LL | <<<<<<< HEAD
|
LL | <<<<<<< HEAD
|
||||||
| ^^^^^^^ start
|
| ^^^^^^^ after this is the code before the merge
|
||||||
LL | x: u8,
|
LL | x: u8,
|
||||||
LL | =======
|
LL | =======
|
||||||
| ^^^^^^^ middle
|
| -------
|
||||||
LL | x: i8,
|
LL | x: i8,
|
||||||
LL | >>>>>>> branch
|
LL | >>>>>>> branch
|
||||||
| ^^^^^^^ end
|
| ^^^^^^^ above this are the incoming code changes
|
||||||
|
|
|
||||||
|
= help: if you're having merge conflicts after pulling new code, the top section is the code you already had and the bottom section is the remote code
|
||||||
|
= help: if you're in the middle of a rebase, the top section is the code being rebased onto and the bottom section is the code coming from the current commit being rebased
|
||||||
|
= note: for an explanation on these markers from the `git` documentation, visit <https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging#_checking_out_conflicts>
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|
|
@ -2,13 +2,17 @@ error: encountered diff marker
|
||||||
--> $DIR/enum.rs:2:1
|
--> $DIR/enum.rs:2:1
|
||||||
|
|
|
|
||||||
LL | <<<<<<< HEAD
|
LL | <<<<<<< HEAD
|
||||||
| ^^^^^^^ start
|
| ^^^^^^^ after this is the code before the merge
|
||||||
LL | Foo(u8),
|
LL | Foo(u8),
|
||||||
LL | =======
|
LL | =======
|
||||||
| ^^^^^^^ middle
|
| -------
|
||||||
LL | Bar(i8),
|
LL | Bar(i8),
|
||||||
LL | >>>>>>> branch
|
LL | >>>>>>> branch
|
||||||
| ^^^^^^^ end
|
| ^^^^^^^ above this are the incoming code changes
|
||||||
|
|
|
||||||
|
= help: if you're having merge conflicts after pulling new code, the top section is the code you already had and the bottom section is the remote code
|
||||||
|
= help: if you're in the middle of a rebase, the top section is the code being rebased onto and the bottom section is the code coming from the current commit being rebased
|
||||||
|
= note: for an explanation on these markers from the `git` documentation, visit <https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging#_checking_out_conflicts>
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|
|
@ -2,13 +2,17 @@ error: encountered diff marker
|
||||||
--> $DIR/fn-arg.rs:3:1
|
--> $DIR/fn-arg.rs:3:1
|
||||||
|
|
|
|
||||||
LL | <<<<<<< HEAD
|
LL | <<<<<<< HEAD
|
||||||
| ^^^^^^^ start
|
| ^^^^^^^ after this is the code before the merge
|
||||||
LL | x: u8,
|
LL | x: u8,
|
||||||
LL | =======
|
LL | =======
|
||||||
| ^^^^^^^ middle
|
| -------
|
||||||
LL | x: i8,
|
LL | x: i8,
|
||||||
LL | >>>>>>> branch
|
LL | >>>>>>> branch
|
||||||
| ^^^^^^^ end
|
| ^^^^^^^ above this are the incoming code changes
|
||||||
|
|
|
||||||
|
= help: if you're having merge conflicts after pulling new code, the top section is the code you already had and the bottom section is the remote code
|
||||||
|
= help: if you're in the middle of a rebase, the top section is the code being rebased onto and the bottom section is the code coming from the current commit being rebased
|
||||||
|
= note: for an explanation on these markers from the `git` documentation, visit <https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging#_checking_out_conflicts>
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|
|
@ -2,13 +2,17 @@ error: encountered diff marker
|
||||||
--> $DIR/item-with-attr.rs:2:1
|
--> $DIR/item-with-attr.rs:2:1
|
||||||
|
|
|
|
||||||
LL | <<<<<<< HEAD
|
LL | <<<<<<< HEAD
|
||||||
| ^^^^^^^ start
|
| ^^^^^^^ after this is the code before the merge
|
||||||
LL | fn foo() {}
|
LL | fn foo() {}
|
||||||
LL | =======
|
LL | =======
|
||||||
| ^^^^^^^ middle
|
| -------
|
||||||
LL | fn bar() {}
|
LL | fn bar() {}
|
||||||
LL | >>>>>>> branch
|
LL | >>>>>>> branch
|
||||||
| ^^^^^^^ end
|
| ^^^^^^^ above this are the incoming code changes
|
||||||
|
|
|
||||||
|
= help: if you're having merge conflicts after pulling new code, the top section is the code you already had and the bottom section is the remote code
|
||||||
|
= help: if you're in the middle of a rebase, the top section is the code being rebased onto and the bottom section is the code coming from the current commit being rebased
|
||||||
|
= note: for an explanation on these markers from the `git` documentation, visit <https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging#_checking_out_conflicts>
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|
|
@ -2,13 +2,17 @@ error: encountered diff marker
|
||||||
--> $DIR/item.rs:1:1
|
--> $DIR/item.rs:1:1
|
||||||
|
|
|
|
||||||
LL | <<<<<<< HEAD
|
LL | <<<<<<< HEAD
|
||||||
| ^^^^^^^ start
|
| ^^^^^^^ after this is the code before the merge
|
||||||
LL | fn foo() {}
|
LL | fn foo() {}
|
||||||
LL | =======
|
LL | =======
|
||||||
| ^^^^^^^ middle
|
| -------
|
||||||
LL | fn bar() {}
|
LL | fn bar() {}
|
||||||
LL | >>>>>>> branch
|
LL | >>>>>>> branch
|
||||||
| ^^^^^^^ end
|
| ^^^^^^^ above this are the incoming code changes
|
||||||
|
|
|
||||||
|
= help: if you're having merge conflicts after pulling new code, the top section is the code you already had and the bottom section is the remote code
|
||||||
|
= help: if you're in the middle of a rebase, the top section is the code being rebased onto and the bottom section is the code coming from the current commit being rebased
|
||||||
|
= note: for an explanation on these markers from the `git` documentation, visit <https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging#_checking_out_conflicts>
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|
|
@ -2,13 +2,17 @@ error: encountered diff marker
|
||||||
--> $DIR/statement.rs:10:1
|
--> $DIR/statement.rs:10:1
|
||||||
|
|
|
|
||||||
LL | <<<<<<< HEAD
|
LL | <<<<<<< HEAD
|
||||||
| ^^^^^^^ start
|
| ^^^^^^^ after this is the code before the merge
|
||||||
LL | S::foo();
|
LL | S::foo();
|
||||||
LL | =======
|
LL | =======
|
||||||
| ^^^^^^^ middle
|
| -------
|
||||||
LL | S::bar();
|
LL | S::bar();
|
||||||
LL | >>>>>>> branch
|
LL | >>>>>>> branch
|
||||||
| ^^^^^^^ end
|
| ^^^^^^^ above this are the incoming code changes
|
||||||
|
|
|
||||||
|
= help: if you're having merge conflicts after pulling new code, the top section is the code you already had and the bottom section is the remote code
|
||||||
|
= help: if you're in the middle of a rebase, the top section is the code being rebased onto and the bottom section is the code coming from the current commit being rebased
|
||||||
|
= note: for an explanation on these markers from the `git` documentation, visit <https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging#_checking_out_conflicts>
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|
|
@ -2,13 +2,17 @@ error: encountered diff marker
|
||||||
--> $DIR/struct-expr.rs:6:1
|
--> $DIR/struct-expr.rs:6:1
|
||||||
|
|
|
|
||||||
LL | <<<<<<< HEAD
|
LL | <<<<<<< HEAD
|
||||||
| ^^^^^^^ start
|
| ^^^^^^^ after this is the code before the merge
|
||||||
LL | x: 42,
|
LL | x: 42,
|
||||||
LL | =======
|
LL | =======
|
||||||
| ^^^^^^^ middle
|
| -------
|
||||||
LL | x: 0,
|
LL | x: 0,
|
||||||
LL | >>>>>>> branch
|
LL | >>>>>>> branch
|
||||||
| ^^^^^^^ end
|
| ^^^^^^^ above this are the incoming code changes
|
||||||
|
|
|
||||||
|
= help: if you're having merge conflicts after pulling new code, the top section is the code you already had and the bottom section is the remote code
|
||||||
|
= help: if you're in the middle of a rebase, the top section is the code being rebased onto and the bottom section is the code coming from the current commit being rebased
|
||||||
|
= note: for an explanation on these markers from the `git` documentation, visit <https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging#_checking_out_conflicts>
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|
|
@ -2,13 +2,17 @@ error: encountered diff marker
|
||||||
--> $DIR/struct.rs:2:1
|
--> $DIR/struct.rs:2:1
|
||||||
|
|
|
|
||||||
LL | <<<<<<< HEAD
|
LL | <<<<<<< HEAD
|
||||||
| ^^^^^^^ start
|
| ^^^^^^^ after this is the code before the merge
|
||||||
LL | x: u8,
|
LL | x: u8,
|
||||||
LL | =======
|
LL | =======
|
||||||
| ^^^^^^^ middle
|
| -------
|
||||||
LL | x: i8,
|
LL | x: i8,
|
||||||
LL | >>>>>>> branch
|
LL | >>>>>>> branch
|
||||||
| ^^^^^^^ end
|
| ^^^^^^^ above this are the incoming code changes
|
||||||
|
|
|
||||||
|
= help: if you're having merge conflicts after pulling new code, the top section is the code you already had and the bottom section is the remote code
|
||||||
|
= help: if you're in the middle of a rebase, the top section is the code being rebased onto and the bottom section is the code coming from the current commit being rebased
|
||||||
|
= note: for an explanation on these markers from the `git` documentation, visit <https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging#_checking_out_conflicts>
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|
|
@ -2,13 +2,17 @@ error: encountered diff marker
|
||||||
--> $DIR/trait-item.rs:2:1
|
--> $DIR/trait-item.rs:2:1
|
||||||
|
|
|
|
||||||
LL | <<<<<<< HEAD
|
LL | <<<<<<< HEAD
|
||||||
| ^^^^^^^ start
|
| ^^^^^^^ after this is the code before the merge
|
||||||
LL | fn foo() {}
|
LL | fn foo() {}
|
||||||
LL | =======
|
LL | =======
|
||||||
| ^^^^^^^ middle
|
| -------
|
||||||
LL | fn bar() {}
|
LL | fn bar() {}
|
||||||
LL | >>>>>>> branch
|
LL | >>>>>>> branch
|
||||||
| ^^^^^^^ end
|
| ^^^^^^^ above this are the incoming code changes
|
||||||
|
|
|
||||||
|
= help: if you're having merge conflicts after pulling new code, the top section is the code you already had and the bottom section is the remote code
|
||||||
|
= help: if you're in the middle of a rebase, the top section is the code being rebased onto and the bottom section is the code coming from the current commit being rebased
|
||||||
|
= note: for an explanation on these markers from the `git` documentation, visit <https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging#_checking_out_conflicts>
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|
|
@ -2,13 +2,17 @@ error: encountered diff marker
|
||||||
--> $DIR/tuple-struct.rs:2:1
|
--> $DIR/tuple-struct.rs:2:1
|
||||||
|
|
|
|
||||||
LL | <<<<<<< HEAD
|
LL | <<<<<<< HEAD
|
||||||
| ^^^^^^^ start
|
| ^^^^^^^ after this is the code before the merge
|
||||||
LL | u8,
|
LL | u8,
|
||||||
LL | =======
|
LL | =======
|
||||||
| ^^^^^^^ middle
|
| -------
|
||||||
LL | i8,
|
LL | i8,
|
||||||
LL | >>>>>>> branch
|
LL | >>>>>>> branch
|
||||||
| ^^^^^^^ end
|
| ^^^^^^^ above this are the incoming code changes
|
||||||
|
|
|
||||||
|
= help: if you're having merge conflicts after pulling new code, the top section is the code you already had and the bottom section is the remote code
|
||||||
|
= help: if you're in the middle of a rebase, the top section is the code being rebased onto and the bottom section is the code coming from the current commit being rebased
|
||||||
|
= note: for an explanation on these markers from the `git` documentation, visit <https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging#_checking_out_conflicts>
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|
|
@ -2,13 +2,17 @@ error: encountered diff marker
|
||||||
--> $DIR/use-statement.rs:2:1
|
--> $DIR/use-statement.rs:2:1
|
||||||
|
|
|
|
||||||
LL | <<<<<<< HEAD
|
LL | <<<<<<< HEAD
|
||||||
| ^^^^^^^ start
|
| ^^^^^^^ after this is the code before the merge
|
||||||
LL | bar,
|
LL | bar,
|
||||||
LL | =======
|
LL | =======
|
||||||
| ^^^^^^^ middle
|
| -------
|
||||||
LL | baz,
|
LL | baz,
|
||||||
LL | >>>>>>> branch
|
LL | >>>>>>> branch
|
||||||
| ^^^^^^^ end
|
| ^^^^^^^ above this are the incoming code changes
|
||||||
|
|
|
||||||
|
= help: if you're having merge conflicts after pulling new code, the top section is the code you already had and the bottom section is the remote code
|
||||||
|
= help: if you're in the middle of a rebase, the top section is the code being rebased onto and the bottom section is the code coming from the current commit being rebased
|
||||||
|
= note: for an explanation on these markers from the `git` documentation, visit <https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging#_checking_out_conflicts>
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue