-
Notifications
You must be signed in to change notification settings - Fork 13.4k
rustc_symbol_mangling: support structural constants and &str in v0. #87194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
e291234
Pretty-print uninhabited const values more explicitly.
eddyb eec84b3
rustc_symbol_mangling: never cache placeholders in print_const.
eddyb 948f19e
Fix typo (variant_id should've been variant_idx).
eddyb cb7890e
rustc_symbol_mangling: support structural constants and &str in v0.
eddyb f60d333
tests: support -Zsymbol-mangling-version=v0 being the default.
eddyb 755385c
tests: shorten symbol-names/const-generics-demangling output.
eddyb f8810ee
Update rustc-demangle to 0.1.21.
eddyb af002c1
tests: add v0 `&str` const value demangling test.
eddyb b4fcf1b
tests: add v0 structural const value demangling test.
eddyb 24526bb
compiletest: allow `.` in remote test paths (can arise from revisions).
eddyb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
2 changes: 1 addition & 1 deletion
2
...s/issue-47429-short-backtraces.run.stderr → ...-47429-short-backtraces.legacy.run.stderr
This file contains hidden or 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
This file contains hidden or 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
5 changes: 5 additions & 0 deletions
5
src/test/ui/panics/issue-47429-short-backtraces.v0.run.stderr
This file contains hidden or 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,5 @@ | ||
thread 'main' panicked at 'explicit panic', $DIR/issue-47429-short-backtraces.rs:21:5 | ||
stack backtrace: | ||
0: std::panicking::begin_panic::<&str> | ||
1: issue_47429_short_backtraces::main | ||
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. |
This file contains hidden or 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 |
---|---|---|
@@ -1,37 +1,37 @@ | ||
// build-fail | ||
// compile-flags: -Z symbol-mangling-version=v0 | ||
// compile-flags: -Z symbol-mangling-version=v0 --crate-name=c | ||
#![feature(rustc_attrs)] | ||
|
||
pub struct Unsigned<const F: u8>; | ||
|
||
#[rustc_symbol_name] | ||
//~^ ERROR symbol-name(_RMCsaP8qXevlYG3_25const_generics_demanglingINtB0_8UnsignedKhb_E) | ||
//~| ERROR demangling(<const_generics_demangling[7e153590edc26969]::Unsigned<11: u8>>) | ||
//~| ERROR demangling-alt(<const_generics_demangling::Unsigned<11>>) | ||
//~^ ERROR symbol-name(_RMCsno73SFvQKx_1cINtB0_8UnsignedKhb_E) | ||
//~| ERROR demangling(<c[464da6a86cb672f]::Unsigned<11u8>>) | ||
//~| ERROR demangling-alt(<c::Unsigned<11>>) | ||
impl Unsigned<11> {} | ||
|
||
pub struct Signed<const F: i16>; | ||
|
||
#[rustc_symbol_name] | ||
//~^ ERROR symbol-name(_RMs_CsaP8qXevlYG3_25const_generics_demanglingINtB2_6SignedKsn98_E) | ||
//~| ERROR demangling(<const_generics_demangling[7e153590edc26969]::Signed<-152: i16>>) | ||
//~| ERROR demangling-alt(<const_generics_demangling::Signed<-152>>) | ||
//~^ ERROR symbol-name(_RMs_Csno73SFvQKx_1cINtB2_6SignedKsn98_E) | ||
//~| ERROR demangling(<c[464da6a86cb672f]::Signed<-152i16>>) | ||
//~| ERROR demangling-alt(<c::Signed<-152>>) | ||
impl Signed<-152> {} | ||
|
||
pub struct Bool<const F: bool>; | ||
|
||
#[rustc_symbol_name] | ||
//~^ ERROR symbol-name(_RMs0_CsaP8qXevlYG3_25const_generics_demanglingINtB3_4BoolKb1_E) | ||
//~| ERROR demangling(<const_generics_demangling[7e153590edc26969]::Bool<true: bool>>) | ||
//~| ERROR demangling-alt(<const_generics_demangling::Bool<true>>) | ||
//~^ ERROR symbol-name(_RMs0_Csno73SFvQKx_1cINtB3_4BoolKb1_E) | ||
//~| ERROR demangling(<c[464da6a86cb672f]::Bool<true>>) | ||
//~| ERROR demangling-alt(<c::Bool<true>>) | ||
impl Bool<true> {} | ||
|
||
pub struct Char<const F: char>; | ||
|
||
#[rustc_symbol_name] | ||
//~^ ERROR symbol-name(_RMs1_CsaP8qXevlYG3_25const_generics_demanglingINtB3_4CharKc2202_E) | ||
//~| ERROR demangling(<const_generics_demangling[7e153590edc26969]::Char<'∂': char>>) | ||
//~| ERROR demangling-alt(<const_generics_demangling::Char<'∂'>>) | ||
//~^ ERROR symbol-name(_RMs1_Csno73SFvQKx_1cINtB3_4CharKc2202_E) | ||
//~| ERROR demangling(<c[464da6a86cb672f]::Char<'∂'>>) | ||
//~| ERROR demangling-alt(<c::Char<'∂'>>) | ||
impl Char<'∂'> {} | ||
|
||
fn main() {} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.