Skip to content

Commit

Permalink
Merge pull request #1753 from dtolnay/precisecapture
Browse files Browse the repository at this point in the history
Add TypeParamBound::PreciseCapture
  • Loading branch information
dtolnay authored Oct 20, 2024
2 parents 53662cf + 94d7d5e commit b387249
Show file tree
Hide file tree
Showing 14 changed files with 511 additions and 46 deletions.
8 changes: 6 additions & 2 deletions src/classify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,9 @@ pub(crate) fn trailing_unparameterized_path(mut ty: &Type) -> bool {
) -> ControlFlow<bool, &Type> {
match bounds.last().unwrap() {
TypeParamBound::Trait(t) => last_type_in_path(&t.path),
TypeParamBound::Lifetime(_) | TypeParamBound::Verbatim(_) => ControlFlow::Break(false),
TypeParamBound::Lifetime(_)
| TypeParamBound::PreciseCapture(_)
| TypeParamBound::Verbatim(_) => ControlFlow::Break(false),
}
}
}
Expand Down Expand Up @@ -378,7 +380,9 @@ pub(crate) fn expr_trailing_brace(mut expr: &Expr) -> bool {
Some(t) => ControlFlow::Continue(t),
None => ControlFlow::Break(false),
},
TypeParamBound::Lifetime(_) => ControlFlow::Break(false),
TypeParamBound::Lifetime(_) | TypeParamBound::PreciseCapture(_) => {
ControlFlow::Break(false)
}
TypeParamBound::Verbatim(t) => ControlFlow::Break(tokens_trailing_brace(t)),
}
}
Expand Down
30 changes: 30 additions & 0 deletions src/gen/clone.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 39 additions & 0 deletions src/gen/debug.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 34 additions & 0 deletions src/gen/eq.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

52 changes: 52 additions & 0 deletions src/gen/fold.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 37 additions & 1 deletion src/gen/hash.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b387249

Please sign in to comment.