]> git.lizzy.rs Git - rust.git/commit
52985: better cycle error for existential types
authorTristan Burgess <tburgessdev@gmail.com>
Wed, 22 Aug 2018 04:02:07 +0000 (00:02 -0400)
committerTristan Burgess <tburgessdev@gmail.com>
Wed, 22 Aug 2018 22:56:16 +0000 (18:56 -0400)
commit3045ffa512db4fd9745278e43c8e775db2d0d19d
treeb3b2e4846e75fec65816200443618575816f3c9b
parentb75b0471a8b87c44e0bd953d2a5c36d896128723
52985: better cycle error for existential types
  - Original cycle error diagnostics PR'd against this issue caught
panic-causing error while resolving std::mem::transmute calls
  - Now, catch invalid use case of not providing a concrete sized type
behind existential type in definining use case.
  - Update relevant test to reflect this new error

52985: revert normalize query changes
      - PR 53588 invalidates 53316, causing a correct cycle error to occur
    with a good span.
      - Don't need to revert the whole merge as the test files are
    still fine, just need to revert the normalize query changes.
      - It should now be correct that infinite recursion detected during
    normalize query type folding is a bug, should have been caught earlier
    (when resolving the existential type's defining use cases).

52985: code review impl
  - Only cause cycle error if anonymous type resolves to anonymous type
that has the same def id (is the same type) as the original (parent)
type.
  - Add test case to cover this case for existential types.

52985: remove Ty prefix from TyAnon
  - To align with changes per commit 6f637da50c56a22f745fd056691da8c86824cd9b
src/librustc/traits/query/normalize.rs
src/librustc_typeck/check/writeback.rs
src/test/ui/existential_types/nested_existential_types.rs [new file with mode: 0644]
src/test/ui/existential_types/no_inferrable_concrete_type.stderr