Skip to content

Commit babf77b

Browse files
committed
Add splat mangling bug tests (flaky?)
1 parent 31015cd commit babf77b

2 files changed

Lines changed: 22 additions & 0 deletions

File tree

tests/ui/splat/splat-mangling.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
//! Test that splat is used in symbol mangling.
2+
//@ build-fail
3+
//@ incremental
4+
//@ compile-flags: -C opt-level=0
5+
6+
#![allow(incomplete_features)]
7+
#![feature(splat)]
8+
9+
fn main() {
10+
// Bug #158603 regression test variants
11+
#[rustfmt::skip]
12+
let _x: fn(#[splat] (i32,)) = None.unwrap();
13+
14+
//@ regex-error-pattern: symbol `.*Option.*unwrap.*splat_mangling` is already defined
15+
//~? ERROR: is already defined
16+
let x: fn((i32,)) = None.unwrap();
17+
x((1,));
18+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
error: symbol `_RNvMNtCsCRATE_HASH_4core6optionINtB2_6OptionFTlEEuE6unwrapCsCRATE_HASH_14splat_mangling` is already defined
2+
3+
error: aborting due to 1 previous error
4+

0 commit comments

Comments
 (0)