diff options
Diffstat (limited to 'tests/ui/c-variadic/issue-86053-2.rs')
-rw-r--r-- | tests/ui/c-variadic/issue-86053-2.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/c-variadic/issue-86053-2.rs b/tests/ui/c-variadic/issue-86053-2.rs new file mode 100644 index 000000000..c545831f7 --- /dev/null +++ b/tests/ui/c-variadic/issue-86053-2.rs @@ -0,0 +1,11 @@ +// Regression test for the ICE caused by the example in +// https://github.com/rust-lang/rust/issues/86053#issuecomment-855672258 + +#![feature(c_variadic)] + +trait H<T> {} + +unsafe extern "C" fn ordering4<'a, F: H<&'static &'a ()>>(_: (), ...) {} +//~^ ERROR: in type `&'static &'a ()`, reference has a longer lifetime than the data it references [E0491] + +fn main() {} |