diff options
| author | Dylan DPC <dylan.dpc@gmail.com> | 2020-04-05 13:13:14 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-05 13:13:14 +0200 |
| commit | 31b8d65803c88e4e267b3aedb81164bf63ef99f3 (patch) | |
| tree | 63d42c0cdf224a25a8bea5be1c6cfc2cc190555c /src/test | |
| parent | c185c4fe4740227100c869da44825ca6eb80be74 (diff) | |
| parent | e52a4519131bccc732f53ec13582016bb2b1d04a (diff) | |
Rollup merge of #70806 - RalfJung:miri-assignment-check, r=eddyb
fix Miri assignment sanity check Thanks @eddyb for pointing me to the right APIs! r? @eddyb Fixes https://github.com/rust-lang/rust/issues/70804
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/ui/consts/const-eval/issue-70804-fn-subtyping.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/ui/consts/const-eval/issue-70804-fn-subtyping.rs b/src/test/ui/consts/const-eval/issue-70804-fn-subtyping.rs new file mode 100644 index 00000000000..59d46ea66c9 --- /dev/null +++ b/src/test/ui/consts/const-eval/issue-70804-fn-subtyping.rs @@ -0,0 +1,10 @@ +// check-pass +#![feature(const_fn)] + +const fn nested(x: (for<'a> fn(&'a ()), String)) -> (fn(&'static ()), String) { + x +} + +pub const TEST: (fn(&'static ()), String) = nested((|_x| (), String::new())); + +fn main() {} |
