I tried this code:
#![allow(incomplete_features)]
#![feature(splat)]
fn main() {
#[rustfmt::skip]
let _x: fn(#[splat] (i32,)) = None.unwrap();
let x: fn((i32,)) = None.unwrap();
x((1,));
}
These directives seem to increase the chance of the error:
//@ incremental
//@ compile-flags: -C opt-level=0
I expected to see this happen:
No symbol clashes, either the symbol data is the same (and therefore merged), or it is different, and mangled differently.
Instead, this happened:
When I rebuild the file multiple times with small changes, I eventually get:
error: symbol `_RNvMNtCsCRATE_HASH_4core6optionINtB2_6OptionFTlEEuE6unwrapCsCRATE_HASH_14splat_mangling` is already defined
Meta
rustc version:
git main commit f46ec5218fe
In #153697, we decided not to include splat in symbol mangling. This is likely the cause of this error.
@rustbot label +C-bug +F-splat +T-compiler
cc @oli-obk
I tried this code:
These directives seem to increase the chance of the error:
I expected to see this happen:
No symbol clashes, either the symbol data is the same (and therefore merged), or it is different, and mangled differently.
Instead, this happened:
When I rebuild the file multiple times with small changes, I eventually get:
Meta
rustc version:
In #153697, we decided not to include splat in symbol mangling. This is likely the cause of this error.
@rustbot label +C-bug +F-splat +T-compiler
cc @oli-obk