Rollup merge of #124687 - fee1-dead-contrib:private-clauses, r=compiler-errors

Make `Bounds.clauses` private

Construct it through `Bounds::default()`, then consume the clauses via the method `Bounds::clauses()`.

This helps with effects desugaring where `clauses()` is not only the clauses within the `clauses` field.
This commit is contained in:
Michael Goulet 2024-05-03 23:34:25 -04:00 committed by GitHub
commit a55d30f53c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -23,7 +23,7 @@
/// include the self type (e.g., `trait_bounds`) but in others we do not
#[derive(Default, PartialEq, Eq, Clone, Debug)]
pub struct Bounds<'tcx> {
pub clauses: Vec<(ty::Clause<'tcx>, Span)>,
clauses: Vec<(ty::Clause<'tcx>, Span)>,
}
impl<'tcx> Bounds<'tcx> {