Skip to content
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

Stabilize const_refs_to_static #129759

Merged

Conversation

dingxiangfei2009
Copy link
Contributor

@dingxiangfei2009 dingxiangfei2009 commented Aug 29, 2024

Close #128183
Tracked by #119618
cc @nikomatsakis

Meanwhile, I am cooking a sub-section in the language reference.

@rustbot
Copy link
Collaborator

rustbot commented Aug 29, 2024

r? @petrochenkov

rustbot has assigned @petrochenkov.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Aug 29, 2024
@rust-log-analyzer

This comment has been minimized.

@petrochenkov
Copy link
Contributor

Blocked on #129472.
@rustbot blocked

@rustbot rustbot added S-blocked Status: Blocked on something else such as an RFC or other implementation work. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 30, 2024
@bors

This comment was marked as resolved.

@traviscross
Copy link
Contributor

@rustbot ready

(#129472 has been merged.)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-blocked Status: Blocked on something else such as an RFC or other implementation work. labels Sep 6, 2024
@petrochenkov
Copy link
Contributor

Looks like FCP in #128183 (comment) has completed yesterday.

@petrochenkov
Copy link
Contributor

The implementation seems trivial, so I can review and approve, but if you want someone from the const eval group to do that, feel free to reassign.

@petrochenkov
Copy link
Contributor

This also needs a rebase and a fix for the error index.
@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 7, 2024
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rustbot
Copy link
Collaborator

rustbot commented Sep 11, 2024

Some changes occurred in diagnostic error codes

cc @GuillaumeGomez

@rust-log-analyzer

This comment has been minimized.

@dingxiangfei2009
Copy link
Contributor Author

@rustbot ready

  • A test stderr is reverted
  • Error code document is updated
  • The ref book PR is ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 11, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 25, 2024
…iaskrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#129687 (Implement RFC3137 trim-paths sysroot changes - take 2)
 - rust-lang#129759 (Stabilize `const_refs_to_static`)
 - rust-lang#130329 (Reorder stack spills so that constants come later.)
 - rust-lang#130845 (Utf8Chunks: add link to Utf8Chunk)
 - rust-lang#130846 (Revert Break into the debugger on panic (129019))

r? `@ghost`
`@rustbot` modify labels: rollup
@tgross35
Copy link
Contributor

@bors r-

It looks like there might be a couple more tests that need blessing, #130854 (comment)

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Sep 26, 2024
update tests

fix bitwidth-sensitive stderr output

use build-fail for asm tests
@dingxiangfei2009
Copy link
Contributor Author

dingxiangfei2009 commented Sep 26, 2024

@rustbot ready

  • I borrowed a proper AArch64 hardware to update the test fixture. 😓 I will review my emulation setup next time.

cc @traviscross

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 26, 2024
@RalfJung
Copy link
Member

@bors r+ rollup=iffy

@bors
Copy link
Contributor

bors commented Sep 26, 2024

📌 Commit 1576a6d has been approved by RalfJung

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 26, 2024
@bors
Copy link
Contributor

bors commented Sep 26, 2024

⌛ Testing commit 1576a6d with merge 4428a05...

@bors
Copy link
Contributor

bors commented Sep 26, 2024

☀️ Test successful - checks-actions
Approved by: RalfJung
Pushing 4428a05 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Sep 26, 2024
@bors bors merged commit 4428a05 into rust-lang:master Sep 26, 2024
7 checks passed
@rustbot rustbot added this to the 1.83.0 milestone Sep 26, 2024
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (4428a05): comparison URL.

Overall result: ❌ regressions - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
1.5% [1.5%, 1.5%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

This benchmark run did not return any relevant results for this metric.

Cycles

Results (primary -3.0%, secondary 6.2%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
6.2% [6.2%, 6.2%] 1
Improvements ✅
(primary)
-3.0% [-9.6%, -1.2%] 11
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -3.0% [-9.6%, -1.2%] 11

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 773.662s -> 772.536s (-0.15%)
Artifact size: 340.89 MiB -> 340.88 MiB (-0.00%)

@traviscross traviscross added the relnotes Marks issues that should be documented in the release notes of the next release. label Sep 26, 2024
@workingjubilee workingjubilee added the F-const_refs_to_static `#![feature(const_refs_to_static)]` label Sep 27, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 30, 2024
make type-check-4 asm tests about non-const expressions

These tests recently got changed in rust-lang#129759. I asked the PR author to make the tests read from a `static mut` (rather than just making them "pass"), but I now think that was a mistake: previously the tests failed because the const was not a valid const expression, after the PR they failed because the const failed to evaluate.

So this PR restores the tests to "fail because the const is not a valid const expression". That can be done in a target-independent way so I unified the x86 and aarch64 tests into one.

Cc `@oli-obk` as the original [author](rust-lang@0d88631) of these tests -- not sure if you still remember what they were intended to test.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Sep 30, 2024
make type-check-4 asm tests about non-const expressions

These tests recently got changed in rust-lang#129759. I asked the PR author to make the tests read from a `static mut` (rather than just making them "pass"), but I now think that was a mistake: previously the tests failed because the const was not a valid const expression, after the PR they failed because the const failed to evaluate.

So this PR restores the tests to "fail because the const is not a valid const expression". That can be done in a target-independent way so I unified the x86 and aarch64 tests into one.

Cc `@oli-obk` as the original [author](rust-lang@0d88631) of these tests -- not sure if you still remember what they were intended to test.
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Sep 30, 2024
Rollup merge of rust-lang#130895 - RalfJung:asm-tests, r=nnethercote

make type-check-4 asm tests about non-const expressions

These tests recently got changed in rust-lang#129759. I asked the PR author to make the tests read from a `static mut` (rather than just making them "pass"), but I now think that was a mistake: previously the tests failed because the const was not a valid const expression, after the PR they failed because the const failed to evaluate.

So this PR restores the tests to "fail because the const is not a valid const expression". That can be done in a target-independent way so I unified the x86 and aarch64 tests into one.

Cc `@oli-obk` as the original [author](rust-lang@0d88631) of these tests -- not sure if you still remember what they were intended to test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc F-const_refs_to_static `#![feature(const_refs_to_static)]` merged-by-bors This PR was explicitly merged by bors. relnotes Marks issues that should be documented in the release notes of the next release. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Proposal: stabilize const_refs_to_static
10 participants