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

Mark internal functions and traits unsafe to reflect preconditions #111609

Merged
merged 1 commit into from
May 22, 2023

Conversation

LegionMammal978
Copy link
Contributor

No semantics are changed in this PR; I only mark some functions and and a trait unsafe which already had implicit preconditions. Although it seems somewhat redundant for numfmt::Part::Copy to contain a &[u8] instead of a &str, given that all of its current consumers ultimately expect valid UTF-8. Is the type also intended to work for byte-slice formatting in the future?

@rustbot
Copy link
Collaborator

rustbot commented May 15, 2023

r? @thomcc

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added 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 May 15, 2023
@rustbot
Copy link
Collaborator

rustbot commented May 15, 2023

Hey! It looks like you've submitted a new PR for the library teams!

If this PR contains changes to any rust-lang/rust public library APIs then please comment with @rustbot label +T-libs-api -T-libs to tag it appropriately. If this PR contains changes to any unstable APIs please edit the PR description to add a link to the relevant API Change Proposal or create one if you haven't already. If you're unsure where your change falls no worries, just leave it as is and the reviewer will take a look and make a decision to forward on if necessary.

Examples of T-libs-api changes:

  • Stabilizing library features
  • Introducing insta-stable changes such as new implementations of existing stable traits on existing stable types
  • Introducing new or changing existing unstable library APIs (excluding permanently unstable features / features without a tracking issue)
  • Changing public documentation in ways that create new stability guarantees
  • Changing observable runtime behavior of library APIs

@rust-log-analyzer

This comment has been minimized.

@thomcc
Copy link
Member

thomcc commented May 22, 2023

Yeah fair enough.

Is the type also intended to work for byte-slice formatting in the future?

Might have been the plan at one point, but at the moment it's not. This can already be accomplished in some way with io::Write after all.

@bors r+ rollup

@bors
Copy link
Contributor

bors commented May 22, 2023

📌 Commit 7748109 has been approved by thomcc

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 22, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request May 22, 2023
Rollup of 6 pull requests

Successful merges:

 - rust-lang#111501 (MIR drive-by cleanups)
 - rust-lang#111609 (Mark internal functions and traits unsafe to reflect preconditions)
 - rust-lang#111612 (Give better error when collecting into `&[T]`)
 - rust-lang#111756 (Rename `{drop,forget}_{copy,ref}` lints to more consistent naming)
 - rust-lang#111843 (move lcnr to only review types stuff)
 - rust-lang#111844 (Migrate GUI colors test to original CSS color format)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 47fe1a3 into rust-lang:master May 22, 2023
@rustbot rustbot added this to the 1.71.0 milestone May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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