From 698f8c2f01ea549d77d7dc3338a12e04c11057b9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:02:58 +0200 Subject: Adding upstream version 1.64.0+dfsg1. Signed-off-by: Daniel Baumann --- src/test/ui/symbol-names/const-generics.rs | 85 ++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 src/test/ui/symbol-names/const-generics.rs (limited to 'src/test/ui/symbol-names/const-generics.rs') diff --git a/src/test/ui/symbol-names/const-generics.rs b/src/test/ui/symbol-names/const-generics.rs new file mode 100644 index 000000000..1242126e0 --- /dev/null +++ b/src/test/ui/symbol-names/const-generics.rs @@ -0,0 +1,85 @@ +// check-pass +// revisions: legacy v0 +//[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 + +// `char` +pub struct Char; + +impl Char<'A'> { + pub fn foo() {} +} + +impl Char { + pub fn bar() {} +} + +// `i8` +pub struct I8; + +impl I8<{i8::MIN}> { + pub fn foo() {} +} + +impl I8<{i8::MAX}> { + pub fn foo() {} +} + +impl I8 { + pub fn bar() {} +} + +// `i16` +pub struct I16; + +impl I16<{i16::MIN}> { + pub fn foo() {} +} + +impl I16 { + pub fn bar() {} +} + +// `i32` +pub struct I32; + +impl I32<{i32::MIN}> { + pub fn foo() {} +} + +impl I32 { + pub fn bar() {} +} + +// `i64` +pub struct I64; + +impl I64<{i64::MIN}> { + pub fn foo() {} +} + +impl I64 { + pub fn bar() {} +} + +// `i128` +pub struct I128; + +impl I128<{i128::MIN}> { + pub fn foo() {} +} + +impl I128 { + pub fn bar() {} +} + +// `isize` +pub struct ISize; + +impl ISize<3> { + pub fn foo() {} +} + +impl ISize { + pub fn bar() {} +} -- cgit v1.2.3