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>
This commit is contained in:
David Wood 2020-06-14 19:16:35 +01:00
parent 4fb54ed484
commit 79e08bbc99
No known key found for this signature in database
GPG key ID: 2592E76C87381FD9
4 changed files with 28 additions and 1 deletions

View file

@ -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() {}

View file

@ -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