diff options
| author | bors <bors@rust-lang.org> | 2022-08-30 08:29:42 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-08-30 08:29:42 +0000 |
| commit | 0631ea5d73f4a3199c776687b12c20c50a91f0d2 (patch) | |
| tree | 59e751484047303e15b3c32cf0b545eac02e59af /src/test/codegen | |
| parent | a0d07093f80a0206f42d3dbada66212eda52b694 (diff) | |
| parent | ec95a929044afad3cfad99231378a27870a9e28c (diff) | |
| download | rust-0631ea5d73f4a3199c776687b12c20c50a91f0d2.tar.gz rust-0631ea5d73f4a3199c776687b12c20c50a91f0d2.zip | |
Auto merge of #101183 - Dylan-DPC:rollup-6kewixv, r=Dylan-DPC
Rollup of 9 pull requests
Successful merges:
- #95376 (Add `vec::Drain{,Filter}::keep_rest`)
- #100092 (Fall back when relating two opaques by substs in MIR typeck)
- #101019 (Suggest returning closure as `impl Fn`)
- #101022 (Erase late bound regions before comparing types in `suggest_dereferences`)
- #101101 (interpret: make read-pointer-as-bytes a CTFE-only error with extra information)
- #101123 (Remove `register_attr` feature)
- #101175 (Don't --bless in pre-push hook)
- #101176 (rustdoc: remove unused CSS selectors for `.table-display`)
- #101180 (Add another MaybeUninit array test with const)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'src/test/codegen')
| -rw-r--r-- | src/test/codegen/issue-96274.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/codegen/issue-96274.rs b/src/test/codegen/issue-96274.rs index e3abf730961..28bfcce0d7b 100644 --- a/src/test/codegen/issue-96274.rs +++ b/src/test/codegen/issue-96274.rs @@ -2,6 +2,7 @@ // compile-flags: -O #![crate_type = "lib"] +#![feature(inline_const)] use std::mem::MaybeUninit; @@ -9,3 +10,8 @@ pub fn maybe_uninit() -> [MaybeUninit<u8>; 3000] { // CHECK-NOT: memset [MaybeUninit::uninit(); 3000] } + +pub fn maybe_uninit_const<T>() -> [MaybeUninit<T>; 8192] { + // CHECK-NOT: memset + [const { MaybeUninit::uninit() }; 8192] +} |
