-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
compilertest (UI test): Support custom normalization. #43083
compilertest (UI test): Support custom normalization. #43083
Conversation
Looks like there may be some travis failure? |
@alexcrichton Travis is fine. |
Ooh, exciting :) |
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.
This looks great. Could you however update the UI README file to describe how it works?
It's possible that this file should be merge with the more general COMPILER_TESTS.md README, as well.
// ignore-emscripten | ||
// ignore 32-bit platforms (test output is different) | ||
// normalize-stderr-32bit: "&str (64 bits)" -> "&str ($STR bits)" | ||
// normalize-stderr-64bit: "&str (128 bits)" -> "&str ($STR bits)" |
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.
nice
904eb24
to
7efb58c
Compare
@nikomatsakis The two READMEs are merged in 7efb58c. |
@bors r+ |
📌 Commit 7efb58c has been approved by |
@kennytm nice |
⌛ Testing commit 7efb58c with merge 9ce08cbdc414ca7eb414d095ea654449443cace3... |
💔 Test failed - status-travis |
|
@bors: retry |
… r=nikomatsakis compilertest (UI test): Support custom normalization. Closes #42434. Adds this header for UI tests: ```rust // normalize-stderr-32bit: "fn() (32 bits)" -> "fn() ($PTR bits)" ``` It will normalize the `stderr` output on 32-bit platforms, by replacing all instances of `fn() (32 bits)` by `fn() ($PTR bits)`. Extends the UI tests in #42304 and #41968 to 32-bit targets. r? @nikomatsakis
💔 Test failed - status-travis |
Legit. Well transmuting a 32-bit pointer to EDIT: Checking this test further, turns out this line is supposed to have no errors. The original test added in #31710 reads // No error if a coercion would otherwise occur.
mem::transmute::<fn(), usize>(main); so the intension is transmuting to a I'll change the test back to use |
7efb58c
to
a0344d8
Compare
@nikomatsakis Updated test. Now only one UI test left ( |
@bors r+ |
📌 Commit a0344d8 has been approved by |
⌛ Testing commit a0344d80dd6868d829527b07f3c9503b3d442326 with merge b36ecd74762fe453df1358e75ec38b33db7373f0... |
💔 Test failed - status-travis |
Hmm the error message is changed? Going to rebase and update the UI test.
Edit: Looks the the error message is E0512 if we are transmuting to non-pointer-sized types, E0591 otherwise, which causes this difference. Going to change the targe type to |
Prepare for `normalize-std???` which will share the same logic. Added `ignore-32bit` and `ignore-64bit`.
…normalization works.
a0344d8
to
34209b0
Compare
@nikomatsakis Updated test. |
@bors r+ |
📌 Commit 34209b0 has been approved by |
… r=nikomatsakis compilertest (UI test): Support custom normalization. Closes #42434. Adds this header for UI tests: ```rust // normalize-stderr-32bit: "fn() (32 bits)" -> "fn() ($PTR bits)" ``` It will normalize the `stderr` output on 32-bit platforms, by replacing all instances of `fn() (32 bits)` by `fn() ($PTR bits)`. Extends the UI tests in #42304 and #41968 to 32-bit targets. r? @nikomatsakis
☀️ Test successful - status-appveyor, status-travis |
Closes #42434.
Adds this header for UI tests:
// normalize-stderr-32bit: "fn() (32 bits)" -> "fn() ($PTR bits)"
It will normalize the
stderr
output on 32-bit platforms, by replacing all instances offn() (32 bits)
byfn() ($PTR bits)
.Extends the UI tests in #42304 and #41968 to 32-bit targets.
r? @nikomatsakis