forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 7
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#118919 - matthiaskrgr:rollup-02udckl, r=matth…
…iaskrgr Rollup of 4 pull requests Successful merges: - rust-lang#118759 (Support bare unit structs in destructuring assignments) - rust-lang#118871 (Coroutine variant fields can be uninitialized) - rust-lang#118883 (Change a typo mistake in the-doc-attribute.md) - rust-lang#118906 (Fix LLD thread flags in bootstrap on Windows) r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
20 changed files
with
121 additions
and
49 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
8 changes: 5 additions & 3 deletions
8
tests/ui/async-await/in-trait/indirect-recursion-issue-112047.stderr
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,37 @@ | ||
// Test that uninhabited saved local doesn't make the entire variant uninhabited. | ||
// run-pass | ||
#![allow(unused)] | ||
#![feature(assert_matches)] | ||
#![feature(coroutine_trait)] | ||
#![feature(coroutines)] | ||
#![feature(never_type)] | ||
use std::assert_matches::assert_matches; | ||
use std::ops::Coroutine; | ||
use std::ops::CoroutineState; | ||
use std::pin::Pin; | ||
|
||
fn conjure<T>() -> T { loop {} } | ||
|
||
fn run<T>(x: bool, y: bool) { | ||
let mut c = || { | ||
if x { | ||
let a : T; | ||
if y { | ||
a = conjure::<T>(); | ||
} | ||
yield (); | ||
} else { | ||
let a : T; | ||
if y { | ||
a = conjure::<T>(); | ||
} | ||
yield (); | ||
} | ||
}; | ||
assert_matches!(Pin::new(&mut c).resume(()), CoroutineState::Yielded(())); | ||
assert_matches!(Pin::new(&mut c).resume(()), CoroutineState::Complete(())); | ||
} | ||
|
||
fn main() { | ||
run::<!>(false, false); | ||
} |
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
4 changes: 4 additions & 0 deletions
4
tests/ui/destructuring-assignment/non-exhaustive-destructure.rs
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,4 @@ | ||
fn main() { | ||
None = Some(3); | ||
//~^ ERROR refutable pattern in local binding | ||
} |
17 changes: 17 additions & 0 deletions
17
tests/ui/destructuring-assignment/non-exhaustive-destructure.stderr
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,17 @@ | ||
error[E0005]: refutable pattern in local binding | ||
--> $DIR/non-exhaustive-destructure.rs:2:5 | ||
| | ||
LL | None = Some(3); | ||
| ^^^^ pattern `Some(_)` not covered | ||
| | ||
= note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant | ||
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html | ||
= note: the matched value is of type `Option<i32>` | ||
help: you might want to use `if let` to ignore the variant that isn't matched | ||
| | ||
LL | if None = Some(3) { todo!() }; | ||
| ++ +++++++++++ | ||
|
||
error: aborting due to 1 previous error | ||
|
||
For more information about this error, try `rustc --explain E0005`. |
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