-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: add v0
&str
const value demangling test.
- Loading branch information
Showing
2 changed files
with
154 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// build-fail | ||
// compile-flags: -Z symbol-mangling-version=v0 --crate-name=c | ||
#![feature(const_generics, rustc_attrs)] | ||
#![allow(incomplete_features)] | ||
|
||
pub struct Str<const S: &'static str>; | ||
|
||
#[rustc_symbol_name] | ||
//~^ ERROR symbol-name(_RMCsno73SFvQKx_1cINtB0_3StrKRe616263_E) | ||
//~| ERROR demangling(<c[464da6a86cb672f]::Str<"abc">>) | ||
//~| ERROR demangling-alt(<c::Str<"abc">>) | ||
impl Str<"abc"> {} | ||
|
||
#[rustc_symbol_name] | ||
//~^ ERROR symbol-name(_RMs_Csno73SFvQKx_1cINtB2_3StrKRe27_E) | ||
//~| ERROR demangling(<c[464da6a86cb672f]::Str<"'">>) | ||
//~| ERROR demangling-alt(<c::Str<"'">>) | ||
impl Str<"'"> {} | ||
|
||
#[rustc_symbol_name] | ||
//~^ ERROR symbol-name(_RMs0_Csno73SFvQKx_1cINtB3_3StrKRe090a_E) | ||
//~| ERROR demangling(<c[464da6a86cb672f]::Str<"\t\n">>) | ||
//~| ERROR demangling-alt(<c::Str<"\t\n">>) | ||
impl Str<"\t\n"> {} | ||
|
||
#[rustc_symbol_name] | ||
//~^ ERROR symbol-name(_RMs1_Csno73SFvQKx_1cINtB3_3StrKRee28882c3bc_E) | ||
//~| ERROR demangling(<c[464da6a86cb672f]::Str<"∂ü">>) | ||
//~| ERROR demangling-alt(<c::Str<"∂ü">>) | ||
impl Str<"∂ü"> {} | ||
|
||
#[rustc_symbol_name] | ||
//~^ ERROR symbol-name(_RMs2_Csno73SFvQKx_1cINtB3_3StrKRee183a1e18390e183ade1839be18394e1839ae18390e183935fe18392e18394e1839be183a0e18398e18394e1839ae183985fe183a1e18390e18393e18398e1839ae18398_E) | ||
//~| ERROR demangling(<c[464da6a86cb672f]::Str<"საჭმელად_გემრიელი_სადილი">>) | ||
//~| ERROR demangling-alt(<c::Str<"საჭმელად_გემრიელი_სადილი">>) | ||
impl Str<"საჭმელად_გემრიელი_სადილი"> {} | ||
|
||
#[rustc_symbol_name] | ||
//~^ ERROR symbol-name(_RMs3_Csno73SFvQKx_1cINtB3_3StrKRef09f908af09fa688f09fa686f09f90ae20c2a720f09f90b6f09f9192e29895f09f94a520c2a720f09fa7a1f09f929bf09f929af09f9299f09f929c_E) | ||
//~| ERROR demangling(<c[464da6a86cb672f]::Str<"🐊🦈🦆🐮 § 🐶👒☕🔥 § 🧡💛💚💙💜">>) | ||
//~| ERROR demangling-alt(<c::Str<"🐊🦈🦆🐮 § 🐶👒☕🔥 § 🧡💛💚💙💜">>) | ||
impl Str<"🐊🦈🦆🐮 § 🐶👒☕🔥 § 🧡💛💚💙💜"> {} | ||
|
||
fn main() {} |
110 changes: 110 additions & 0 deletions
110
src/test/ui/symbol-names/const-generics-str-demangling.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
error: symbol-name(_RMCsno73SFvQKx_1cINtB0_3StrKRe616263_E) | ||
--> $DIR/const-generics-str-demangling.rs:8:1 | ||
| | ||
LL | #[rustc_symbol_name] | ||
| ^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: demangling(<c[464da6a86cb672f]::Str<"abc">>) | ||
--> $DIR/const-generics-str-demangling.rs:8:1 | ||
| | ||
LL | #[rustc_symbol_name] | ||
| ^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: demangling-alt(<c::Str<"abc">>) | ||
--> $DIR/const-generics-str-demangling.rs:8:1 | ||
| | ||
LL | #[rustc_symbol_name] | ||
| ^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: symbol-name(_RMs_Csno73SFvQKx_1cINtB2_3StrKRe27_E) | ||
--> $DIR/const-generics-str-demangling.rs:14:1 | ||
| | ||
LL | #[rustc_symbol_name] | ||
| ^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: demangling(<c[464da6a86cb672f]::Str<"'">>) | ||
--> $DIR/const-generics-str-demangling.rs:14:1 | ||
| | ||
LL | #[rustc_symbol_name] | ||
| ^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: demangling-alt(<c::Str<"'">>) | ||
--> $DIR/const-generics-str-demangling.rs:14:1 | ||
| | ||
LL | #[rustc_symbol_name] | ||
| ^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: symbol-name(_RMs0_Csno73SFvQKx_1cINtB3_3StrKRe090a_E) | ||
--> $DIR/const-generics-str-demangling.rs:20:1 | ||
| | ||
LL | #[rustc_symbol_name] | ||
| ^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: demangling(<c[464da6a86cb672f]::Str<"\t\n">>) | ||
--> $DIR/const-generics-str-demangling.rs:20:1 | ||
| | ||
LL | #[rustc_symbol_name] | ||
| ^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: demangling-alt(<c::Str<"\t\n">>) | ||
--> $DIR/const-generics-str-demangling.rs:20:1 | ||
| | ||
LL | #[rustc_symbol_name] | ||
| ^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: symbol-name(_RMs1_Csno73SFvQKx_1cINtB3_3StrKRee28882c3bc_E) | ||
--> $DIR/const-generics-str-demangling.rs:26:1 | ||
| | ||
LL | #[rustc_symbol_name] | ||
| ^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: demangling(<c[464da6a86cb672f]::Str<"∂ü">>) | ||
--> $DIR/const-generics-str-demangling.rs:26:1 | ||
| | ||
LL | #[rustc_symbol_name] | ||
| ^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: demangling-alt(<c::Str<"∂ü">>) | ||
--> $DIR/const-generics-str-demangling.rs:26:1 | ||
| | ||
LL | #[rustc_symbol_name] | ||
| ^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: symbol-name(_RMs2_Csno73SFvQKx_1cINtB3_3StrKRee183a1e18390e183ade1839be18394e1839ae18390e183935fe18392e18394e1839be183a0e18398e18394e1839ae183985fe183a1e18390e18393e18398e1839ae18398_E) | ||
--> $DIR/const-generics-str-demangling.rs:32:1 | ||
| | ||
LL | #[rustc_symbol_name] | ||
| ^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: demangling(<c[464da6a86cb672f]::Str<"საჭმელად_გემრიელი_სადილი">>) | ||
--> $DIR/const-generics-str-demangling.rs:32:1 | ||
| | ||
LL | #[rustc_symbol_name] | ||
| ^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: demangling-alt(<c::Str<"საჭმელად_გემრიელი_სადილი">>) | ||
--> $DIR/const-generics-str-demangling.rs:32:1 | ||
| | ||
LL | #[rustc_symbol_name] | ||
| ^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: symbol-name(_RMs3_Csno73SFvQKx_1cINtB3_3StrKRef09f908af09fa688f09fa686f09f90ae20c2a720f09f90b6f09f9192e29895f09f94a520c2a720f09fa7a1f09f929bf09f929af09f9299f09f929c_E) | ||
--> $DIR/const-generics-str-demangling.rs:38:1 | ||
| | ||
LL | #[rustc_symbol_name] | ||
| ^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: demangling(<c[464da6a86cb672f]::Str<"🐊🦈🦆🐮 § 🐶👒☕🔥 § 🧡💛💚💙💜">>) | ||
--> $DIR/const-generics-str-demangling.rs:38:1 | ||
| | ||
LL | #[rustc_symbol_name] | ||
| ^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: demangling-alt(<c::Str<"🐊🦈🦆🐮 § 🐶👒☕🔥 § 🧡💛💚💙💜">>) | ||
--> $DIR/const-generics-str-demangling.rs:38:1 | ||
| | ||
LL | #[rustc_symbol_name] | ||
| ^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to 18 previous errors | ||
|