mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
Permit ty::Bool in const generics for v0 mangling
This commit is contained in:
parent
154f1f544d
commit
89fdfe6828
@ -504,6 +504,7 @@ impl Printer<'tcx> for SymbolMangler<'tcx> {
|
|||||||
|
|
||||||
match ct.ty.kind() {
|
match ct.ty.kind() {
|
||||||
ty::Uint(_) => {}
|
ty::Uint(_) => {}
|
||||||
|
ty::Bool => {}
|
||||||
_ => {
|
_ => {
|
||||||
bug!("symbol_names: unsupported constant of type `{}` ({:?})", ct.ty, ct);
|
bug!("symbol_names: unsupported constant of type `{}` ({:?})", ct.ty, ct);
|
||||||
}
|
}
|
||||||
|
18
src/test/ui/symbol-names/issue-76365.rs
Normal file
18
src/test/ui/symbol-names/issue-76365.rs
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
// check-pass
|
||||||
|
// revisions: legacy v0
|
||||||
|
//[legacy]compile-flags: -Z symbol-mangling-version=legacy --crate-type=lib
|
||||||
|
//[v0]compile-flags: -Z symbol-mangling-version=v0 --crate-type=lib
|
||||||
|
|
||||||
|
#![feature(min_const_generics)]
|
||||||
|
|
||||||
|
pub struct Bar<const F: bool>;
|
||||||
|
|
||||||
|
impl Bar<true> {
|
||||||
|
pub fn foo() {}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl<const F: bool> Bar<F> {
|
||||||
|
pub fn bar() {}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn main() {}
|
Loading…
Reference in New Issue
Block a user