-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
While working on PR #63934, I accidentally reverted to an older version of the PR while working on a rebase. The PR was then merged, not with the later, approved changes, but with earlier, unapproved changes. This PR applies the changes that were *suppoesd* to be mereged in PR #63934. All of the proper tests appear to have been merged in PR #63934, so this PR adds no new tests Fixes #66580
- Loading branch information
Showing
2 changed files
with
52 additions
and
15 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
19 changes: 19 additions & 0 deletions
19
src/test/ui/type-alias-impl-trait/issue-66580-closure-coherence.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,19 @@ | ||
// Regression test for issue #66580 | ||
// Ensures that we don't try to determine whether a closure | ||
// is foreign when it's the underlying type of an opaque type | ||
// check-pass | ||
#![feature(type_alias_impl_trait)] | ||
|
||
type Closure = impl FnOnce(); | ||
|
||
fn closure() -> Closure { | ||
|| {} | ||
} | ||
|
||
struct Wrap<T> { f: T } | ||
|
||
impl Wrap<Closure> {} | ||
|
||
impl<T> Wrap<T> {} | ||
|
||
fn main() {} |