rust/compiler/rustc_hir_analysis/src
Matthias Krüger 379233242b
Rollup merge of #125635 - fmease:mv-type-binding-assoc-item-constraint, r=compiler-errors
Rename HIR `TypeBinding` to `AssocItemConstraint` and related cleanup

Rename `hir::TypeBinding` and `ast::AssocConstraint` to `AssocItemConstraint` and update all items and locals using the old terminology.

Motivation: The terminology *type binding* is extremely outdated. "Type bindings" not only include constraints on associated *types* but also on associated *constants* (feature `associated_const_equality`) and on RPITITs of associated *functions* (feature `return_type_notation`). Hence the word *item* in the new name. Furthermore, the word *binding* commonly refers to a mapping from a binder/identifier to a "value" for some definition of "value". Its use in "type binding" made sense when equality constraints (e.g., `AssocTy = Ty`) were the only kind of associated item constraint. Nowadays however, we also have *associated type bounds* (e.g., `AssocTy: Bound`) for which the term *binding* doesn't make sense.

---

Old terminology (HIR, rustdoc):

```
`TypeBinding`: (associated) type binding
├── `Constraint`: associated type bound
└── `Equality`: (associated) equality constraint (?)
    ├── `Ty`: (associated) type binding
    └── `Const`: associated const equality (constraint)
```

Old terminology (AST, abbrev.):

```
`AssocConstraint`
├── `Bound`
└── `Equality`
    ├── `Ty`
    └── `Const`
```

New terminology (AST, HIR, rustdoc):

```
`AssocItemConstraint`: associated item constraint
├── `Bound`: associated type bound
└── `Equality`: associated item equality constraint OR associated item binding (for short)
    ├── `Ty`: associated type equality constraint OR associated type binding (for short)
    └── `Const`: associated const equality constraint OR associated const binding (for short)
```

r? compiler-errors
2024-05-31 08:50:22 +02:00
..
check Make body_owned_by return the body directly. 2024-05-29 10:04:08 +00:00
coherence Rename Unsafe to Safety 2024-05-17 18:33:37 -03:00
collect Rollup merge of #125635 - fmease:mv-type-binding-assoc-item-constraint, r=compiler-errors 2024-05-31 08:50:22 +02:00
errors Explicitly mention Self 2024-04-20 11:39:43 -04:00
hir_ty_lowering Rollup merge of #125635 - fmease:mv-type-binding-assoc-item-constraint, r=compiler-errors 2024-05-31 08:50:22 +02:00
impl_wf_check Apply nits 2024-05-13 16:55:58 -04:00
outlives Give EarlyBinder a tcx parameter 2024-05-26 20:04:05 -04:00
structured_errors Rename HIR TypeBinding to AssocItemConstraint and related cleanup 2024-05-30 22:52:33 +02:00
variance Add and use generics.is_empty() and generics.is_own_empty, rather than using generics' attributes 2024-05-19 11:10:56 -03:00
autoderef.rs Make builtin_deref just return a Ty 2024-05-09 22:55:00 -04:00
bounds.rs Rename ToPredicate for Upcast 2024-05-16 14:23:47 -04:00
check_unused.rs Remove LintDiagnostic::msg 2024-05-23 04:08:35 +02:00
collect.rs Add lang item for Future::Output 2024-05-29 14:22:56 -04:00
constrained_generic_params.rs Auto merge of #125076 - compiler-errors:alias-term, r=lcnr 2024-05-13 22:20:43 +00:00
errors.rs Rename HIR TypeBinding to AssocItemConstraint and related cleanup 2024-05-30 22:52:33 +02:00
hir_wf_check.rs Remove extern crate rustc_middle from rustc_hir_analysis. 2024-05-13 08:04:47 +10:00
impl_wf_check.rs Rename Generics::params to Generics::own_params 2024-05-09 20:58:46 -04:00
lib.rs Create const block DefIds in typeck instead of ast lowering 2024-05-28 13:38:43 +00:00
structured_errors.rs Rename StructuredDiagnostic as StructuredDiag. 2024-03-05 12:15:12 +11:00