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

Add some needed comments in adjust_fulfillment_errors.rs #115289

Merged
merged 1 commit into from
Sep 19, 2023

Conversation

compiler-errors
Copy link
Member

@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 Aug 27, 2023
Comment on lines -48 to -51
&& let ty::Param(_param) = ty.kind()
&& let Some(arg) = predicate_args.get(0)
&& let ty::GenericArgKind::Type(arg_ty) = arg.unpack()
&& arg_ty == ty
Copy link
Member Author

Choose a reason for hiding this comment

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

These last four &&s are either redundant (by construction of predicate_args) or unneeded (checking if it's a param), so I just folded it into the match above.

&& self.point_at_generic_if_possible(error, def_id, param, segment)
{
// HACK: This is not correct, since `predicate_self_type_to_point_at` might
Copy link
Member Author

@compiler-errors compiler-errors Aug 27, 2023

Choose a reason for hiding this comment

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

This shouldn't matter in practice, but I think it's important to note, since it can lead to weird diagnostics depending on how the FunctionArgumentObligation is used.

ty::AliasKind::Projection | ty::AliasKind::Weak,
ty::AliasTy { args, def_id, .. },
) = ty.kind()
// NOTE: These obligations are 100% redundant and are implied by
Copy link
Member Author

Choose a reason for hiding this comment

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

Want to note that this can be removed in the future, since they're not here for correctness.

@estebank
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Sep 19, 2023

📌 Commit fbd62b8 has been approved by estebank

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 Sep 19, 2023
@bors
Copy link
Contributor

bors commented Sep 19, 2023

⌛ Testing commit fbd62b8 with merge af78bae...

@bors
Copy link
Contributor

bors commented Sep 19, 2023

☀️ Test successful - checks-actions
Approved by: estebank
Pushing af78bae to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Sep 19, 2023
@bors bors merged commit af78bae into rust-lang:master Sep 19, 2023
@rustbot rustbot added this to the 1.74.0 milestone Sep 19, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (af78bae): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
4.6% [4.6%, 4.6%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.9% [-1.9%, -1.9%] 1
All ❌✅ (primary) - - 0

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 633.02s -> 631.926s (-0.17%)
Artifact size: 317.91 MiB -> 317.94 MiB (0.01%)

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. 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.

5 participants