]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #56074 - matthewjasper:forbid-recursive-impl-trait, r=nikomatsakis
authorbors <bors@rust-lang.org>
Fri, 4 Jan 2019 14:21:19 +0000 (14:21 +0000)
committerbors <bors@rust-lang.org>
Fri, 4 Jan 2019 14:21:19 +0000 (14:21 +0000)
Forbid recursive impl trait

There is no type T, such that `T = [T; 2]`, but impl Trait could sometimes
be to circumvented this.

This patch makes it a hard error for an opaque type to resolve to such a
"type". Before this can be merged it needs

- [x] A better error message - it's good enough for now.
- [x] A crater run (?) to see if this any real-world code

closes #47659


Trivial merge