forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
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 rust-lang#71151 - Dylan-DPC:rollup-6rt4h7b, r=Dylan-DPC
Rollup of 8 pull requests Successful merges: - rust-lang#70657 (Allow `try`-blocks in places where an open delim is expected) - rust-lang#70947 (tighten CTFE safety net for accesses to globals) - rust-lang#70949 (simplify `vec!` macro) - rust-lang#71002 (fix target & runtool args order) - rust-lang#71082 (ptr: introduce len() method on raw slices) - rust-lang#71128 (Remove unused single_step flag) - rust-lang#71133 (Tighten time complexity on the doc of sort_by_key) - rust-lang#71135 (Update books) Failed merges: r? @ghost
- Loading branch information
Showing
25 changed files
with
222 additions
and
50 deletions.
There are no files selected for viewing
Submodule book
updated
14 files
Submodule edition-guide
updated
1 files
+2 −2 | src/rust-2018/platform-and-target-support/musl-support-for-fully-static-binaries.md |
Submodule reference
updated
17 files
+5 −2 | .github/workflows/main.yml | |
+7 −0 | CONTRIBUTING.md | |
+80 −0 | STYLE.md | |
+3 −0 | src/attributes.md | |
+6 −3 | src/attributes/codegen.md | |
+9 −0 | src/attributes/derive.md | |
+5 −5 | src/behavior-considered-undefined.md | |
+0 −2 | src/expressions.md | |
+7 −3 | src/expressions/loop-expr.md | |
+1 −1 | src/items/unions.md | |
+2 −6 | src/items/use-declarations.md | |
+12 −5 | src/type-layout.md | |
+2 −2 | src/types/never.md | |
+10 −3 | src/visibility-and-privacy.md | |
+3 −1 | stable-check/Cargo.lock | |
+2 −5 | stable-check/src/main.rs | |
+0 −28 | tests/linkcheck.sh |
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
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 |
---|---|---|
@@ -1,7 +1,11 @@ | ||
// run-pass | ||
// compile-flags: --edition 2018 | ||
|
||
#![feature(try_blocks)] | ||
|
||
fn main() { | ||
match try { false } { _ => {} } //~ ERROR expected expression, found reserved keyword `try` | ||
match try { } { | ||
Err(()) => (), | ||
Ok(()) => (), | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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,8 +1,11 @@ | ||
error: expected expression, found reserved keyword `try` | ||
--> $DIR/try-block-in-while.rs:6:11 | ||
error[E0277]: the trait bound `bool: std::ops::Try` is not satisfied | ||
--> $DIR/try-block-in-while.rs:6:15 | ||
| | ||
LL | while try { false } {} | ||
| ^^^ expected expression | ||
| ^^^^^^^^^ the trait `std::ops::Try` is not implemented for `bool` | ||
| | ||
= note: required by `std::ops::Try::from_ok` | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0277`. |
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,28 @@ | ||
// check-pass | ||
// compile-flags: --edition 2018 | ||
|
||
#![feature(try_blocks)] | ||
#![warn(unused_parens, unused_braces)] | ||
|
||
fn consume<T>(_: Result<T, T>) -> T { todo!() } | ||
|
||
fn main() { | ||
consume((try {})); | ||
//~^ WARN unnecessary parentheses | ||
|
||
consume({ try {} }); | ||
//~^ WARN unnecessary braces | ||
|
||
match (try {}) { | ||
//~^ WARN unnecessary parentheses | ||
Ok(()) | Err(()) => (), | ||
} | ||
|
||
if let Err(()) = (try {}) {} | ||
//~^ WARN unnecessary parentheses | ||
|
||
match (try {}) { | ||
//~^ WARN unnecessary parentheses | ||
Ok(()) | Err(()) => (), | ||
} | ||
} |
Oops, something went wrong.