You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rollup merge of rust-lang#126125 - dev-ardi:conflict-markers, r=estebank
Improve conflict marker recovery
<!--
If this PR is related to an unstable feature or an otherwise tracked effort,
please link to the relevant tracking issue here. If you don't know of a related
tracking issue or there are none, feel free to ignore this.
This PR will get automatically assigned to a reviewer. In case you would like
a specific user to review your work, you can assign it to them by using
r? <reviewer name>
-->
closesrust-lang#113826
r? `@estebank` since you reviewed rust-lang#115413
cc: `@rben01` since you opened up the issue in the first place
Copy file name to clipboardexpand all lines: tests/ui/parser/diff-markers/enum-2.stderr
+12-7
Original file line number
Diff line number
Diff line change
@@ -2,20 +2,25 @@ error: encountered diff marker
2
2
--> $DIR/enum-2.rs:3:1
3
3
|
4
4
LL | <<<<<<< HEAD
5
-
| ^^^^^^^ after this is the code before the merge
5
+
| ^^^^^^^ between this marker and `|||||||` is the code that we're merging into
6
6
LL | x: u8,
7
7
LL | |||||||
8
-
| -------
8
+
| ------- between this marker and `=======` is the base code (what the two refs diverged from)
9
9
LL | z: (),
10
10
LL | =======
11
-
| -------
11
+
| ------- between this marker and `>>>>>>>` is the incoming code
12
12
LL | y: i8,
13
13
LL | >>>>>>> branch
14
-
| ^^^^^^^ above this are the incoming code changes
14
+
| ^^^^^^^ this marker concludes the conflict region
15
15
|
16
-
= 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
17
-
= 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
18
-
= 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>
16
+
= note: conflict markers indicate that a merge was started but could not be completed due to merge conflicts
17
+
to resolve a conflict, keep only the code you want and then delete the lines containing conflict markers
18
+
= help: if you're having merge conflicts after pulling new code:
19
+
the top section is the code you already had and the bottom section is the remote code
20
+
if you're in the middle of a rebase:
21
+
the top section is the code being rebased onto and the bottom section is the code coming from the current commit being rebased
22
+
= note: for an explanation on these markers from the `git` documentation:
Copy file name to clipboardexpand all lines: tests/ui/parser/diff-markers/enum.stderr
+11-6
Original file line number
Diff line number
Diff line change
@@ -2,17 +2,22 @@ error: encountered diff marker
2
2
--> $DIR/enum.rs:2:1
3
3
|
4
4
LL | <<<<<<< HEAD
5
-
| ^^^^^^^ after this is the code before the merge
5
+
| ^^^^^^^ between this marker and `=======` is the code that we're merging into
6
6
LL | Foo(u8),
7
7
LL | =======
8
-
| -------
8
+
| ------- between this marker and `>>>>>>>` is the incoming code
9
9
LL | Bar(i8),
10
10
LL | >>>>>>> branch
11
-
| ^^^^^^^ above this are the incoming code changes
11
+
| ^^^^^^^ this marker concludes the conflict region
12
12
|
13
-
= 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
14
-
= 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
15
-
= 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>
13
+
= note: conflict markers indicate that a merge was started but could not be completed due to merge conflicts
14
+
to resolve a conflict, keep only the code you want and then delete the lines containing conflict markers
15
+
= help: if you're having merge conflicts after pulling new code:
16
+
the top section is the code you already had and the bottom section is the remote code
17
+
if you're in the middle of a rebase:
18
+
the top section is the code being rebased onto and the bottom section is the code coming from the current commit being rebased
19
+
= note: for an explanation on these markers from the `git` documentation:
Copy file name to clipboardexpand all lines: tests/ui/parser/diff-markers/fn-arg.stderr
+11-6
Original file line number
Diff line number
Diff line change
@@ -2,17 +2,22 @@ error: encountered diff marker
2
2
--> $DIR/fn-arg.rs:3:1
3
3
|
4
4
LL | <<<<<<< HEAD
5
-
| ^^^^^^^ after this is the code before the merge
5
+
| ^^^^^^^ between this marker and `=======` is the code that we're merging into
6
6
LL | x: u8,
7
7
LL | =======
8
-
| -------
8
+
| ------- between this marker and `>>>>>>>` is the incoming code
9
9
LL | x: i8,
10
10
LL | >>>>>>> branch
11
-
| ^^^^^^^ above this are the incoming code changes
11
+
| ^^^^^^^ this marker concludes the conflict region
12
12
|
13
-
= 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
14
-
= 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
15
-
= 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>
13
+
= note: conflict markers indicate that a merge was started but could not be completed due to merge conflicts
14
+
to resolve a conflict, keep only the code you want and then delete the lines containing conflict markers
15
+
= help: if you're having merge conflicts after pulling new code:
16
+
the top section is the code you already had and the bottom section is the remote code
17
+
if you're in the middle of a rebase:
18
+
the top section is the code being rebased onto and the bottom section is the code coming from the current commit being rebased
19
+
= note: for an explanation on these markers from the `git` documentation:
Copy file name to clipboardexpand all lines: tests/ui/parser/diff-markers/item-with-attr.stderr
+11-6
Original file line number
Diff line number
Diff line change
@@ -2,17 +2,22 @@ error: encountered diff marker
2
2
--> $DIR/item-with-attr.rs:2:1
3
3
|
4
4
LL | <<<<<<< HEAD
5
-
| ^^^^^^^ after this is the code before the merge
5
+
| ^^^^^^^ between this marker and `=======` is the code that we're merging into
6
6
LL | fn foo() {}
7
7
LL | =======
8
-
| -------
8
+
| ------- between this marker and `>>>>>>>` is the incoming code
9
9
LL | fn bar() {}
10
10
LL | >>>>>>> branch
11
-
| ^^^^^^^ above this are the incoming code changes
11
+
| ^^^^^^^ this marker concludes the conflict region
12
12
|
13
-
= 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
14
-
= 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
15
-
= 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>
13
+
= note: conflict markers indicate that a merge was started but could not be completed due to merge conflicts
14
+
to resolve a conflict, keep only the code you want and then delete the lines containing conflict markers
15
+
= help: if you're having merge conflicts after pulling new code:
16
+
the top section is the code you already had and the bottom section is the remote code
17
+
if you're in the middle of a rebase:
18
+
the top section is the code being rebased onto and the bottom section is the code coming from the current commit being rebased
19
+
= note: for an explanation on these markers from the `git` documentation:
Copy file name to clipboardexpand all lines: tests/ui/parser/diff-markers/item.stderr
+11-6
Original file line number
Diff line number
Diff line change
@@ -2,17 +2,22 @@ error: encountered diff marker
2
2
--> $DIR/item.rs:1:1
3
3
|
4
4
LL | <<<<<<< HEAD
5
-
| ^^^^^^^ after this is the code before the merge
5
+
| ^^^^^^^ between this marker and `=======` is the code that we're merging into
6
6
LL | fn foo() {}
7
7
LL | =======
8
-
| -------
8
+
| ------- between this marker and `>>>>>>>` is the incoming code
9
9
LL | fn bar() {}
10
10
LL | >>>>>>> branch
11
-
| ^^^^^^^ above this are the incoming code changes
11
+
| ^^^^^^^ this marker concludes the conflict region
12
12
|
13
-
= 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
14
-
= 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
15
-
= 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>
13
+
= note: conflict markers indicate that a merge was started but could not be completed due to merge conflicts
14
+
to resolve a conflict, keep only the code you want and then delete the lines containing conflict markers
15
+
= help: if you're having merge conflicts after pulling new code:
16
+
the top section is the code you already had and the bottom section is the remote code
17
+
if you're in the middle of a rebase:
18
+
the top section is the code being rebased onto and the bottom section is the code coming from the current commit being rebased
19
+
= note: for an explanation on these markers from the `git` documentation:
Copy file name to clipboardexpand all lines: tests/ui/parser/diff-markers/statement.stderr
+11-6
Original file line number
Diff line number
Diff line change
@@ -2,17 +2,22 @@ error: encountered diff marker
2
2
--> $DIR/statement.rs:10:1
3
3
|
4
4
LL | <<<<<<< HEAD
5
-
| ^^^^^^^ after this is the code before the merge
5
+
| ^^^^^^^ between this marker and `=======` is the code that we're merging into
6
6
LL | S::foo();
7
7
LL | =======
8
-
| -------
8
+
| ------- between this marker and `>>>>>>>` is the incoming code
9
9
LL | S::bar();
10
10
LL | >>>>>>> branch
11
-
| ^^^^^^^ above this are the incoming code changes
11
+
| ^^^^^^^ this marker concludes the conflict region
12
12
|
13
-
= 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
14
-
= 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
15
-
= 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>
13
+
= note: conflict markers indicate that a merge was started but could not be completed due to merge conflicts
14
+
to resolve a conflict, keep only the code you want and then delete the lines containing conflict markers
15
+
= help: if you're having merge conflicts after pulling new code:
16
+
the top section is the code you already had and the bottom section is the remote code
17
+
if you're in the middle of a rebase:
18
+
the top section is the code being rebased onto and the bottom section is the code coming from the current commit being rebased
19
+
= note: for an explanation on these markers from the `git` documentation:
Copy file name to clipboardexpand all lines: tests/ui/parser/diff-markers/struct-expr.stderr
+11-6
Original file line number
Diff line number
Diff line change
@@ -2,17 +2,22 @@ error: encountered diff marker
2
2
--> $DIR/struct-expr.rs:6:1
3
3
|
4
4
LL | <<<<<<< HEAD
5
-
| ^^^^^^^ after this is the code before the merge
5
+
| ^^^^^^^ between this marker and `=======` is the code that we're merging into
6
6
LL | x: 42,
7
7
LL | =======
8
-
| -------
8
+
| ------- between this marker and `>>>>>>>` is the incoming code
9
9
LL | x: 0,
10
10
LL | >>>>>>> branch
11
-
| ^^^^^^^ above this are the incoming code changes
11
+
| ^^^^^^^ this marker concludes the conflict region
12
12
|
13
-
= 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
14
-
= 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
15
-
= 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>
13
+
= note: conflict markers indicate that a merge was started but could not be completed due to merge conflicts
14
+
to resolve a conflict, keep only the code you want and then delete the lines containing conflict markers
15
+
= help: if you're having merge conflicts after pulling new code:
16
+
the top section is the code you already had and the bottom section is the remote code
17
+
if you're in the middle of a rebase:
18
+
the top section is the code being rebased onto and the bottom section is the code coming from the current commit being rebased
19
+
= note: for an explanation on these markers from the `git` documentation:
Copy file name to clipboardexpand all lines: tests/ui/parser/diff-markers/struct.stderr
+11-6
Original file line number
Diff line number
Diff line change
@@ -2,17 +2,22 @@ error: encountered diff marker
2
2
--> $DIR/struct.rs:2:1
3
3
|
4
4
LL | <<<<<<< HEAD
5
-
| ^^^^^^^ after this is the code before the merge
5
+
| ^^^^^^^ between this marker and `=======` is the code that we're merging into
6
6
LL | x: u8,
7
7
LL | =======
8
-
| -------
8
+
| ------- between this marker and `>>>>>>>` is the incoming code
9
9
LL | x: i8,
10
10
LL | >>>>>>> branch
11
-
| ^^^^^^^ above this are the incoming code changes
11
+
| ^^^^^^^ this marker concludes the conflict region
12
12
|
13
-
= 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
14
-
= 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
15
-
= 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>
13
+
= note: conflict markers indicate that a merge was started but could not be completed due to merge conflicts
14
+
to resolve a conflict, keep only the code you want and then delete the lines containing conflict markers
15
+
= help: if you're having merge conflicts after pulling new code:
16
+
the top section is the code you already had and the bottom section is the remote code
17
+
if you're in the middle of a rebase:
18
+
the top section is the code being rebased onto and the bottom section is the code coming from the current commit being rebased
19
+
= note: for an explanation on these markers from the `git` documentation:
Copy file name to clipboardexpand all lines: tests/ui/parser/diff-markers/trait-item.stderr
+11-6
Original file line number
Diff line number
Diff line change
@@ -2,17 +2,22 @@ error: encountered diff marker
2
2
--> $DIR/trait-item.rs:2:1
3
3
|
4
4
LL | <<<<<<< HEAD
5
-
| ^^^^^^^ after this is the code before the merge
5
+
| ^^^^^^^ between this marker and `=======` is the code that we're merging into
6
6
LL | fn foo() {}
7
7
LL | =======
8
-
| -------
8
+
| ------- between this marker and `>>>>>>>` is the incoming code
9
9
LL | fn bar() {}
10
10
LL | >>>>>>> branch
11
-
| ^^^^^^^ above this are the incoming code changes
11
+
| ^^^^^^^ this marker concludes the conflict region
12
12
|
13
-
= 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
14
-
= 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
15
-
= 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>
13
+
= note: conflict markers indicate that a merge was started but could not be completed due to merge conflicts
14
+
to resolve a conflict, keep only the code you want and then delete the lines containing conflict markers
15
+
= help: if you're having merge conflicts after pulling new code:
16
+
the top section is the code you already had and the bottom section is the remote code
17
+
if you're in the middle of a rebase:
18
+
the top section is the code being rebased onto and the bottom section is the code coming from the current commit being rebased
19
+
= note: for an explanation on these markers from the `git` documentation:
0 commit comments