Skip to content

Commit eff6398

Browse files
Rollup merge of #77452 - Mark-Simulacrum:fix-symbol-v0, r=eddyb
Permit ty::Bool in const generics for v0 mangling This should unbreak using new-symbol-mangling = true in config.toml (once it lands in beta anyway). Fixes #76365 (well, it will, but seems fine to close as soon as we have support) r? @eddyb (for mangling) but I'm okay with some other reviewer too :)
2 parents 23408de + 89fdfe6 commit eff6398

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

compiler/rustc_symbol_mangling/src/v0.rs

+1
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,7 @@ impl Printer<'tcx> for SymbolMangler<'tcx> {
504504

505505
match ct.ty.kind() {
506506
ty::Uint(_) => {}
507+
ty::Bool => {}
507508
_ => {
508509
bug!("symbol_names: unsupported constant of type `{}` ({:?})", ct.ty, ct);
509510
}
+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// check-pass
2+
// revisions: legacy v0
3+
//[legacy]compile-flags: -Z symbol-mangling-version=legacy --crate-type=lib
4+
//[v0]compile-flags: -Z symbol-mangling-version=v0 --crate-type=lib
5+
6+
#![feature(min_const_generics)]
7+
8+
pub struct Bar<const F: bool>;
9+
10+
impl Bar<true> {
11+
pub fn foo() {}
12+
}
13+
14+
impl<const F: bool> Bar<F> {
15+
pub fn bar() {}
16+
}
17+
18+
fn main() {}

0 commit comments

Comments
 (0)