Skip to content

Commit 89fdfe6

Browse files
Permit ty::Bool in const generics for v0 mangling
1 parent 154f1f5 commit 89fdfe6

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)