Skip to content

Commit

Permalink
Rollup merge of rust-lang#124687 - fee1-dead-contrib:private-clauses,…
Browse files Browse the repository at this point in the history
… 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.
  • Loading branch information
compiler-errors authored May 4, 2024
2 parents d7c07eb + 921e74f commit d67586e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_hir_analysis/src/bounds.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use rustc_span::Span;
/// 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> {
Expand Down

0 comments on commit d67586e

Please sign in to comment.