-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Use more detailed spans in dyn compat errors within bodies #141580
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
Conversation
This comment was marked as duplicate.
This comment was marked as duplicate.
6f120f9
to
8c0a364
Compare
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. |
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
☔ The latest upstream changes (presumably #141605) made this pull request unmergeable. Please resolve the merge conflicts. |
8c0a364
to
3fff727
Compare
rebased |
@bors r+ rollup |
…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
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`
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