diff options
| author | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2020-04-04 21:26:34 +0300 |
|---|---|---|
| committer | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2020-04-14 20:03:18 +0300 |
| commit | 89890294764fd0a3ff286167cc07d04e6b970336 (patch) | |
| tree | 4c974d7dbadf79c7d519b799517a58e8f768bc7e /src/test | |
| parent | ad1617bb490a57988a5d8112b698ad3fdb80e42e (diff) | |
| download | rust-89890294764fd0a3ff286167cc07d04e6b970336.tar.gz rust-89890294764fd0a3ff286167cc07d04e6b970336.zip | |
borrow_check/type_check: normalize `Aggregate` and `Call` operands.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/ui/consts/issue-70773-mir-typeck-lt-norm.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/ui/consts/issue-70773-mir-typeck-lt-norm.rs b/src/test/ui/consts/issue-70773-mir-typeck-lt-norm.rs new file mode 100644 index 00000000000..07af8310424 --- /dev/null +++ b/src/test/ui/consts/issue-70773-mir-typeck-lt-norm.rs @@ -0,0 +1,15 @@ +// run-pass + +const HASH_LEN: usize = 20; +struct Hash([u8; HASH_LEN]); +fn init_hash(_: &mut [u8; HASH_LEN]) {} + +fn foo<'a>() -> &'a () { + Hash([0; HASH_LEN]); + init_hash(&mut [0; HASH_LEN]); + &() +} + +fn main() { + foo(); +} |
