diff options
| author | bors <bors@rust-lang.org> | 2024-01-23 20:43:38 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-01-23 20:43:38 +0000 |
| commit | 5d3d3479d774754856db2db3e439dfb88ef3c52f (patch) | |
| tree | c1fb20b5e72855a5a638b349d6c69ba76ae1a0fd /compiler/rustc_hir_analysis/src | |
| parent | dfe53afaebd817f334d8ef9dc75a5cd2562cf6e6 (diff) | |
| parent | 08bac31f8f95a9cf2bdcbecfb65ca8de5b644699 (diff) | |
| download | rust-5d3d3479d774754856db2db3e439dfb88ef3c52f.tar.gz rust-5d3d3479d774754856db2db3e439dfb88ef3c52f.zip | |
Auto merge of #120281 - fmease:rollup-9nxail8, r=fmease
Rollup of 10 pull requests Successful merges: - #119028 (Add more weirdness to weird-exprs.rs) - #119805 (Suggest array::from_fn for array initialization) - #120188 (compiler: update freebsd and netbsd base specs.) - #120215 (Update some deps with `bitflags` v1 dependencies) - #120244 (Use `Self` in `NonZero*` implementations.) - #120246 (Re-add estebank to review rotation) - #120252 (rename `RawTy` to `LoweredTy`) - #120255 (correct my mailmap entry) - #120270 (A bunch of random modifications) - #120280 (Move condition enabling the pass to `is_enabled`) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_hir_analysis/src')
| -rw-r--r-- | compiler/rustc_hir_analysis/src/autoderef.rs | 3 | ||||
| -rw-r--r-- | compiler/rustc_hir_analysis/src/check/compare_impl_item.rs | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/compiler/rustc_hir_analysis/src/autoderef.rs b/compiler/rustc_hir_analysis/src/autoderef.rs index 556560945e9..5bc904e5930 100644 --- a/compiler/rustc_hir_analysis/src/autoderef.rs +++ b/compiler/rustc_hir_analysis/src/autoderef.rs @@ -12,7 +12,9 @@ use rustc_trait_selection::traits::StructurallyNormalizeExt; #[derive(Copy, Clone, Debug)] pub enum AutoderefKind { + /// A true pointer type, such as `&T` and `*mut T`. Builtin, + /// A type which must dispatch to a `Deref` implementation. Overloaded, } @@ -83,6 +85,7 @@ impl<'a, 'tcx> Iterator for Autoderef<'a, 'tcx> { (AutoderefKind::Builtin, ty) } } else if let Some(ty) = self.overloaded_deref_ty(self.state.cur_ty) { + // The overloaded deref check already normalizes the pointee type. (AutoderefKind::Overloaded, ty) } else { return None; diff --git a/compiler/rustc_hir_analysis/src/check/compare_impl_item.rs b/compiler/rustc_hir_analysis/src/check/compare_impl_item.rs index 5b264f6f034..57829d9d418 100644 --- a/compiler/rustc_hir_analysis/src/check/compare_impl_item.rs +++ b/compiler/rustc_hir_analysis/src/check/compare_impl_item.rs @@ -254,7 +254,7 @@ fn compare_method_predicate_entailment<'tcx>( // checks. For the comparison to be valid, we need to // normalize the associated types in the impl/trait methods // first. However, because function types bind regions, just - // calling `normalize_associated_types_in` would have no effect on + // calling `FnCtxt::normalize` would have no effect on // any associated types appearing in the fn arguments or return // type. |
