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

Use &raw in the standard library #130865

Merged
merged 1 commit into from
Sep 26, 2024
Merged

Conversation

cuviper
Copy link
Member

@cuviper cuviper commented Sep 26, 2024

Since the stabilization in #127679 has reached stage0, 1.82-beta, we can
start using &raw freely, and even the soft-deprecated ptr::addr_of!
and ptr::addr_of_mut! can stop allowing the unstable feature.

I intentionally did not change any documentation or tests, but the rest
of those macro uses are all now using &raw const or &raw mut in the
standard library.

Since the stabilization in rust-lang#127679 has reached stage0, 1.82-beta, we can
start using `&raw` freely, and even the soft-deprecated `ptr::addr_of!`
and `ptr::addr_of_mut!` can stop allowing the unstable feature.

I intentionally did not change any documentation or tests, but the rest
of those macro uses are all now using `&raw const` or `&raw mut` in the
standard library.
@rustbot
Copy link
Collaborator

rustbot commented Sep 26, 2024

r? @tgross35

rustbot has assigned @tgross35.
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 O-hermit Operating System: Hermit O-unix Operating system: Unix-like O-windows Operating system: Windows S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Sep 26, 2024
@tgross35
Copy link
Contributor

Huh I didn't realize these were soft deprecated, but it is documented that way. Makes sense to do this then, everything here is just a straightforward replacement.

@bors r+

@bors
Copy link
Contributor

bors commented Sep 26, 2024

📌 Commit f4d9d1a has been approved by tgross35

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
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Sep 26, 2024
…ss35

Use `&raw` in the standard library

Since the stabilization in rust-lang#127679 has reached stage0, 1.82-beta, we can
start using `&raw` freely, and even the soft-deprecated `ptr::addr_of!`
and `ptr::addr_of_mut!` can stop allowing the unstable feature.

I intentionally did not change any documentation or tests, but the rest
of those macro uses are all now using `&raw const` or `&raw mut` in the
standard library.
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 26, 2024
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#130820 (Fix diagnostics for coroutines with () as input.)
 - rust-lang#130833 (Fix the misleading diagnostic for `let_underscore_drop` on type without `Drop` implementation)
 - rust-lang#130845 (Utf8Chunks: add link to Utf8Chunk)
 - rust-lang#130860 (Fix directives for lint-non-snake-case-crate)
 - rust-lang#130861 (Use `mem::offset_of!` for `sockaddr_un.sun_path`)
 - rust-lang#130865 (Use `&raw` in the standard library)
 - rust-lang#130868 (Update FIXME comment in s390x_unknown_linux_*.rs)

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

bors commented Sep 26, 2024

⌛ Testing commit f4d9d1a with merge f2becdf...

@bors
Copy link
Contributor

bors commented Sep 26, 2024

☀️ Test successful - checks-actions
Approved by: tgross35
Pushing f2becdf to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Sep 26, 2024
@bors bors merged commit f2becdf 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 (f2becdf): comparison URL.

Overall result: ❌✅ regressions and improvements - 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.4% [0.3%, 0.5%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.1% [-0.1%, -0.1%] 1
All ❌✅ (primary) 0.4% [0.3%, 0.5%] 2

Max RSS (memory usage)

Results (primary -1.9%)

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)
- - 0
Improvements ✅
(primary)
-1.9% [-2.5%, -1.2%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -1.9% [-2.5%, -1.2%] 2

Cycles

Results (primary 3.2%, secondary 3.3%)

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)
3.2% [1.2%, 11.1%] 12
Regressions ❌
(secondary)
3.3% [3.3%, 3.3%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 3.2% [1.2%, 11.1%] 12

Binary size

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

Bootstrap: 772.716s -> 773.662s (0.12%)
Artifact size: 340.95 MiB -> 340.89 MiB (-0.02%)

@cuviper cuviper deleted the library-raw_ref_op branch September 27, 2024 01:16
cuviper added a commit to cuviper/rust that referenced this pull request Sep 27, 2024
Like rust-lang#130865 did for the standard library, we can use `&raw` in the
compiler now that stage0 supports it. Also like the other issue, I did
not make any doc or test changes at this time.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Sep 27, 2024
…piler-errors

Use `&raw` in the compiler

Like rust-lang#130865 did for the standard library, we can use `&raw` in the
compiler now that stage0 supports it. Also like the other issue, I did
not make any doc or test changes at this time.
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Sep 27, 2024
Rollup merge of rust-lang#130916 - cuviper:compiler-raw_ref_op, r=compiler-errors

Use `&raw` in the compiler

Like rust-lang#130865 did for the standard library, we can use `&raw` in the
compiler now that stage0 supports it. Also like the other issue, I did
not make any doc or test changes at this time.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. O-hermit Operating System: Hermit O-unix Operating system: Unix-like O-windows Operating system: Windows S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants