rust/compiler/rustc_passes/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
..
liveness Match unmatched backticks in compiler/ that are part of rustdoc 2023-03-03 08:39:00 +01:00
abi_test.rs Remove extern crate rustc_middle from numerous crates. 2024-04-29 14:50:45 +10:00
check_attr.rs Remove #[macro_use] extern crate tracing from rustc_passes. 2024-05-23 18:02:17 +10:00
check_const.rs Don't require visit_body to take a lifetime that must outlive the function call 2024-05-29 10:04:08 +00:00
dead.rs Create const block DefIds in typeck instead of ast lowering 2024-05-28 13:38:43 +00:00
debugger_visualizer.rs Avoid using feed_unit_query from within queries 2024-03-05 10:02:39 +00:00
diagnostic_items.rs rustc: Use tcx.used_crates(()) more 2024-05-22 18:02:51 +03:00
entry.rs Various improvements to entrypoint code 2024-05-04 14:48:42 +02:00
errors.rs Rollup merge of #123623 - surechen:fix_123261, r=estebank 2024-05-23 07:41:16 +02:00
hir_id_validator.rs Actually create ranged int types in the type system. 2024-04-08 12:02:19 +00:00
hir_stats.rs Rollup merge of #125635 - fmease:mv-type-binding-assoc-item-constraint, r=compiler-errors 2024-05-31 08:50:22 +02:00
lang_items.rs Minor pub and whitespace cleanups. 2024-05-21 14:56:57 +10:00
layout_test.rs Remove extern crate rustc_middle from numerous crates. 2024-04-29 14:50:45 +10:00
lib_features.rs Remove Session methods that duplicate DiagCtxt methods. 2023-12-24 08:05:28 +11:00
lib.rs Remove #[macro_use] extern crate tracing from rustc_passes. 2024-05-23 18:02:17 +10:00
liveness.rs Make body_owned_by return the body directly. 2024-05-29 10:04:08 +00:00
loops.rs Create const block DefIds in typeck instead of ast lowering 2024-05-28 13:38:43 +00:00
naked_functions.rs Rename BindingAnnotation to BindingMode 2024-04-17 09:34:39 -04:00
reachable.rs Remove #[macro_use] extern crate tracing from rustc_passes. 2024-05-23 18:02:17 +10:00
stability.rs Auto merge of #125434 - nnethercote:rm-more-extern-tracing, r=jackh726 2024-05-23 21:36:54 +00:00
upvars.rs Make body_owned_by return the body directly. 2024-05-29 10:04:08 +00:00
weak_lang_items.rs rustc: Use tcx.used_crates(()) more 2024-05-22 18:02:51 +03:00