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

Do not discard ?Sized type params and suggest their removal #87421

Merged
merged 1 commit into from
Jul 30, 2021

Conversation

estebank
Copy link
Contributor

No description provided.

@rust-highfive
Copy link
Collaborator

r? @jackh726

(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 Jul 24, 2021
@estebank
Copy link
Contributor Author

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jul 24, 2021
@bors
Copy link
Contributor

bors commented Jul 24, 2021

⌛ Trying commit 5a7faf8ad5d496c74ac0dd5701ddf4c5f6462f38 with merge 013ac38e83baa419dc36f15d68c4c6bc6e79c1e0...

@bors
Copy link
Contributor

bors commented Jul 24, 2021

☀️ Try build successful - checks-actions
Build commit: 013ac38e83baa419dc36f15d68c4c6bc6e79c1e0 (013ac38e83baa419dc36f15d68c4c6bc6e79c1e0)

@rust-timer
Copy link
Collaborator

Queued 013ac38e83baa419dc36f15d68c4c6bc6e79c1e0 with parent 3b4a0df, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking try commit (013ac38e83baa419dc36f15d68c4c6bc6e79c1e0): comparison url.

Summary: This benchmark run did not return any significant changes.

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up.

@bors rollup=never
@rustbot label: +S-waiting-on-review -S-waiting-on-perf -perf-regression

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jul 24, 2021
@estebank estebank changed the title [WIP] Do not discard ?Sized type params and suggest their removal Do not discard ?Sized type params and suggest their removal Jul 30, 2021
@estebank
Copy link
Contributor Author

Split off #85799

r? @oli-obk

@rust-highfive rust-highfive assigned oli-obk and unassigned jackh726 Jul 30, 2021
@oli-obk
Copy link
Contributor

oli-obk commented Jul 30, 2021

@bors r+

@bors
Copy link
Contributor

bors commented Jul 30, 2021

📌 Commit 15a40c7 has been approved by oli-obk

@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 Jul 30, 2021
@bors
Copy link
Contributor

bors commented Jul 30, 2021

⌛ Testing commit 15a40c7 with merge ef9549b...

@bors
Copy link
Contributor

bors commented Jul 30, 2021

☀️ Test successful - checks-actions
Approved by: oli-obk
Pushing ef9549b to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 30, 2021
@bors bors merged commit ef9549b into rust-lang:master Jul 30, 2021
@rustbot rustbot added this to the 1.56.0 milestone Jul 30, 2021
@@ -442,6 +442,7 @@ pub enum GenericBound<'hir> {
Trait(PolyTraitRef<'hir>, TraitBoundModifier),
// FIXME(davidtwco): Introduce `PolyTraitRef::LangItem`
LangItemTrait(LangItem, Span, HirId, &'hir GenericArgs<'hir>),
Unsized(Span),
Copy link
Member

Choose a reason for hiding this comment

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

I didn't have time to get to this. But I'm a bit concerned about this. Would like to have potentially seen this reuse Trait in some way

Copy link
Contributor

Choose a reason for hiding this comment

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

I brought this up in #85799 (comment) but then forgot about it again entirely. Sorry, should've paid more attention. I'm fine doing a quick revert and figuring all this out in a new PR

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As you all prefer, but I am concerned about the size effects of adding a Span to Trait. @oli-obk, that comment was in a separate enum, to carry the span in the obligation, this is to carry it in the HIR.

Copy link
Contributor

Choose a reason for hiding this comment

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

PolyTraitRef already contains a span, can we re-use that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looking back at this, the reason I didn't want to just use the Trait variant were because we want this exclusively for this, as an "empty signal" and wanted to make sure we didn't try to evaluate these by accident (as they are already handled differently elsewhere). I could have added a field to Trait, but I thought that would have caused the enum's size to increase (although that might not be the case, looking at the LangItem variant).

@estebank estebank deleted the perf-run branch November 9, 2023 05:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants