Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 5 pull requests #68272

Merged
merged 21 commits into from
Jan 16, 2020
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/librustc_parse/parser/pat.rs
Original file line number Diff line number Diff line change
@@ -209,13 +209,13 @@ impl<'a> Parser<'a> {
if let Ok(seq_snippet) = self.span_to_snippet(seq_span) {
err.span_suggestion(
seq_span,
"try adding parentheses to match on a tuple..",
"try adding parentheses to match on a tuple...",
format!("({})", seq_snippet),
Applicability::MachineApplicable,
)
.span_suggestion(
seq_span,
"..or a vertical bar to match on multiple alternatives",
"...or a vertical bar to match on multiple alternatives",
format!("{}", seq_snippet.replace(",", " |")),
Applicability::MachineApplicable,
);
2 changes: 1 addition & 1 deletion src/librustc_resolve/build_reduced_graph.rs
Original file line number Diff line number Diff line change
@@ -1057,7 +1057,7 @@ impl<'a, 'b> BuildReducedGraphVisitor<'a, 'b> {
let msg = "`#[macro_escape]` is a deprecated synonym for `#[macro_use]`";
let mut err = self.r.session.struct_span_warn(attr.span, msg);
if let ast::AttrStyle::Inner = attr.style {
err.help("consider an outer attribute, `#[macro_use]` mod ...").emit();
err.help("try an outer attribute: `#[macro_use]`").emit();
} else {
err.emit();
}
Original file line number Diff line number Diff line change
@@ -4,5 +4,5 @@ warning: `#[macro_escape]` is a deprecated synonym for `#[macro_use]`
LL | #![macro_escape]
| ^^^^^^^^^^^^^^^^
|
= help: consider an outer attribute, `#[macro_use]` mod ...
= help: try an outer attribute: `#[macro_use]`

Original file line number Diff line number Diff line change
@@ -4,11 +4,11 @@ error: unexpected `,` in pattern
LL | while let b1, b2, b3 = reading_frame.next().expect("there should be a start codon") {
| ^
|
help: try adding parentheses to match on a tuple..
help: try adding parentheses to match on a tuple...
|
LL | while let (b1, b2, b3) = reading_frame.next().expect("there should be a start codon") {
| ^^^^^^^^^^^^
help: ..or a vertical bar to match on multiple alternatives
help: ...or a vertical bar to match on multiple alternatives
|
LL | while let b1 | b2 | b3 = reading_frame.next().expect("there should be a start codon") {
| ^^^^^^^^^^^^
@@ -19,11 +19,11 @@ error: unexpected `,` in pattern
LL | if let b1, b2, b3 = reading_frame.next().unwrap() {
| ^
|
help: try adding parentheses to match on a tuple..
help: try adding parentheses to match on a tuple...
|
LL | if let (b1, b2, b3) = reading_frame.next().unwrap() {
| ^^^^^^^^^^^^
help: ..or a vertical bar to match on multiple alternatives
help: ...or a vertical bar to match on multiple alternatives
|
LL | if let b1 | b2 | b3 = reading_frame.next().unwrap() {
| ^^^^^^^^^^^^
@@ -34,11 +34,11 @@ error: unexpected `,` in pattern
LL | Nucleotide::Adenine, Nucleotide::Cytosine, _ => true
| ^
|
help: try adding parentheses to match on a tuple..
help: try adding parentheses to match on a tuple...
|
LL | (Nucleotide::Adenine, Nucleotide::Cytosine, _) => true
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: ..or a vertical bar to match on multiple alternatives
help: ...or a vertical bar to match on multiple alternatives
|
LL | Nucleotide::Adenine | Nucleotide::Cytosine | _ => true
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -49,11 +49,11 @@ error: unexpected `,` in pattern
LL | for x, _barr_body in women.iter().map(|woman| woman.allosomes.clone()) {
| ^
|
help: try adding parentheses to match on a tuple..
help: try adding parentheses to match on a tuple...
|
LL | for (x, _barr_body) in women.iter().map(|woman| woman.allosomes.clone()) {
| ^^^^^^^^^^^^^^^
help: ..or a vertical bar to match on multiple alternatives
help: ...or a vertical bar to match on multiple alternatives
|
LL | for x | _barr_body in women.iter().map(|woman| woman.allosomes.clone()) {
| ^^^^^^^^^^^^^^
@@ -64,11 +64,11 @@ error: unexpected `,` in pattern
LL | for x, y @ Allosome::Y(_) in men.iter().map(|man| man.allosomes.clone()) {
| ^
|
help: try adding parentheses to match on a tuple..
help: try adding parentheses to match on a tuple...
|
LL | for (x, y @ Allosome::Y(_)) in men.iter().map(|man| man.allosomes.clone()) {
| ^^^^^^^^^^^^^^^^^^^^^^^
help: ..or a vertical bar to match on multiple alternatives
help: ...or a vertical bar to match on multiple alternatives
|
LL | for x | y @ Allosome::Y(_) in men.iter().map(|man| man.allosomes.clone()) {
| ^^^^^^^^^^^^^^^^^^^^^^
@@ -79,11 +79,11 @@ error: unexpected `,` in pattern
LL | let women, men: (Vec<Genome>, Vec<Genome>) = genomes.iter().cloned()
| ^
|
help: try adding parentheses to match on a tuple..
help: try adding parentheses to match on a tuple...
|
LL | let (women, men): (Vec<Genome>, Vec<Genome>) = genomes.iter().cloned()
| ^^^^^^^^^^^^
help: ..or a vertical bar to match on multiple alternatives
help: ...or a vertical bar to match on multiple alternatives
|
LL | let women | men: (Vec<Genome>, Vec<Genome>) = genomes.iter().cloned()
| ^^^^^^^^^^^
Original file line number Diff line number Diff line change
@@ -184,7 +184,7 @@ warning: `#[macro_escape]` is a deprecated synonym for `#[macro_use]`
LL | mod inner { #![macro_escape] }
| ^^^^^^^^^^^^^^^^
|
= help: consider an outer attribute, `#[macro_use]` mod ...
= help: try an outer attribute: `#[macro_use]`

warning: use of deprecated attribute `plugin_registrar`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:221:17
Original file line number Diff line number Diff line change
@@ -4,5 +4,5 @@ warning: `#[macro_escape]` is a deprecated synonym for `#[macro_use]`
LL | #![macro_escape]
| ^^^^^^^^^^^^^^^^
|
= help: consider an outer attribute, `#[macro_use]` mod ...
= help: try an outer attribute: `#[macro_use]`