-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #51257 - GuillaumeGomez:rollup, r=GuillaumeGomez
Rollup of 7 pull requests Successful merges: - #49546 (Stabilize short error format) - #51123 (Update build instructions) - #51146 (typeck: Do not pass the field check on field error) - #51193 (Fixes some style issues in rustdoc "implementations on Foreign types") - #51213 (fs: copy: Use File::set_permissions instead of fs::set_permissions) - #51227 (mod.rs isn't beautiful) - #51240 (Two minor parsing tweaks) Failed merges:
- Loading branch information
Showing
15 changed files
with
133 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
// Copyright 2018 The Rust Project Developers. See the COPYRIGHT | ||
// file at the top-level directory of this distribution and at | ||
// http://rust-lang.org/COPYRIGHT. | ||
// | ||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | ||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | ||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your | ||
// option. This file may not be copied, modified, or distributed | ||
// except according to those terms. | ||
|
||
enum SimpleEnum { | ||
NoState, | ||
} | ||
|
||
struct SimpleStruct { | ||
no_state_here: u64, | ||
} | ||
|
||
fn main() { | ||
let _ = |simple| { | ||
match simple { | ||
SimpleStruct { | ||
state: 0, | ||
//~^ struct `SimpleStruct` does not have a field named `state` [E0026] | ||
.. | ||
} => (), | ||
} | ||
}; | ||
|
||
let _ = |simple| { | ||
match simple { | ||
SimpleStruct { | ||
no_state_here: 0, | ||
no_state_here: 1 | ||
//~^ ERROR field `no_state_here` bound multiple times in the pattern [E0025] | ||
} => (), | ||
} | ||
}; | ||
|
||
let _ = |simple| { | ||
match simple { | ||
SimpleEnum::NoState { | ||
state: 0 | ||
//~^ ERROR variant `SimpleEnum::NoState` does not have a field named `state` [E0026] | ||
} => (), | ||
} | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
error[E0026]: struct `SimpleStruct` does not have a field named `state` | ||
--> $DIR/issue-51102.rs:23:17 | ||
| | ||
LL | state: 0, | ||
| ^^^^^^^^ struct `SimpleStruct` does not have this field | ||
|
||
error[E0025]: field `no_state_here` bound multiple times in the pattern | ||
--> $DIR/issue-51102.rs:34:17 | ||
| | ||
LL | no_state_here: 0, | ||
| ---------------- first use of `no_state_here` | ||
LL | no_state_here: 1 | ||
| ^^^^^^^^^^^^^^^^ multiple uses of `no_state_here` in pattern | ||
|
||
error[E0026]: variant `SimpleEnum::NoState` does not have a field named `state` | ||
--> $DIR/issue-51102.rs:43:17 | ||
| | ||
LL | state: 0 | ||
| ^^^^^^^^ variant `SimpleEnum::NoState` does not have this field | ||
|
||
error: aborting due to 3 previous errors | ||
|
||
Some errors occurred: E0025, E0026. | ||
For more information about an error, try `rustc --explain E0025`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
$DIR/short-error-format.rs:16:9 - error[E0308]: mismatched types | ||
$DIR/short-error-format.rs:18:7 - error[E0599]: no method named `salut` found for type `u32` in the current scope | ||
$DIR/short-error-format.rs:16:9: error[E0308]: mismatched types | ||
$DIR/short-error-format.rs:18:7: error[E0599]: no method named `salut` found for type `u32` in the current scope | ||
error: aborting due to 2 previous errors |