Use more detailed spans in dyn compat errors within bodies#141580
Merged
bors merged 1 commit intorust-lang:masterfrom May 27, 2025
Merged
Use more detailed spans in dyn compat errors within bodies#141580bors merged 1 commit intorust-lang:masterfrom
bors merged 1 commit intorust-lang:masterfrom
Conversation
This comment was marked as duplicate.
This comment was marked as duplicate.
6f120f9 to
8c0a364
Compare
Contributor
|
This isn't really an alternative to #141439 but instead just an additional cleanup, since my PR still catches cases where the fn foo(_: &dyn NotDynSafe) {}
fn main() {
foo(&1);
}That would still need to be a delayed bug. Let me double check, tho. |
Contributor
|
Yeah, this is a nice improvement for more cases but it definitely doesn't supersede #141439, so I'm gonna keep that one open too lol |
tests/ui/traits/object/canonicalize-fresh-infer-vars-issue-103626.stderr
Show resolved
Hide resolved
Collaborator
|
☔ The latest upstream changes (presumably #141605) made this pull request unmergeable. Please resolve the merge conflicts. |
8c0a364 to
3fff727
Compare
Contributor
Author
|
rebased |
compiler-errors
approved these changes
May 27, 2025
Contributor
|
@bors r+ rollup |
Collaborator
bors
added a commit
that referenced
this pull request
May 27, 2025
…rors Rollup of 17 pull requests Successful merges: - #140591 (Fix malformed suggestion for E0061 when method is a macro token in macro context) - #141536 (Improve `ambiguous_wide_pointer_comparisons` lint compare diagnostics) - #141552 (Pull out dedicated `cfg_version` syntax test from feature gate test) - #141556 (bootstrap: translate Windows paths in a way that works for both Cygwin and MSYS2) - #141563 (Remove out-of-date `noop_*` names.) - #141568 (dist: make sure llvm-project submodule is present) - #141580 (Use more detailed spans in dyn compat errors within bodies) - #141582 (intrinsics, ScalarInt: minor cleanup) - #141584 (Support `opaque_types_defined_by` for `SyntheticCoroutineBody`) - #141587 (Add missing edition directives for async-await tests) - #141594 (Add `generic_arg_infer` test) - #141596 (rustc book: fix erratic sentence by making it more simple) - #141599 (Remove an unnecessary use of `Box::into_inner`.) - #141611 (Update mdbook to 0.4.51) - #141616 (Remove spastorino from vacations) - #141623 (use custom types to clarify arguments to `emit_ptr_va_arg`) - #141635 (further dedup `WalkItemKind` for `mut_visit` and `visit`) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
that referenced
this pull request
May 27, 2025
Rollup merge of #141580 - oli-obk:early-dyn-catches-the-incompat, r=compiler-errors Use more detailed spans in dyn compat errors within bodies Within bodies we can employ the full dyn compat check query instead of only doing the minimal hir ty lowerer one. This in turn gives us better spans and also silences many follow-up duplicate or bogus errors. alternative to #141439, tho I think I could turn the delayed bug from that one into a bug now instead of having an error code path. r? `@compiler-errors` cc `@fmease`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Within bodies we can employ the full dyn compat check query instead of only doing the minimal hir ty lowerer one. This in turn gives us better spans and also silences many follow-up duplicate or bogus errors.
alternative to #141439, tho I think I could turn the delayed bug from that one into a bug now instead of having an error code path.
r? @compiler-errors
cc @fmease