Skip to content

Fix false documentation of FnCtxt::diverges #141728

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

Merged
merged 1 commit into from
May 30, 2025

Conversation

JonathanBrouwer
Copy link
Contributor

While I was working on another issue I came across this false documentation, and was mislead by it.
Therefore I decided to fix this :)

The newly documented usecase is located here:

if !self.diverges.get().is_always()

@rustbot
Copy link
Collaborator

rustbot commented May 29, 2025

r? @BoxyUwU

rustbot has assigned @BoxyUwU.
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 May 29, 2025
@JonathanBrouwer JonathanBrouwer changed the title Fix false documentation Fix false documentation of FnCtxt::diverges May 29, 2025
@compiler-errors
Copy link
Member

Yep, I've seen that comment and have been meaning to change it, but I keep forgetting.

Thanks!

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented May 29, 2025

📌 Commit 8e5d579 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 May 29, 2025
bors added a commit that referenced this pull request May 29, 2025
Rollup of 11 pull requests

Successful merges:

 - #137574 (Make `std/src/num` mirror `core/src/num`)
 - #141384 (Enable review queue tracking)
 - #141448 (A variety of improvements to the codegen backends)
 - #141636 (avoid some usages of `&mut P<T>` in AST visitors)
 - #141676 (float: Disable `total_cmp` sNaN tests for `f16`)
 - #141705 (Add eslint as part of `tidy` run)
 - #141715 (Add `loongarch64` with `d` feature to `f32::midpoint` fast path)
 - #141723 (Provide secrets to try builds with new bors)
 - #141728 (Fix false documentation of FnCtxt::diverges)
 - #141729 (resolve target-libdir directly from rustc)
 - #141732 (creader: Remove extraenous String::clone)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit that referenced this pull request May 29, 2025
Rollup of 11 pull requests

Successful merges:

 - #137574 (Make `std/src/num` mirror `core/src/num`)
 - #141384 (Enable review queue tracking)
 - #141448 (A variety of improvements to the codegen backends)
 - #141636 (avoid some usages of `&mut P<T>` in AST visitors)
 - #141676 (float: Disable `total_cmp` sNaN tests for `f16`)
 - #141705 (Add eslint as part of `tidy` run)
 - #141715 (Add `loongarch64` with `d` feature to `f32::midpoint` fast path)
 - #141723 (Provide secrets to try builds with new bors)
 - #141728 (Fix false documentation of FnCtxt::diverges)
 - #141729 (resolve target-libdir directly from rustc)
 - #141732 (creader: Remove extraenous String::clone)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 710fa11 into rust-lang:master May 30, 2025
9 checks passed
@rustbot rustbot added this to the 1.89.0 milestone May 30, 2025
rust-timer added a commit that referenced this pull request May 30, 2025
Rollup merge of #141728 - JonathanBrouwer:fix-docs, r=compiler-errors

Fix false documentation of FnCtxt::diverges

While I was working on another issue I came across this false documentation, and was mislead by it.
Therefore I decided to fix this :)

The newly documented usecase is located here: https://github.com/rust-lang/rust/blob/38081f22c2d7380f272aa1d7fa9b935637701c2d/compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs#L1968
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.

5 participants