diff options
| author | Jubilee <46493976+workingjubilee@users.noreply.github.com> | 2024-03-12 09:04:03 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-12 09:04:03 -0700 |
| commit | bca8c62776f1f27fd39768b27bb3e8dbfb89fd47 (patch) | |
| tree | b2dba9fa127a844608a6a180ae47e4d6218f0917 | |
| parent | 0b313752486a8a6d3374330b20d6b62953776e2b (diff) | |
| parent | 5336a02d280c8d69e5bbcf2ec11887e4b2aa86e2 (diff) | |
| download | rust-bca8c62776f1f27fd39768b27bb3e8dbfb89fd47.tar.gz rust-bca8c62776f1f27fd39768b27bb3e8dbfb89fd47.zip | |
Rollup merge of #122377 - zetanumbers:discriminant_kind_copypaste_fix, r=oli-obk
Fix discriminant_kind copy paste from the pointee trait case r? `@oli-obk`
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/project.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/project.rs b/compiler/rustc_trait_selection/src/traits/project.rs index 68c03e3c73e..6756b5dec23 100644 --- a/compiler/rustc_trait_selection/src/traits/project.rs +++ b/compiler/rustc_trait_selection/src/traits/project.rs @@ -1061,8 +1061,9 @@ fn assemble_candidates_from_impls<'cx, 'tcx>( // Integers and floats always have `u8` as their discriminant. | ty::Infer(ty::InferTy::IntVar(_) | ty::InferTy::FloatVar(..)) => true, - // type parameters, opaques, and unnormalized projections have pointer - // metadata if they're known (e.g. by the param_env) to be sized + // type parameters, opaques, and unnormalized projections don't have + // a known discriminant and may need to be normalized further or rely + // on param env for discriminant projections ty::Param(_) | ty::Alias(..) | ty::Bound(..) |
