mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-06 12:16:22 +00:00

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.
For high-level intro to how type checking works in rustc, see the type checking chapter of the rustc dev guide.