diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-10-22 00:14:01 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-22 00:14:01 +0200 |
| commit | db4696a546caa4fe216b37ee5d858e2592528d48 (patch) | |
| tree | af9fab477bbe4cb02735a22008ed1ae132db990d /src/test | |
| parent | b21eb5e5ba9b5ddc73780415c9e0e8c8e07f5a07 (diff) | |
| parent | 353ef694fbd95f65212752365241eb3cd9dab4aa (diff) | |
| download | rust-db4696a546caa4fe216b37ee5d858e2592528d48.tar.gz rust-db4696a546caa4fe216b37ee5d858e2592528d48.zip | |
Rollup merge of #103341 - Rageking8:add-test-for-issue-97607, r=compiler-errors
Add test for issue 97607 Fixes #97607 r? ``@compiler-errors`` Not sure which UI test dir to put this under, kindly let me know of a better dir if necessary and I will change it. Thanks.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/ui/closures/issue-97607.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/ui/closures/issue-97607.rs b/src/test/ui/closures/issue-97607.rs new file mode 100644 index 00000000000..74c910ad0bb --- /dev/null +++ b/src/test/ui/closures/issue-97607.rs @@ -0,0 +1,12 @@ +// check-pass +#[allow(unused)] + +fn test<T, F, U>(f: F) -> Box<dyn Fn(T) -> U + 'static> +where + F: 'static + Fn(T) -> U, + for<'a> U: 'a, // < This is the problematic line, see #97607 +{ + Box::new(move |t| f(t)) +} + +fn main() {} |
