-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
structural_match: non-structural-match ty closures
This commit adds a `Closure` variant to `NonStructuralMatchTy` in `structural_match`, fixing an ICE which can occur when `impl_trait_in_bindings` is used with constants. Signed-off-by: David Wood <david@davidtw.co>
- Loading branch information
Showing
4 changed files
with
28 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// check-pass | ||
|
||
#![feature(impl_trait_in_bindings)] | ||
//~^ WARN the feature `impl_trait_in_bindings` is incomplete | ||
|
||
const _: impl Fn() = ||(); | ||
|
||
fn main() {} |
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,11 @@ | ||
warning: the feature `impl_trait_in_bindings` is incomplete and may not be safe to use and/or cause compiler crashes | ||
--> $DIR/impl-trait-in-bindings-issue-73003.rs:3:12 | ||
| | ||
LL | #![feature(impl_trait_in_bindings)] | ||
| ^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: `#[warn(incomplete_features)]` on by default | ||
= note: see issue #63065 <https://github.com/rust-lang/rust/issues/63065> for more information | ||
|
||
warning: 1 warning emitted | ||
|