diff options
| author | bors <bors@rust-lang.org> | 2020-08-26 20:31:44 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-08-26 20:31:44 +0000 |
| commit | 2d8a3b9181f41d3af9b9f016c5d73b2553e344bf (patch) | |
| tree | e165cb7eae6fe81601f57b91f8672d1866ec9743 /src/test | |
| parent | 48717b6f3ce661d2a0d64f7bdfdfb5fd3484ee5b (diff) | |
| parent | 8c0128bb02ef528588777bda1e818e72749a7006 (diff) | |
| download | rust-2d8a3b9181f41d3af9b9f016c5d73b2553e344bf.tar.gz rust-2d8a3b9181f41d3af9b9f016c5d73b2553e344bf.zip | |
Auto merge of #75944 - jumbatm:issue-75924-clashing-extern-decl-ice, r=spastorino
Fix ICE on unwrap of unknown layout in ClashingExternDeclarations. Fixes #75924.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/ui/lint/clashing-extern-fn.rs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/test/ui/lint/clashing-extern-fn.rs b/src/test/ui/lint/clashing-extern-fn.rs index d6ac7ccccc7..44cef19b0d3 100644 --- a/src/test/ui/lint/clashing-extern-fn.rs +++ b/src/test/ui/lint/clashing-extern-fn.rs @@ -285,3 +285,26 @@ mod null_optimised_enums { } } } + +#[allow(improper_ctypes)] +mod unknown_layout { + mod a { + extern "C" { + pub fn generic(l: Link<u32>); + } + pub struct Link<T> { + pub item: T, + pub next: *const Link<T>, + } + } + + mod b { + extern "C" { + pub fn generic(l: Link<u32>); + } + pub struct Link<T> { + pub item: T, + pub next: *const Link<T>, + } + } +} |
