Repository navigation
Silence redundant failed obligations on the same statement - #163913
Conversation
|
changes to the core type system cc @lcnr |
|
r? @oli-obk rustbot has assigned @oli-obk. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
5aa46fd to
1151b3e
Compare
|
Easier to review per-comit: first add mild mechanic changes to have more tracking to be used later, added the tests that I wanted to tackle, and finally the actual logic change that affects the emitted errors. |
| field_ty, | ||
| expr.span, | ||
| ObligationCauseCode::Misc, | ||
| ObligationCauseCode::WellFormed(WellFormedLoc::None), |
There was a problem hiding this comment.
may be worth figuring out a WellFormedLoc for, as this is the only use of None that won't be removed when the old solver gets nuked Soon ™️
There was a problem hiding this comment.
Using the HirId of the expr doesn't change anything today (because it is the offset_of! macro which already points at the whole expr), but might in the future. Changed in the last commit.
|
Reminder, once the PR becomes ready for a review, use |
1151b3e to
55d1925
Compare
|
@bors r+ |
Silence redundant failed obligations on the same statement Fix rust-lang#84346, fix rust-lang#105753. On multiple unment obligations in the same method chain, only emit one. On unmet `Sized` obligations on a binding, its type and its init expression, only emit one.
|
💔 I suspect this PR failed tests as part of a rollup After fixing the problem, consider running a try job for the failed job before re-approving. Link to failure: #163984 (comment) |
|
This pull request was unapproved. This PR was contained in a rollup (#163984), which was unapproved. |
Carry more information for well-formed obligations coming from expressions.
Reduces the number of errors being emitted by a single unmet `Sized` (or other) bound in method call chains.
9d0888f to
83bd0e0
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
@bors r=oli-obk |
…uwer Rollup of 19 pull requests Successful merges: - #156112 (Distinguish `repr(C)` ZSTs from others in ABI computation) - #157941 (Deny partial `-Z stack-protector` by default in all editions) - #163462 (Fix COFF renaming of decorated (stdcall/fastcall/vectorcall) exports) - #163855 (Include enclosing item's context on const errors) - #163861 (Run LLDB debuginfo tests on `x86_64-mingw`) - #163913 ( Silence redundant failed obligations on the same statement) - #161201 (Speed up tidy again) - #163380 (Tweak "name not found" resolution error when it happens from within a derive expansion) - #163538 (Add `rustc::missing_generic_type_visitable` lint) - #163617 (mips: make `Complex<T>` ABI match GCC) - #163772 (comptime fn error: suggest wrapping in const block) - #163813 (use pre-borrowck typing env for early MIR validation) - #163924 (replace instances of NonNull::new(&mut x).expect("...") with NonNull::from_mut) - #163958 (only make `RustaceansAreAwesome` satisfy trait clauses) - #163960 (vexos: clear .bss from assembly) - #163974 (Condense AdtDef lang item checks into one match) - #163979 (Add `bf16` to arm features) - #163989 (Revert "compiletest: stream output of executor process when --no-capture is set") - #163995 (m68k-unknown-none-elf: Remove code model) Failed merges: - #163832 (reject non-async coroutine closures as async callables) - #163972 (const-eval: ICE when we hit a non-const fn)
Rollup merge of #163913 - estebank:wellformedloc, r=oli-obk Silence redundant failed obligations on the same statement Fix #84346, fix #105753. On multiple unment obligations in the same method chain, only emit one. On unmet `Sized` obligations on a binding, its type and its init expression, only emit one.
Fix #84346, fix #105753.
On multiple unment obligations in the same method chain, only emit one. On unmet
Sizedobligations on a binding, its type and its init expression, only emit one.