Skip to content

Commit 7d2c75d

Browse files
committed
Fix formatting ellipses at the end of some diagnostics
1 parent 7876fa6 commit 7d2c75d

File tree

6 files changed

+18
-18
lines changed

6 files changed

+18
-18
lines changed

src/librustc_parse/parser/pat.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -209,13 +209,13 @@ impl<'a> Parser<'a> {
209209
if let Ok(seq_snippet) = self.span_to_snippet(seq_span) {
210210
err.span_suggestion(
211211
seq_span,
212-
"try adding parentheses to match on a tuple..",
212+
"try adding parentheses to match on a tuple...",
213213
format!("({})", seq_snippet),
214214
Applicability::MachineApplicable,
215215
)
216216
.span_suggestion(
217217
seq_span,
218-
"..or a vertical bar to match on multiple alternatives",
218+
"...or a vertical bar to match on multiple alternatives",
219219
format!("{}", seq_snippet.replace(",", " |")),
220220
Applicability::MachineApplicable,
221221
);

src/librustc_resolve/build_reduced_graph.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1057,7 +1057,7 @@ impl<'a, 'b> BuildReducedGraphVisitor<'a, 'b> {
10571057
let msg = "`#[macro_escape]` is a deprecated synonym for `#[macro_use]`";
10581058
let mut err = self.r.session.struct_span_warn(attr.span, msg);
10591059
if let ast::AttrStyle::Inner = attr.style {
1060-
err.help("consider an outer attribute, `#[macro_use]` mod ...").emit();
1060+
err.help("try an outer attribute: `#[macro_use]`").emit();
10611061
} else {
10621062
err.emit();
10631063
}

src/test/ui/deprecation/deprecated-macro_escape-inner.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ warning: `#[macro_escape]` is a deprecated synonym for `#[macro_use]`
44
LL | #![macro_escape]
55
| ^^^^^^^^^^^^^^^^
66
|
7-
= help: consider an outer attribute, `#[macro_use]` mod ...
7+
= help: try an outer attribute: `#[macro_use]`
88

src/test/ui/did_you_mean/issue-48492-tuple-destructure-missing-parens.stderr

+12-12
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ error: unexpected `,` in pattern
44
LL | while let b1, b2, b3 = reading_frame.next().expect("there should be a start codon") {
55
| ^
66
|
7-
help: try adding parentheses to match on a tuple..
7+
help: try adding parentheses to match on a tuple...
88
|
99
LL | while let (b1, b2, b3) = reading_frame.next().expect("there should be a start codon") {
1010
| ^^^^^^^^^^^^
11-
help: ..or a vertical bar to match on multiple alternatives
11+
help: ...or a vertical bar to match on multiple alternatives
1212
|
1313
LL | while let b1 | b2 | b3 = reading_frame.next().expect("there should be a start codon") {
1414
| ^^^^^^^^^^^^
@@ -19,11 +19,11 @@ error: unexpected `,` in pattern
1919
LL | if let b1, b2, b3 = reading_frame.next().unwrap() {
2020
| ^
2121
|
22-
help: try adding parentheses to match on a tuple..
22+
help: try adding parentheses to match on a tuple...
2323
|
2424
LL | if let (b1, b2, b3) = reading_frame.next().unwrap() {
2525
| ^^^^^^^^^^^^
26-
help: ..or a vertical bar to match on multiple alternatives
26+
help: ...or a vertical bar to match on multiple alternatives
2727
|
2828
LL | if let b1 | b2 | b3 = reading_frame.next().unwrap() {
2929
| ^^^^^^^^^^^^
@@ -34,11 +34,11 @@ error: unexpected `,` in pattern
3434
LL | Nucleotide::Adenine, Nucleotide::Cytosine, _ => true
3535
| ^
3636
|
37-
help: try adding parentheses to match on a tuple..
37+
help: try adding parentheses to match on a tuple...
3838
|
3939
LL | (Nucleotide::Adenine, Nucleotide::Cytosine, _) => true
4040
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
41-
help: ..or a vertical bar to match on multiple alternatives
41+
help: ...or a vertical bar to match on multiple alternatives
4242
|
4343
LL | Nucleotide::Adenine | Nucleotide::Cytosine | _ => true
4444
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -49,11 +49,11 @@ error: unexpected `,` in pattern
4949
LL | for x, _barr_body in women.iter().map(|woman| woman.allosomes.clone()) {
5050
| ^
5151
|
52-
help: try adding parentheses to match on a tuple..
52+
help: try adding parentheses to match on a tuple...
5353
|
5454
LL | for (x, _barr_body) in women.iter().map(|woman| woman.allosomes.clone()) {
5555
| ^^^^^^^^^^^^^^^
56-
help: ..or a vertical bar to match on multiple alternatives
56+
help: ...or a vertical bar to match on multiple alternatives
5757
|
5858
LL | for x | _barr_body in women.iter().map(|woman| woman.allosomes.clone()) {
5959
| ^^^^^^^^^^^^^^
@@ -64,11 +64,11 @@ error: unexpected `,` in pattern
6464
LL | for x, y @ Allosome::Y(_) in men.iter().map(|man| man.allosomes.clone()) {
6565
| ^
6666
|
67-
help: try adding parentheses to match on a tuple..
67+
help: try adding parentheses to match on a tuple...
6868
|
6969
LL | for (x, y @ Allosome::Y(_)) in men.iter().map(|man| man.allosomes.clone()) {
7070
| ^^^^^^^^^^^^^^^^^^^^^^^
71-
help: ..or a vertical bar to match on multiple alternatives
71+
help: ...or a vertical bar to match on multiple alternatives
7272
|
7373
LL | for x | y @ Allosome::Y(_) in men.iter().map(|man| man.allosomes.clone()) {
7474
| ^^^^^^^^^^^^^^^^^^^^^^
@@ -79,11 +79,11 @@ error: unexpected `,` in pattern
7979
LL | let women, men: (Vec<Genome>, Vec<Genome>) = genomes.iter().cloned()
8080
| ^
8181
|
82-
help: try adding parentheses to match on a tuple..
82+
help: try adding parentheses to match on a tuple...
8383
|
8484
LL | let (women, men): (Vec<Genome>, Vec<Genome>) = genomes.iter().cloned()
8585
| ^^^^^^^^^^^^
86-
help: ..or a vertical bar to match on multiple alternatives
86+
help: ...or a vertical bar to match on multiple alternatives
8787
|
8888
LL | let women | men: (Vec<Genome>, Vec<Genome>) = genomes.iter().cloned()
8989
| ^^^^^^^^^^^

src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ warning: `#[macro_escape]` is a deprecated synonym for `#[macro_use]`
184184
LL | mod inner { #![macro_escape] }
185185
| ^^^^^^^^^^^^^^^^
186186
|
187-
= help: consider an outer attribute, `#[macro_use]` mod ...
187+
= help: try an outer attribute: `#[macro_use]`
188188

189189
warning: use of deprecated attribute `plugin_registrar`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675
190190
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:221:17

src/test/ui/feature-gate/issue-43106-gating-of-macro_escape.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ warning: `#[macro_escape]` is a deprecated synonym for `#[macro_use]`
44
LL | #![macro_escape]
55
| ^^^^^^^^^^^^^^^^
66
|
7-
= help: consider an outer attribute, `#[macro_use]` mod ...
7+
= help: try an outer attribute: `#[macro_use]`
88

0 commit comments

Comments
 (0)