diff options
| author | bors <bors@rust-lang.org> | 2015-10-28 13:16:14 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-10-28 13:16:14 +0000 |
| commit | a4fa0657f282b8dc06ea1cf873d02d94e73b4dd4 (patch) | |
| tree | 281dd74d1fb5953971aadc4f642c15585a156793 /src/test | |
| parent | 7e3c8cf17cb069f3178b0927cea2caae06a9f89a (diff) | |
| parent | 7f772bb84ef8ba1f986525733c505f71e876fb7c (diff) | |
| download | rust-a4fa0657f282b8dc06ea1cf873d02d94e73b4dd4.tar.gz rust-a4fa0657f282b8dc06ea1cf873d02d94e73b4dd4.zip | |
Auto merge of #29409 - arielb1:recursive-arrays, r=eddyb
when evaluating a recursive type, the `type_of` of the interior could be still in progress, so trying to get its size would cause an ICE. Fixes #19001 r? @eddyb
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/run-pass/issue-19001.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/run-pass/issue-19001.rs b/src/test/run-pass/issue-19001.rs new file mode 100644 index 00000000000..3340ed1ffd9 --- /dev/null +++ b/src/test/run-pass/issue-19001.rs @@ -0,0 +1,19 @@ +// Copyright 2015 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// check that we handle recursive arrays correctly in `type_of` + +struct Loopy { + ptr: *mut [Loopy; 1] +} + +fn main() { + let _t = Loopy { ptr: 0 as *mut _ }; +} |
