rust/compiler/rustc_ty_utils/src
Nicholas Nethercote 7024dc523a Overhaul RegionKind and Region.
Specifically, change `Region` from this:
```
pub type Region<'tcx> = &'tcx RegionKind;
```
to this:
```
pub struct Region<'tcx>(&'tcx Interned<RegionKind>);
```

This now matches `Ty` and `Predicate` more closely.

Things to note
- Regions have always been interned, but we haven't been using pointer-based
  `Eq` and `Hash`. This is now happening.
- I chose to impl `Deref` for `Region` because it makes pattern matching a lot
  nicer, and `Region` can be viewed as just a smart wrapper for `RegionKind`.
- Various methods are moved from `RegionKind` to `Region`.
- There is a lot of tedious sigil changes.
- A couple of types like `HighlightBuilder`, `RegionHighlightMode` now have a
  `'tcx` lifetime because they hold a `Ty<'tcx>`, so they can call `mk_region`.
- A couple of test outputs change slightly, I'm not sure why, but the new
  outputs are a little better.
2022-02-15 16:08:52 +11:00
..
assoc.rs Store a Symbol instead of an Ident in AssocItem 2022-01-19 17:13:21 -05:00
common_traits.rs Don't consider !Unpin references as noalias 2021-03-21 20:10:53 +01:00
instance.rs Overhaul RegionKind and Region. 2022-02-15 16:08:52 +11:00
lib.rs Move associated_item* providers to their own module 2022-01-07 13:23:35 -08:00
needs_drop.rs use try_normalize_erasing_regions in needs_drop 2021-12-02 23:27:08 +01:00
representability.rs Overhaul TyS and Ty. 2022-02-15 16:03:24 +11:00
ty.rs Overhaul RegionKind and Region. 2022-02-15 16:08:52 +11:00