Skip to content

Commit 056908d

Browse files
committed
Auto merge of rust-lang#150575 - JonathanBrouwer:rollup-veh2d0h, r=JonathanBrouwer
Rollup of 4 pull requests Successful merges: - rust-lang#150382 (Tweak wording of diff marker diagnostic) - rust-lang#150431 (test and document that `proc_macro::Ident` is NFC-normalized) - rust-lang#150504 (Add regression test for issue rust-lang#99173) - rust-lang#150568 (Update triagebot config for `compiler-errors`, `tests/{run-make,run-make-cargo}` and `fallback` adhoc_group) r? `@ghost` `@rustbot` modify labels: rollup
2 parents fcd6309 + ecee483 commit 056908d

File tree

18 files changed

+148
-112
lines changed

18 files changed

+148
-112
lines changed

compiler/rustc_parse/src/parser/diagnostics.rs

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3084,22 +3084,24 @@ impl<'a> Parser<'a> {
30843084
}
30853085

30863086
let mut err = self.dcx().struct_span_fatal(spans, "encountered diff marker");
3087-
match middlediff3 {
3087+
let middle_marker = match middlediff3 {
30883088
// We're using diff3
30893089
Some(middlediff3) => {
30903090
err.span_label(
3091-
start,
3092-
"between this marker and `|||||||` is the code that we're merging into",
3093-
);
3094-
err.span_label(middlediff3, "between this marker and `=======` is the base code (what the two refs diverged from)");
3095-
}
3096-
None => {
3097-
err.span_label(
3098-
start,
3099-
"between this marker and `=======` is the code that we're merging into",
3091+
middlediff3,
3092+
"between this marker and `=======` is the base code (what the two refs \
3093+
diverged from)",
31003094
);
3095+
"|||||||"
31013096
}
3097+
None => "=======",
31023098
};
3099+
err.span_label(
3100+
start,
3101+
format!(
3102+
"between this marker and `{middle_marker}` is the code that you are merging into",
3103+
),
3104+
);
31033105

31043106
if let Some(middle) = middle {
31053107
err.span_label(middle, "between this marker and `>>>>>>>` is the incoming code");
@@ -3114,16 +3116,15 @@ impl<'a> Parser<'a> {
31143116
containing conflict markers",
31153117
);
31163118
err.help(
3117-
"if you're having merge conflicts after pulling new code:\n\
3118-
the top section is the code you already had and the bottom section is the remote code\n\
3119-
if you're in the middle of a rebase:\n\
3120-
the top section is the code being rebased onto and the bottom section is the code \
3121-
coming from the current commit being rebased",
3119+
"if you are in a merge, the top section is the code you already had checked out and \
3120+
the bottom section is the new code\n\
3121+
if you are in a rebase, the top section is the code being rebased onto and the bottom \
3122+
section is the code you had checked out which is being rebased",
31223123
);
31233124

31243125
err.note(
3125-
"for an explanation on these markers from the `git` documentation:\n\
3126-
visit <https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging#_checking_out_conflicts>",
3126+
"for an explanation on these markers from the `git` documentation, visit \
3127+
<https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging#_checking_out_conflicts>",
31273128
);
31283129

31293130
err.emit();

library/proc_macro/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,6 +1038,8 @@ impl Ident {
10381038
/// The `string` argument must be a valid identifier permitted by the
10391039
/// language (including keywords, e.g. `self` or `fn`). Otherwise, the function will panic.
10401040
///
1041+
/// The constructed identifier will be NFC-normalized. See the [Reference] for more info.
1042+
///
10411043
/// Note that `span`, currently in rustc, configures the hygiene information
10421044
/// for this identifier.
10431045
///
@@ -1052,6 +1054,8 @@ impl Ident {
10521054
///
10531055
/// Due to the current importance of hygiene this constructor, unlike other
10541056
/// tokens, requires a `Span` to be specified at construction.
1057+
///
1058+
/// [Reference]: https://doc.rust-lang.org/nightly/reference/identifiers.html#r-ident.normalization
10551059
#[stable(feature = "proc_macro_lib2", since = "1.29.0")]
10561060
pub fn new(string: &str, span: Span) -> Ident {
10571061
Ident(bridge::Ident {

tests/ui/parser/diff-markers/enum-2.stderr

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error: encountered diff marker
22
--> $DIR/enum-2.rs:3:1
33
|
44
LL | <<<<<<< HEAD
5-
| ^^^^^^^ between this marker and `|||||||` is the code that we're merging into
5+
| ^^^^^^^ between this marker and `|||||||` is the code that you are merging into
66
LL | x: u8,
77
LL | |||||||
88
| ------- between this marker and `=======` is the base code (what the two refs diverged from)
@@ -15,12 +15,9 @@ LL | >>>>>>> branch
1515
|
1616
= note: conflict markers indicate that a merge was started but could not be completed due to merge conflicts
1717
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:
23-
visit <https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging#_checking_out_conflicts>
18+
= help: if you are in a merge, the top section is the code you already had checked out and the bottom section is the new code
19+
if you are in a rebase, the top section is the code being rebased onto and the bottom section is the code you had checked out which is being rebased
20+
= 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>
2421

2522
error: aborting due to 1 previous error
2623

tests/ui/parser/diff-markers/enum.stderr

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error: encountered diff marker
22
--> $DIR/enum.rs:2:1
33
|
44
LL | <<<<<<< HEAD
5-
| ^^^^^^^ between this marker and `=======` is the code that we're merging into
5+
| ^^^^^^^ between this marker and `=======` is the code that you are merging into
66
LL | Foo(u8),
77
LL | =======
88
| ------- between this marker and `>>>>>>>` is the incoming code
@@ -12,12 +12,9 @@ LL | >>>>>>> branch
1212
|
1313
= note: conflict markers indicate that a merge was started but could not be completed due to merge conflicts
1414
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:
20-
visit <https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging#_checking_out_conflicts>
15+
= help: if you are in a merge, the top section is the code you already had checked out and the bottom section is the new code
16+
if you are in a rebase, the top section is the code being rebased onto and the bottom section is the code you had checked out which is being rebased
17+
= 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>
2118

2219
error: aborting due to 1 previous error
2320

tests/ui/parser/diff-markers/fn-arg.stderr

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error: encountered diff marker
22
--> $DIR/fn-arg.rs:3:1
33
|
44
LL | <<<<<<< HEAD
5-
| ^^^^^^^ between this marker and `=======` is the code that we're merging into
5+
| ^^^^^^^ between this marker and `=======` is the code that you are merging into
66
LL | x: u8,
77
LL | =======
88
| ------- between this marker and `>>>>>>>` is the incoming code
@@ -12,12 +12,9 @@ LL | >>>>>>> branch
1212
|
1313
= note: conflict markers indicate that a merge was started but could not be completed due to merge conflicts
1414
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:
20-
visit <https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging#_checking_out_conflicts>
15+
= help: if you are in a merge, the top section is the code you already had checked out and the bottom section is the new code
16+
if you are in a rebase, the top section is the code being rebased onto and the bottom section is the code you had checked out which is being rebased
17+
= 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>
2118

2219
error: aborting due to 1 previous error
2320

tests/ui/parser/diff-markers/item-with-attr.stderr

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error: encountered diff marker
22
--> $DIR/item-with-attr.rs:2:1
33
|
44
LL | <<<<<<< HEAD
5-
| ^^^^^^^ between this marker and `=======` is the code that we're merging into
5+
| ^^^^^^^ between this marker and `=======` is the code that you are merging into
66
LL | fn foo() {}
77
LL | =======
88
| ------- between this marker and `>>>>>>>` is the incoming code
@@ -12,12 +12,9 @@ LL | >>>>>>> branch
1212
|
1313
= note: conflict markers indicate that a merge was started but could not be completed due to merge conflicts
1414
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:
20-
visit <https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging#_checking_out_conflicts>
15+
= help: if you are in a merge, the top section is the code you already had checked out and the bottom section is the new code
16+
if you are in a rebase, the top section is the code being rebased onto and the bottom section is the code you had checked out which is being rebased
17+
= 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>
2118

2219
error: aborting due to 1 previous error
2320

tests/ui/parser/diff-markers/item.stderr

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error: encountered diff marker
22
--> $DIR/item.rs:1:1
33
|
44
LL | <<<<<<< HEAD
5-
| ^^^^^^^ between this marker and `=======` is the code that we're merging into
5+
| ^^^^^^^ between this marker and `=======` is the code that you are merging into
66
LL | fn foo() {}
77
LL | =======
88
| ------- between this marker and `>>>>>>>` is the incoming code
@@ -12,12 +12,9 @@ LL | >>>>>>> branch
1212
|
1313
= note: conflict markers indicate that a merge was started but could not be completed due to merge conflicts
1414
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:
20-
visit <https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging#_checking_out_conflicts>
15+
= help: if you are in a merge, the top section is the code you already had checked out and the bottom section is the new code
16+
if you are in a rebase, the top section is the code being rebased onto and the bottom section is the code you had checked out which is being rebased
17+
= 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>
2118

2219
error: aborting due to 1 previous error
2320

tests/ui/parser/diff-markers/statement.stderr

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error: encountered diff marker
22
--> $DIR/statement.rs:10:1
33
|
44
LL | <<<<<<< HEAD
5-
| ^^^^^^^ between this marker and `=======` is the code that we're merging into
5+
| ^^^^^^^ between this marker and `=======` is the code that you are merging into
66
LL | S::foo();
77
LL | =======
88
| ------- between this marker and `>>>>>>>` is the incoming code
@@ -12,12 +12,9 @@ LL | >>>>>>> branch
1212
|
1313
= note: conflict markers indicate that a merge was started but could not be completed due to merge conflicts
1414
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:
20-
visit <https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging#_checking_out_conflicts>
15+
= help: if you are in a merge, the top section is the code you already had checked out and the bottom section is the new code
16+
if you are in a rebase, the top section is the code being rebased onto and the bottom section is the code you had checked out which is being rebased
17+
= 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>
2118

2219
error: aborting due to 1 previous error
2320

tests/ui/parser/diff-markers/struct-expr.stderr

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error: encountered diff marker
22
--> $DIR/struct-expr.rs:6:1
33
|
44
LL | <<<<<<< HEAD
5-
| ^^^^^^^ between this marker and `=======` is the code that we're merging into
5+
| ^^^^^^^ between this marker and `=======` is the code that you are merging into
66
LL | x: 42,
77
LL | =======
88
| ------- between this marker and `>>>>>>>` is the incoming code
@@ -12,12 +12,9 @@ LL | >>>>>>> branch
1212
|
1313
= note: conflict markers indicate that a merge was started but could not be completed due to merge conflicts
1414
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:
20-
visit <https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging#_checking_out_conflicts>
15+
= help: if you are in a merge, the top section is the code you already had checked out and the bottom section is the new code
16+
if you are in a rebase, the top section is the code being rebased onto and the bottom section is the code you had checked out which is being rebased
17+
= 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>
2118

2219
error: aborting due to 1 previous error
2320

tests/ui/parser/diff-markers/struct.stderr

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error: encountered diff marker
22
--> $DIR/struct.rs:2:1
33
|
44
LL | <<<<<<< HEAD
5-
| ^^^^^^^ between this marker and `=======` is the code that we're merging into
5+
| ^^^^^^^ between this marker and `=======` is the code that you are merging into
66
LL | x: u8,
77
LL | =======
88
| ------- between this marker and `>>>>>>>` is the incoming code
@@ -12,12 +12,9 @@ LL | >>>>>>> branch
1212
|
1313
= note: conflict markers indicate that a merge was started but could not be completed due to merge conflicts
1414
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:
20-
visit <https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging#_checking_out_conflicts>
15+
= help: if you are in a merge, the top section is the code you already had checked out and the bottom section is the new code
16+
if you are in a rebase, the top section is the code being rebased onto and the bottom section is the code you had checked out which is being rebased
17+
= 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>
2118

2219
error: aborting due to 1 previous error
2320

0 commit comments

Comments
 (0)