-
Notifications
You must be signed in to change notification settings - Fork 889
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix panic on failure to format generics in enum
- instead of calling unwrap(), restore original snippet when we fail to format generics in enum - we need to propagate this rewrite failure later
- Loading branch information
1 parent
777e25a
commit 733e1ef
Showing
3 changed files
with
89 additions
and
3 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
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,40 @@ | ||
enum En4<'x1, 'x2, T: Tr1<As1: >> { | ||
V0, | ||
V1, | ||
} | ||
|
||
enum _En5<'x1, 'x2, T: Tr1<As1: >> { | ||
_V0, | ||
_V1, | ||
} | ||
|
||
enum En6 | ||
where | ||
T: Tr1<En2<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S>>>>>>>>>>>>>>>>>>>>>>>>, | ||
{ | ||
V0, | ||
V1, | ||
V2, | ||
V3, | ||
} | ||
|
||
enum _En7 | ||
where | ||
T: , | ||
{ | ||
V0, | ||
V1, | ||
} | ||
|
||
fn _make_en7() | ||
where | ||
T: , | ||
{ | ||
|
||
} | ||
|
||
enum EnSelf<T> where Self: Tr1<As1: > { | ||
V0(T), | ||
V1, | ||
V2, | ||
} |
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,42 @@ | ||
enum En4<'x1, 'x2, T: Tr1<As1: >> { | ||
V0, | ||
V1, | ||
} | ||
|
||
enum _En5<'x1, 'x2, T: Tr1<As1: >> { | ||
_V0, | ||
_V1, | ||
} | ||
|
||
enum En6 | ||
where | ||
T: Tr1<En2<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S>>>>>>>>>>>>>>>>>>>>>>>>, | ||
{ | ||
V0, | ||
V1, | ||
V2, | ||
V3, | ||
} | ||
|
||
enum _En7 | ||
where | ||
T:, | ||
{ | ||
V0, | ||
V1, | ||
} | ||
|
||
fn _make_en7() | ||
where | ||
T:, | ||
{ | ||
} | ||
|
||
enum EnSelf<T> | ||
where | ||
Self: Tr1<As1: >, | ||
{ | ||
V0(T), | ||
V1, | ||
V2, | ||
} |