-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Special-case .llvm
in mangler
#61195
Merged
Merged
Changes from all commits
Commits
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 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 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,37 @@ | ||
// compile-pass | ||
|
||
// This test is the same code as in ui/symbol-names/issue-60925.rs but this checks that the | ||
// reproduction compiles successfully and doesn't segfault, whereas that test just checks that the | ||
// symbol mangling fix produces the correct result. | ||
|
||
fn dummy() {} | ||
|
||
mod llvm { | ||
pub(crate) struct Foo; | ||
} | ||
mod foo { | ||
pub(crate) struct Foo<T>(T); | ||
|
||
impl Foo<::llvm::Foo> { | ||
pub(crate) fn foo() { | ||
for _ in 0..0 { | ||
for _ in &[::dummy()] { | ||
::dummy(); | ||
::dummy(); | ||
::dummy(); | ||
} | ||
} | ||
} | ||
} | ||
|
||
pub(crate) fn foo() { | ||
Foo::foo(); | ||
Foo::foo(); | ||
} | ||
} | ||
|
||
pub fn foo() { | ||
foo::foo(); | ||
} | ||
|
||
fn main() {} |
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,39 @@ | ||
#![feature(rustc_attrs)] | ||
|
||
// This test is the same code as in ui/issue-53912.rs but this test checks that the symbol mangling | ||
// fix produces the correct result, whereas that test just checks that the reproduction compiles | ||
// successfully and doesn't segfault | ||
|
||
fn dummy() {} | ||
|
||
mod llvm { | ||
pub(crate) struct Foo; | ||
} | ||
mod foo { | ||
pub(crate) struct Foo<T>(T); | ||
|
||
impl Foo<::llvm::Foo> { | ||
#[rustc_symbol_name] | ||
//~^ ERROR _ZN11issue_609253foo36Foo$LT$issue_60925..llv$6d$..Foo$GT$3foo17h059a991a004536adE | ||
pub(crate) fn foo() { | ||
for _ in 0..0 { | ||
for _ in &[::dummy()] { | ||
::dummy(); | ||
::dummy(); | ||
::dummy(); | ||
} | ||
} | ||
} | ||
} | ||
|
||
pub(crate) fn foo() { | ||
Foo::foo(); | ||
Foo::foo(); | ||
} | ||
} | ||
|
||
pub fn foo() { | ||
foo::foo(); | ||
} | ||
|
||
fn main() {} |
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,8 @@ | ||
error: symbol-name(_ZN11issue_609253foo36Foo$LT$issue_60925..llv$6d$..Foo$GT$3foo17h059a991a004536adE) | ||
--> $DIR/issue-60925.rs:16:9 | ||
| | ||
LL | #[rustc_symbol_name] | ||
| ^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to previous error | ||
|
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ooops, turns out this should be
$u6d$
(i.e. note theu
).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've submitted #61423 that changes this.