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

Constify remaining Layout methods #102207

Merged
merged 7 commits into from
Nov 22, 2022
Merged

Conversation

CraftSpider
Copy link
Contributor

@CraftSpider CraftSpider commented Sep 23, 2022

Makes the methods on Layout that aren't yet unstably const, under the same feature and issue, #67521. Most of them required no changes, only non-trivial change is probably constifying ValidAlignment which may affect #102072

@rustbot rustbot added the T-libs Relevant to the library team, which will review and decide on the PR/issue. label Sep 23, 2022
@rustbot
Copy link
Collaborator

rustbot commented Sep 23, 2022

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-highfive
Copy link
Collaborator

r? @scottmcm

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 23, 2022
@scottmcm
Copy link
Member

Thanks for mentioning #102072!

My inclination here to to avoid further changes around Layout until #101899 settles a bit.

Otherwise this seems perfectly reasonable to me.

@scottmcm scottmcm added the S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. label Sep 24, 2022
@bors
Copy link
Contributor

bors commented Oct 9, 2022

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

@CraftSpider CraftSpider force-pushed the const-layout branch 2 times, most recently from 8989fef to 14b0380 Compare October 17, 2022 15:58
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@CraftSpider
Copy link
Contributor Author

This is also blocked on #102049, since Alignment can't derive PartialEq for structural matching till that lands

@CraftSpider CraftSpider removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 17, 2022
@scottmcm
Copy link
Member

scottmcm commented Nov 9, 2022

It looks like the size limit will stick (#101899 (comment)) so I think that part is unblocked, but #102049 is a good callout.

@bors
Copy link
Contributor

bors commented Nov 12, 2022

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

@CraftSpider CraftSpider force-pushed the const-layout branch 3 times, most recently from e1d6463 to e5d1bf7 Compare November 13, 2022 00:52
@rustbot
Copy link
Collaborator

rustbot commented Nov 13, 2022

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez, @Folyd, @jsha

Some changes occurred in HTML/CSS themes.

cc @GuillaumeGomez

A change occurred in the Ayu theme.

cc @Cldfire

@CraftSpider
Copy link
Contributor Author

Agh, sorry to everyone who got pinged

@CraftSpider CraftSpider force-pushed the const-layout branch 2 times, most recently from d9a53ad to 21c61e1 Compare November 13, 2022 01:24
@CraftSpider CraftSpider added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. labels Nov 13, 2022
Copy link
Member

@scottmcm scottmcm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for updating this so promptly!

One minor request, then this looks good to go.

library/core/src/alloc/layout.rs Outdated Show resolved Hide resolved
@scottmcm
Copy link
Member

Oh, given @CAD97's comment at the top of the file, I should probably

@bors try @rust-timer queue

@Dylan-DPC
Copy link
Member

@bors r-

@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 Nov 19, 2022
@scottmcm
Copy link
Member

(Closing and reopening to re-trigger CI)

@scottmcm scottmcm closed this Nov 19, 2022
@scottmcm scottmcm reopened this Nov 19, 2022
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@scottmcm
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Nov 21, 2022

📌 Commit 8998711 has been approved by scottmcm

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 21, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 22, 2022
…earth

Rollup of 7 pull requests

Successful merges:

 - rust-lang#83608 (Add slice methods for indexing via an array of indices.)
 - rust-lang#95583 (Deprecate the unstable `ptr_to_from_bits` feature)
 - rust-lang#101655 (Make the Box one-liner more descriptive)
 - rust-lang#102207 (Constify remaining `Layout` methods)
 - rust-lang#103193 (mark sys_common::once::generic::Once::new const-stable)
 - rust-lang#104622 (Use clang for the UEFI targets)
 - rust-lang#104638 (Move macro_rules diagnostics to diagnostics module)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 1625435 into rust-lang:master Nov 22, 2022
@rustbot rustbot added this to the 1.67.0 milestone Nov 22, 2022
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.

9 participants