fix: Fix move_bounds assists not working for lifetimes

This commit is contained in:
Lukas Wirth 2025-05-05 13:56:24 +02:00
parent cb18ead726
commit f9c83edf12
8 changed files with 194 additions and 45 deletions

View file

@ -13,6 +13,7 @@
mod quote;
use either::Either;
use itertools::Itertools;
use parser::{Edition, T};
use rowan::NodeOrToken;
@ -881,7 +882,7 @@ pub fn match_arm_list(arms: impl IntoIterator<Item = ast::MatchArm>) -> ast::Mat
}
pub fn where_pred(
path: ast::Type,
path: Either<ast::Lifetime, ast::Type>,
bounds: impl IntoIterator<Item = ast::TypeBound>,
) -> ast::WherePred {
let bounds = bounds.into_iter().join(" + ");