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 slice_align_to #53754

Merged
merged 1 commit into from Sep 16, 2018

Conversation

Projects
None yet
@RalfJung
Member

RalfJung commented Aug 28, 2018

This is very hard to implement correctly, and leads to serious bugs when done incorrectly. Moreover, this is needed to be able to run code that opportunistically exploits alignment on miri. So code using align_to/align_to_mut gets the benefit of a well-tested implementation and of being able to run in miri to test for (some kinds of) UB.

This PR also clarifies the guarantee wrt. the middle part being as long as possible. Should the docs say under which circumstances the middle part could be shorter? Currently, that can only happen when running in miri.

@rust-highfive

This comment has been minimized.

Show comment
Hide comment
@rust-highfive

rust-highfive Aug 28, 2018

Collaborator

r? @Kimundi

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

Collaborator

rust-highfive commented Aug 28, 2018

r? @Kimundi

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

@RalfJung

This comment has been minimized.

Show comment
Hide comment
@RalfJung

RalfJung Aug 28, 2018

Member

The steps in the tracking issue talk about "adjusting documentation", to what extend does that apply to lib features? I grepped for all uses of the feature flag, and found no more than what this PR removes.

Member

RalfJung commented Aug 28, 2018

The steps in the tracking issue talk about "adjusting documentation", to what extend does that apply to lib features? I grepped for all uses of the feature flag, and found no more than what this PR removes.

@nagisa nagisa added the T-libs label Aug 28, 2018

@kennytm kennytm added the relnotes label Aug 28, 2018

@Centril

This comment has been minimized.

Show comment
Hide comment
@Centril

Centril Aug 28, 2018

Contributor

@RalfJung Historically; what you've done in this PR has been fine (exhibit A: #51511); so I don't think you need to do anything than remove the feature gate from the doctests; which you've done.

Contributor

Centril commented Aug 28, 2018

@RalfJung Historically; what you've done in this PR has been fine (exhibit A: #51511); so I don't think you need to do anything than remove the feature gate from the doctests; which you've done.

@TimNN

This comment has been minimized.

Show comment
Hide comment
@TimNN

TimNN Sep 4, 2018

Contributor

Ping from triage @Kimundi / @rust-lang/libs: This PR requires your review.

Contributor

TimNN commented Sep 4, 2018

Ping from triage @Kimundi / @rust-lang/libs: This PR requires your review.

@alexcrichton

This comment has been minimized.

Show comment
Hide comment
@alexcrichton

alexcrichton Sep 4, 2018

Member

@rfcbot fcp merge

This seems like a nifty API that would be quite useful in appropriate situations, so seems like a good idea to me to stabilize!

Member

alexcrichton commented Sep 4, 2018

@rfcbot fcp merge

This seems like a nifty API that would be quite useful in appropriate situations, so seems like a good idea to me to stabilize!

@rfcbot

This comment has been minimized.

Show comment
Hide comment
@rfcbot

rfcbot Sep 4, 2018

Team member @alexcrichton has proposed to merge this. The next step is review by the rest of the tagged teams:

No concerns currently listed.

Once a majority of reviewers approve (and none object), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

rfcbot commented Sep 4, 2018

Team member @alexcrichton has proposed to merge this. The next step is review by the rest of the tagged teams:

No concerns currently listed.

Once a majority of reviewers approve (and none object), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

@rfcbot

This comment has been minimized.

Show comment
Hide comment
@rfcbot

rfcbot Sep 5, 2018

🔔 This is now entering its final comment period, as per the review above. 🔔

rfcbot commented Sep 5, 2018

🔔 This is now entering its final comment period, as per the review above. 🔔

@rfcbot

This comment has been minimized.

Show comment
Hide comment
@rfcbot

rfcbot Sep 15, 2018

The final comment period, with a disposition to merge, as per the review above, is now complete.

rfcbot commented Sep 15, 2018

The final comment period, with a disposition to merge, as per the review above, is now complete.

@varkor

This comment has been minimized.

Show comment
Hide comment
@varkor

varkor Sep 15, 2018

Contributor

@bors r=alexcrichton

Contributor

varkor commented Sep 15, 2018

@bors r=alexcrichton

@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Sep 15, 2018

Contributor

📌 Commit f4f1140 has been approved by alexcrichton

Contributor

bors commented Sep 15, 2018

📌 Commit f4f1140 has been approved by alexcrichton

@bors bors added S-waiting-on-bors and removed S-blocked labels Sep 15, 2018

@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Sep 15, 2018

Contributor

⌛️ Testing commit f4f1140 with merge 4fdb0ab...

Contributor

bors commented Sep 15, 2018

⌛️ Testing commit f4f1140 with merge 4fdb0ab...

bors added a commit that referenced this pull request Sep 15, 2018

Auto merge of #53754 - RalfJung:slice_align_to, r=alexcrichton
stabilize slice_align_to

This is very hard to implement correctly, and leads to [serious bugs](llogiq/bytecount#42) when done incorrectly. Moreover, this is needed to be able to run code that opportunistically exploits alignment on miri. So code using `align_to`/`align_to_mut` gets the benefit of a well-tested implementation *and* of being able to run in miri to test for (some kinds of) UB.

This PR also clarifies the guarantee wrt. the middle part being as long as possible.  Should the docs say under which circumstances the middle part could be shorter? Currently, that can only happen when running in miri.
@eddyb

This comment has been minimized.

Show comment
Hide comment
@eddyb

eddyb Sep 15, 2018

Member

@bors retry (prioritizing #54116)

Member

eddyb commented Sep 15, 2018

@bors retry (prioritizing #54116)

@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Sep 15, 2018

Contributor

⌛️ Testing commit f4f1140 with merge 447fd25...

Contributor

bors commented Sep 15, 2018

⌛️ Testing commit f4f1140 with merge 447fd25...

bors added a commit that referenced this pull request Sep 15, 2018

Auto merge of #53754 - RalfJung:slice_align_to, r=alexcrichton
stabilize slice_align_to

This is very hard to implement correctly, and leads to [serious bugs](llogiq/bytecount#42) when done incorrectly. Moreover, this is needed to be able to run code that opportunistically exploits alignment on miri. So code using `align_to`/`align_to_mut` gets the benefit of a well-tested implementation *and* of being able to run in miri to test for (some kinds of) UB.

This PR also clarifies the guarantee wrt. the middle part being as long as possible.  Should the docs say under which circumstances the middle part could be shorter? Currently, that can only happen when running in miri.
@eddyb

This comment has been minimized.

Show comment
Hide comment
@eddyb

eddyb Sep 16, 2018

Member

Looks like all tests passed (on both Travis and Appveyor) but @bors never noticed.
Could this be related to why the latest nightly was half-uploaded?
cc @rust-lang/infra

Member

eddyb commented Sep 16, 2018

Looks like all tests passed (on both Travis and Appveyor) but @bors never noticed.
Could this be related to why the latest nightly was half-uploaded?
cc @rust-lang/infra

@kennytm

This comment has been minimized.

Show comment
Hide comment
@kennytm

kennytm Sep 16, 2018

Member

@bors retry

Probably caused by the bors re-deploy.

Edit: The homu queue is outdated, gonna synchronize.

Member

kennytm commented Sep 16, 2018

@bors retry

Probably caused by the bors re-deploy.

Edit: The homu queue is outdated, gonna synchronize.

@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Sep 16, 2018

Contributor

⌛️ Testing commit f4f1140 with merge f481987...

Contributor

bors commented Sep 16, 2018

⌛️ Testing commit f4f1140 with merge f481987...

bors added a commit that referenced this pull request Sep 16, 2018

Auto merge of #53754 - RalfJung:slice_align_to, r=alexcrichton
stabilize slice_align_to

This is very hard to implement correctly, and leads to [serious bugs](llogiq/bytecount#42) when done incorrectly. Moreover, this is needed to be able to run code that opportunistically exploits alignment on miri. So code using `align_to`/`align_to_mut` gets the benefit of a well-tested implementation *and* of being able to run in miri to test for (some kinds of) UB.

This PR also clarifies the guarantee wrt. the middle part being as long as possible.  Should the docs say under which circumstances the middle part could be shorter? Currently, that can only happen when running in miri.
@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Sep 16, 2018

Contributor

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing f481987 to master...

Contributor

bors commented Sep 16, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing f481987 to master...

@bors bors merged commit f4f1140 into rust-lang:master Sep 16, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment