Add ast versions of generate{_trait}_impl_text{_intransitive}

This commit is contained in:
DropDemBits 2023-12-10 21:23:21 -05:00
parent 8c0661b2de
commit 3924a0ef7c
No known key found for this signature in database
GPG key ID: 7FE02A6C1EDFA075
2 changed files with 105 additions and 2 deletions

View file

@ -895,7 +895,12 @@ pub fn trait_(
ast_from_text(&text)
}
pub fn type_bound(bound: &str) -> ast::TypeBound {
// FIXME: remove when no one depends on `generate_impl_text_inner`
pub fn type_bound_text(bound: &str) -> ast::TypeBound {
ast_from_text(&format!("fn f<T: {bound}>() {{ }}"))
}
pub fn type_bound(bound: ast::Type) -> ast::TypeBound {
ast_from_text(&format!("fn f<T: {bound}>() {{ }}"))
}