2020-10-04 23:28:05 +00:00
|
|
|
// check-pass
|
|
|
|
// revisions: legacy v0
|
2021-10-21 12:57:14 +00:00
|
|
|
//[legacy]compile-flags: -Z unstable-options -C symbol-mangling-version=legacy --crate-type=lib
|
|
|
|
//[v0]compile-flags: -C symbol-mangling-version=v0 --crate-type=lib
|
2020-10-04 23:28:05 +00:00
|
|
|
|
2020-11-17 10:44:21 +00:00
|
|
|
// `char`
|
|
|
|
pub struct Char<const F: char>;
|
2020-10-04 23:28:05 +00:00
|
|
|
|
2020-11-17 10:44:21 +00:00
|
|
|
impl Char<'A'> {
|
|
|
|
pub fn foo() {}
|
|
|
|
}
|
2020-10-04 23:28:05 +00:00
|
|
|
|
2020-11-17 10:44:21 +00:00
|
|
|
impl<const F: char> Char<F> {
|
|
|
|
pub fn bar() {}
|
|
|
|
}
|
2020-10-04 23:28:05 +00:00
|
|
|
|
2020-11-17 10:44:21 +00:00
|
|
|
// `i8`
|
|
|
|
pub struct I8<const F: i8>;
|
2020-10-04 23:28:05 +00:00
|
|
|
|
2020-11-17 10:44:21 +00:00
|
|
|
impl I8<{i8::MIN}> {
|
|
|
|
pub fn foo() {}
|
|
|
|
}
|
2020-10-04 23:28:05 +00:00
|
|
|
|
2020-11-17 10:44:21 +00:00
|
|
|
impl I8<{i8::MAX}> {
|
|
|
|
pub fn foo() {}
|
|
|
|
}
|
2020-10-04 23:28:05 +00:00
|
|
|
|
2020-11-17 10:44:21 +00:00
|
|
|
impl<const F: i8> I8<F> {
|
|
|
|
pub fn bar() {}
|
|
|
|
}
|
2020-10-04 23:28:05 +00:00
|
|
|
|
2020-11-17 10:44:21 +00:00
|
|
|
// `i16`
|
|
|
|
pub struct I16<const F: i16>;
|
2020-10-04 23:28:05 +00:00
|
|
|
|
2020-11-17 10:44:21 +00:00
|
|
|
impl I16<{i16::MIN}> {
|
|
|
|
pub fn foo() {}
|
|
|
|
}
|
2020-10-04 23:28:05 +00:00
|
|
|
|
2020-11-17 10:44:21 +00:00
|
|
|
impl<const F: i16> I16<F> {
|
|
|
|
pub fn bar() {}
|
|
|
|
}
|
2020-10-04 23:28:05 +00:00
|
|
|
|
2020-11-17 10:44:21 +00:00
|
|
|
// `i32`
|
|
|
|
pub struct I32<const F: i32>;
|
2020-10-04 23:28:05 +00:00
|
|
|
|
2020-11-17 10:44:21 +00:00
|
|
|
impl I32<{i32::MIN}> {
|
|
|
|
pub fn foo() {}
|
|
|
|
}
|
2020-10-04 23:28:05 +00:00
|
|
|
|
2020-11-17 10:44:21 +00:00
|
|
|
impl<const F: i32> I32<F> {
|
|
|
|
pub fn bar() {}
|
|
|
|
}
|
2020-10-04 23:28:05 +00:00
|
|
|
|
2020-11-17 10:44:21 +00:00
|
|
|
// `i64`
|
|
|
|
pub struct I64<const F: i64>;
|
2020-10-04 23:28:05 +00:00
|
|
|
|
2020-11-17 10:44:21 +00:00
|
|
|
impl I64<{i64::MIN}> {
|
|
|
|
pub fn foo() {}
|
|
|
|
}
|
2020-10-04 23:28:05 +00:00
|
|
|
|
2020-11-17 10:44:21 +00:00
|
|
|
impl<const F: i64> I64<F> {
|
|
|
|
pub fn bar() {}
|
|
|
|
}
|
2020-10-04 23:28:05 +00:00
|
|
|
|
2020-11-17 10:44:21 +00:00
|
|
|
// `i128`
|
|
|
|
pub struct I128<const F: i128>;
|
2020-10-04 23:28:05 +00:00
|
|
|
|
2020-11-17 10:44:21 +00:00
|
|
|
impl I128<{i128::MIN}> {
|
|
|
|
pub fn foo() {}
|
|
|
|
}
|
2020-10-04 23:28:05 +00:00
|
|
|
|
2020-11-17 10:44:21 +00:00
|
|
|
impl<const F: i128> I128<F> {
|
|
|
|
pub fn bar() {}
|
|
|
|
}
|
2020-10-04 23:28:05 +00:00
|
|
|
|
2020-11-17 10:44:21 +00:00
|
|
|
// `isize`
|
|
|
|
pub struct ISize<const F: isize>;
|
2020-10-04 23:28:05 +00:00
|
|
|
|
2020-11-17 10:44:21 +00:00
|
|
|
impl ISize<3> {
|
|
|
|
pub fn foo() {}
|
|
|
|
}
|
2020-10-04 23:28:05 +00:00
|
|
|
|
2020-11-17 10:44:21 +00:00
|
|
|
impl<const F: isize> ISize<F> {
|
|
|
|
pub fn bar() {}
|
|
|
|
}
|