Skip to content

Conversation

@clubby789
Copy link
Contributor

Fixes #112186

@rustbot
Copy link
Collaborator

rustbot commented Jun 2, 2023

r? @WaffleLapkin

(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-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jun 2, 2023
@rust-log-analyzer

This comment has been minimized.

@rust-cloud-vms rust-cloud-vms bot force-pushed the offset-of-tuple-sized branch from 977484d to 0cb00c0 Compare June 2, 2023 00:56
@rust-cloud-vms rust-cloud-vms bot force-pushed the offset-of-tuple-sized branch from 0cb00c0 to f8a3695 Compare June 2, 2023 01:30
@rust-cloud-vms rust-cloud-vms bot force-pushed the offset-of-tuple-sized branch from f8a3695 to d722f27 Compare June 2, 2023 01:33
@est31
Copy link
Member

est31 commented Jun 2, 2023

r? @est31

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Jun 2, 2023

📌 Commit d722f27 has been approved by est31

It is now in the queue for this repository.

@rustbot rustbot assigned est31 and unassigned WaffleLapkin Jun 2, 2023
@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 Jun 2, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 2, 2023
…mpiler-errors

Rollup of 7 pull requests

Successful merges:

 - rust-lang#111670 (Require that const param tys implement `ConstParamTy`)
 - rust-lang#111914 (CFI: Fix cfi with async: transform_ty: unexpected GeneratorWitness(Bi…)
 - rust-lang#112030 (Migrate `item_trait_alias` to Askama)
 - rust-lang#112150 (Support 128-bit atomics on all x86_64 Apple targets)
 - rust-lang#112174 (Fix broken link)
 - rust-lang#112190 (Improve comments on `TyCtxt` and `GlobalCtxt`.)
 - rust-lang#112193 (Check tuple elements are `Sized` in `offset_of`)

Failed merges:

 - rust-lang#112071 (Group rfcs tests)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit ebb7f64 into rust-lang:master Jun 2, 2023
@rustbot rustbot added this to the 1.72.0 milestone Jun 2, 2023
flip1995 pushed a commit to flip1995/rust that referenced this pull request Jun 30, 2023
…mpiler-errors

Rollup of 7 pull requests

Successful merges:

 - rust-lang#111670 (Require that const param tys implement `ConstParamTy`)
 - rust-lang#111914 (CFI: Fix cfi with async: transform_ty: unexpected GeneratorWitness(Bi…)
 - rust-lang#112030 (Migrate `item_trait_alias` to Askama)
 - rust-lang#112150 (Support 128-bit atomics on all x86_64 Apple targets)
 - rust-lang#112174 (Fix broken link)
 - rust-lang#112190 (Improve comments on `TyCtxt` and `GlobalCtxt`.)
 - rust-lang#112193 (Check tuple elements are `Sized` in `offset_of`)

Failed merges:

 - rust-lang#112071 (Group rfcs tests)

r? `@ghost`
`@rustbot` modify labels: rollup
{
for ty in tys.iter().take(index + 1) {
self.require_type_is_sized(ty, expr.span, traits::MiscObligation);
}
Copy link
Member

Choose a reason for hiding this comment

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

What is the reason for checking all fields of the tuple (that are before the indexed field)? For ADTs we only check the field we are indexing, and the same should be enough for tuples. So I don't see the point of this loop.

In #126150 I am removing it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

At this point I can't remember 🤔 I think all good if it's caught by code elsewhere

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-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

offset_of! accepts unsized tuple field

7 participants