rust/compiler/rustc_resolve/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
..
late Rename HIR TypeBinding to AssocItemConstraint and related cleanup 2024-05-30 22:52:33 +02:00
build_reduced_graph.rs Auto merge of #125105 - nnethercote:rustc_resolve-cleanups, r=estebank 2024-05-18 06:36:44 +00:00
check_unused.rs Rename buffer_lint_with_diagnostic to buffer_lint 2024-05-21 20:16:39 +00:00
def_collector.rs Create const block DefIds in typeck instead of ast lowering 2024-05-28 13:38:43 +00:00
diagnostics.rs Rename buffer_lint_with_diagnostic to buffer_lint 2024-05-21 20:16:39 +00:00
effective_visibilities.rs Auto merge of #125105 - nnethercote:rustc_resolve-cleanups, r=estebank 2024-05-18 06:36:44 +00:00
errors.rs Move "elided lifetime in path" to subdiagnostic struct 2024-04-21 07:45:03 +00:00
ident.rs Rename buffer_lint_with_diagnostic to buffer_lint 2024-05-21 20:16:39 +00:00
imports.rs Rollup merge of #125381 - estebank:issue-96799, r=petrochenkov 2024-05-29 03:25:08 +01:00
late.rs Rollup merge of #125635 - fmease:mv-type-binding-assoc-item-constraint, r=compiler-errors 2024-05-31 08:50:22 +02:00
lib.rs Rollup merge of #125381 - estebank:issue-96799, r=petrochenkov 2024-05-29 03:25:08 +01:00
macros.rs Auto merge of #125326 - weiznich:move/do_not_recommend_to_diganostic_namespace, r=compiler-errors 2024-05-22 04:14:08 +00:00
rustdoc.rs Remove #[macro_use] extern crate tracing from rustc_resolve. 2024-05-10 15:34:41 +10:00