about summary refs log tree commit diff
path: root/src/test/ui/traits/inductive-overflow
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-236/+0
2022-08-18Reword "Required because of the requirements on the impl of ..."Andy Wang-6/+6
2022-04-05Suggest derivable trait on E0277ohno418-0/+4
2022-03-24Properly track `ImplObligation`sEsteban Kuber-1/+5
Instead of probing for all possible impls that could have caused an `ImplObligation`, keep track of its `DefId` and obligation spans for accurate error reporting. Follow up to #89580. Addresses #89418. Remove some unnecessary clones. Tweak output for auto trait impl obligations.
2021-12-11Tweak assoc type obligation spansEsteban Kuber-3/+4
* Point at RHS of associated type in obligation span * Point at `impl` assoc type on projection error * Reduce verbosity of recursive obligations * Point at source of binding lifetime obligation * Tweak "required bound" note * Tweak "expected... found opaque (return) type" labels * Point at set type in impl assoc type WF errors
2021-10-03Deny `where` clauses on `auto` traitsFabian Wolff-4/+4
2021-09-16Point at call span that introduced obligation for the argEsteban Kuber-1/+3
2021-09-02Report cycle error using 'deepest' obligation in the cycleAaron Hill-10/+10
2021-08-16Use note to point at bound introducing requirementEsteban Küber-19/+32
2021-08-11Modify structured suggestion outputEsteban Küber-1/+1
* On suggestions that include deletions, use a diff inspired output format * When suggesting addition, use `+` as underline * Color highlight modified span
2021-05-15Revert to only using opportunistic_resolve_vars for existing placesJack Huey-2/+6
2021-05-14Store Option<Region> as value for RegionVidJack Huey-6/+2
2021-05-14Make the UnifyValue for RegionVid ()Jack Huey-1/+5
2021-04-06Point at `impl` and type defs introducing requirements on E0277Esteban Küber-5/+16
2021-03-31give full path of constraint in suggest_constraining_type_paramhi-rustin-2/+2
revert file bless with nll mode
2021-03-13Avoid sorting predicates by `DefId`Aaron Hill-1/+1
Fixes issue #82920 Even if an item does not change between compilation sessions, it may end up with a different `DefId`, since inserting/deleting an item affects the `DefId`s of all subsequent items. Therefore, we use a `DefPathHash` in the incremental compilation system, which is stable in the face of changes to unrelated items. In particular, the query system will consider the inputs to a query to be unchanged if any `DefId`s in the inputs have their `DefPathHash`es unchanged. Queries are pure functions, so the query result should be unchanged if the query inputs are unchanged. Unfortunately, it's possible to inadvertantly make a query result incorrectly change across compilations, by relying on the specific value of a `DefId`. Specifically, if the query result is a slice that gets sorted by `DefId`, the precise order will depend on how the `DefId`s got assigned in a particular compilation session. If some definitions end up with different `DefId`s (but the same `DefPathHash`es) in a subsequent compilation session, we will end up re-computing a *different* value for the query, even though the query system expects the result to unchanged due to the unchanged inputs. It turns out that we have been sorting the predicates computed during `astconv` by their `DefId`. These predicates make their way into the `super_predicates_that_define_assoc_type`, which ends up getting used to compute the vtables of trait objects. This, re-ordering these predicates between compilation sessions can lead to undefined behavior at runtime - the query system will re-use code built with a *differently ordered* vtable, resulting in the wrong method being invoked at runtime. This PR avoids sorting by `DefId` in `astconv`, fixing the miscompilation. However, it's possible that other instances of this issue exist - they could also be easily introduced in the future. To fully fix this issue, we should 1. Turn on `-Z incremental-verify-ich` by default. This will cause the compiler to ICE whenver an 'unchanged' query result changes between compilation sessions, instead of causing a miscompilation. 2. Remove the `Ord` impls for `CrateNum` and `DefId`. This will make it difficult to introduce ICEs in the first place.
2021-02-09Organize trait test filesBram van den Heuvel-0/+197