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

Rename Unsafe to Safety #125077

Merged
merged 1 commit into from May 18, 2024
Merged

Conversation

spastorino
Copy link
Member

@spastorino spastorino commented May 13, 2024

Alternative to #124455, which is to just have one Safety enum to use everywhere, this opens the posibility of adding ast::Safety::Safe that's useful for unsafe extern blocks.

This leaves us today with:

enum ast::Safety {
    Unsafe(Span),
    Default,
    // Safe (going to be added for unsafe extern blocks)
}

enum hir::Safety {
    Unsafe,
    Safe,
}

We would convert from ast::Safety::Default into the right Safety level according the context.

@rustbot
Copy link
Collaborator

rustbot commented May 13, 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 A-rustdoc-json Area: Rustdoc JSON backend 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels May 13, 2024
@rustbot
Copy link
Collaborator

rustbot commented May 13, 2024

Some changes occurred in need_type_info.rs

cc @lcnr

Some changes occurred in compiler/rustc_codegen_cranelift

cc @bjorn3

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

Some changes occurred in compiler/rustc_codegen_gcc

cc @antoyo, @GuillaumeGomez

Some changes occurred in src/librustdoc/clean/types.rs

cc @camelid

Some changes occurred in src/tools/rustfmt

cc @rust-lang/rustfmt

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

This PR changes Stable MIR

cc @oli-obk, @celinval, @ouz-a

HIR ty lowering was modified

cc @fmease

changes to the core type system

cc @compiler-errors, @lcnr

@spastorino
Copy link
Member Author

r? @cjgillot

@rust-log-analyzer

This comment has been minimized.

@spastorino
Copy link
Member Author

I'm going to wait on a review and decision about this or #124455 or any other alternative before fixing CI and possible conflicts as it is a lot of work to keep all these in a mergeable state.

@bors
Copy link
Contributor

bors commented May 16, 2024

☔ The latest upstream changes (presumably #125179) made this pull request unmergeable. Please resolve the merge conflicts.

@spastorino spastorino force-pushed the add-new-fnsafety-enum2 branch 2 times, most recently from 27f1aee to ffa3007 Compare May 16, 2024 21:13
@rust-log-analyzer

This comment has been minimized.

@rustbot
Copy link
Collaborator

rustbot commented May 17, 2024

rust-analyzer is developed in its own repository. If possible, consider making this change to rust-lang/rust-analyzer instead.

cc @rust-lang/rust-analyzer

@spastorino spastorino force-pushed the add-new-fnsafety-enum2 branch 2 times, most recently from 0ecc00d to 134936e Compare May 17, 2024 21:29
@jackh726
Copy link
Member

r? jackh726

@bors r+

@bors
Copy link
Contributor

bors commented May 18, 2024

📌 Commit 6b46a91 has been approved by jackh726

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 May 18, 2024
@bors
Copy link
Contributor

bors commented May 18, 2024

⌛ Testing commit 6b46a91 with merge eb1a5c9...

@bors
Copy link
Contributor

bors commented May 18, 2024

☀️ Test successful - checks-actions
Approved by: jackh726
Pushing eb1a5c9 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label May 18, 2024
@bors bors merged commit eb1a5c9 into rust-lang:master May 18, 2024
7 checks passed
@rustbot rustbot added this to the 1.80.0 milestone May 18, 2024
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (eb1a5c9): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

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

Max RSS (memory usage)

Results (primary 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.3% [3.3%, 3.3%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 3.3% [3.3%, 3.3%] 1

Cycles

Results (primary 5.2%, secondary 6.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)
5.2% [5.2%, 5.2%] 1
Regressions ❌
(secondary)
6.3% [5.7%, 6.8%] 5
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 5.2% [5.2%, 5.2%] 1

Binary size

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

Bootstrap: 669.868s -> 667.962s (-0.28%)
Artifact size: 316.05 MiB -> 316.23 MiB (0.06%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-json Area: Rustdoc JSON backend merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants