-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't super-fold types when we hit the recursion limit
- Loading branch information
1 parent
e6e931d
commit c91f60e
Showing
3 changed files
with
21 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
tests/ui/type-alias-impl-trait/infinite-cycle-involving-weak.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#![feature(type_alias_impl_trait)] | ||
|
||
type T = impl Copy; | ||
//~^ ERROR cannot resolve opaque type | ||
|
||
static STATIC: T = None::<&'static T>; | ||
|
||
fn main() {} |
9 changes: 9 additions & 0 deletions
9
tests/ui/type-alias-impl-trait/infinite-cycle-involving-weak.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
error[E0720]: cannot resolve opaque type | ||
--> $DIR/infinite-cycle-involving-weak.rs:3:10 | ||
| | ||
LL | type T = impl Copy; | ||
| ^^^^^^^^^ cannot resolve opaque type | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0720`. |