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 comments in check_expr_field #134148

Merged
merged 1 commit into from
Dec 11, 2024

Conversation

oriongonza
Copy link
Contributor

Nothing special, just a few comments and a couple of small cleanups.

@rustbot
Copy link
Collaborator

rustbot commented Dec 10, 2024

r? @jieyouxu

rustbot has assigned @jieyouxu.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@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 Dec 10, 2024
@oriongonza oriongonza force-pushed the cleanup_check_field_expr branch from 58aadb8 to 66b68a8 Compare December 10, 2024 23:36
@rust-log-analyzer

This comment has been minimized.

@oriongonza oriongonza force-pushed the cleanup_check_field_expr branch from 66b68a8 to 57f8271 Compare December 11, 2024 01:39
@oriongonza oriongonza changed the title Cleanup check field expr add comments in check_expr_field Dec 11, 2024
@@ -2748,6 +2761,8 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
_ => {}
}
}

// We failed to check the expression, report an error.
Copy link
Member

Choose a reason for hiding this comment

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

This comment doesn't really describe what this is doing. It's attempting to emit an error if we end up derefing to an infer var, like calling .field on a base type of &_.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That comment was more general, as in "ok we're no longer in the happy path"

Copy link
Member

Choose a reason for hiding this comment

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

Well it's useful regardless to document the random structural resolve call. Pls do that :)

Copy link
Member

@compiler-errors compiler-errors left a comment

Choose a reason for hiding this comment

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

Please fix the comment

@compiler-errors
Copy link
Member

Then r=me

@oriongonza oriongonza force-pushed the cleanup_check_field_expr branch from 57f8271 to 55806e5 Compare December 11, 2024 12:49
@oriongonza
Copy link
Contributor Author

oriongonza commented Dec 11, 2024

@bors r=compiler-errors

1 similar comment
@Dylan-DPC
Copy link
Member

@bors r=compiler-errors

@bors
Copy link
Collaborator

bors commented Dec 11, 2024

📌 Commit 55806e5 has been approved by compiler-errors

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 Dec 11, 2024
@compiler-errors
Copy link
Member

@bors rollup

bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 11, 2024
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#132975 (De-duplicate and improve definition of core::ffi::c_char)
 - rust-lang#133598 (Change `GetManyMutError` to match T-libs-api decision)
 - rust-lang#134148 (add comments in check_expr_field)
 - rust-lang#134163 (coverage: Rearrange the code for embedding per-function coverage metadata)
 - rust-lang#134165 (wasm(32|64): update alignment string)
 - rust-lang#134170 (Subtree update of `rust-analyzer`)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 90a42c2 into rust-lang:master Dec 11, 2024
6 checks passed
@rustbot rustbot added this to the 1.85.0 milestone Dec 11, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Dec 11, 2024
Rollup merge of rust-lang#134148 - dev-ardi:cleanup_check_field_expr, r=compiler-errors

add comments in check_expr_field

Nothing special, just a few comments and a couple of small cleanups.
github-actions bot pushed a commit to tautschnig/verify-rust-std that referenced this pull request Mar 11, 2025
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#132975 (De-duplicate and improve definition of core::ffi::c_char)
 - rust-lang#133598 (Change `GetManyMutError` to match T-libs-api decision)
 - rust-lang#134148 (add comments in check_expr_field)
 - rust-lang#134163 (coverage: Rearrange the code for embedding per-function coverage metadata)
 - rust-lang#134165 (wasm(32|64): update alignment string)
 - rust-lang#134170 (Subtree update of `rust-analyzer`)

r? `@ghost`
`@rustbot` modify labels: rollup
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.

7 participants