-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
cycle detected when checking effective visibility
hides relevant diagnostics message
#119502
Labels
C-bug
Category: This is a bug.
I-cycle
Issue: A query cycle occurred while none was expected
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
Lymkwi
added
A-diagnostics
Area: Messages for errors, warnings, and lints
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
labels
Jan 1, 2024
rustbot
added
the
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
label
Jan 1, 2024
This is a duplicate of #119346, so I'll close this in favor of that. I do agree that it's a diagnostic issue, so I will fix it. |
Noratrieb
removed
the
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
label
Jan 2, 2024
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Jan 5, 2024
…bject-safety-error, r=Nilstrieb Use `resolutions(()).effective_visiblities` to avoid cycle errors in `report_object_error` Inside of `report_object_error`, using the `effective_visibilities` query causes cycles since it calls `type_of`, which itself may call `typeck`, which may end up reporting its own object-safety errors. Fixes rust-lang#119346 Fixes rust-lang#119502
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Jan 5, 2024
…bject-safety-error, r=Nilstrieb Use `resolutions(()).effective_visiblities` to avoid cycle errors in `report_object_error` Inside of `report_object_error`, using the `effective_visibilities` query causes cycles since it calls `type_of`, which itself may call `typeck`, which may end up reporting its own object-safety errors. Fixes rust-lang#119346 Fixes rust-lang#119502
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this issue
Jan 5, 2024
…bject-safety-error, r=Nilstrieb Use `resolutions(()).effective_visiblities` to avoid cycle errors in `report_object_error` Inside of `report_object_error`, using the `effective_visibilities` query causes cycles since it calls `type_of`, which itself may call `typeck`, which may end up reporting its own object-safety errors. Fixes rust-lang#119346 Fixes rust-lang#119502
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Jan 5, 2024
…bject-safety-error, r=Nilstrieb Use `resolutions(()).effective_visiblities` to avoid cycle errors in `report_object_error` Inside of `report_object_error`, using the `effective_visibilities` query causes cycles since it calls `type_of`, which itself may call `typeck`, which may end up reporting its own object-safety errors. Fixes rust-lang#119346 Fixes rust-lang#119502
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Jan 5, 2024
…bject-safety-error, r=Nilstrieb Use `resolutions(()).effective_visiblities` to avoid cycle errors in `report_object_error` Inside of `report_object_error`, using the `effective_visibilities` query causes cycles since it calls `type_of`, which itself may call `typeck`, which may end up reporting its own object-safety errors. Fixes rust-lang#119346 Fixes rust-lang#119502
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Jan 5, 2024
Rollup merge of rust-lang#119506 - compiler-errors:visibilities-for-object-safety-error, r=Nilstrieb Use `resolutions(()).effective_visiblities` to avoid cycle errors in `report_object_error` Inside of `report_object_error`, using the `effective_visibilities` query causes cycles since it calls `type_of`, which itself may call `typeck`, which may end up reporting its own object-safety errors. Fixes rust-lang#119346 Fixes rust-lang#119502
fmease
added
I-cycle
Issue: A query cycle occurred while none was expected
C-bug
Category: This is a bug.
and removed
A-diagnostics
Area: Messages for errors, warnings, and lints
labels
Jan 27, 2024
hduoc2003
added a commit
to hduoc2003/axum-diesel-todoapp
that referenced
this issue
Feb 20, 2024
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
C-bug
Category: This is a bug.
I-cycle
Issue: A query cycle occurred while none was expected
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
Current output
Desired output
Rationale and extra context
No response
Other cases
No response
Anything else?
This code is originally extracted from a reduction of a problem found hit on a friend's project. I reduced the code down to something that, confusingly, provides an incorrect diagnostics message.
Originally, the
-> impl Useless
dynamic dispatch wereasync fn
, I just substituted them. The nightly toolchain as of today behaves the same.As a note, the correct output is provided if the statement
let _ = self.sources.len();
is commented out, which is why I think this is related to #119346 , but maybe not the same.The text was updated successfully, but these errors were encountered: