diff options
| author | Michael Goulet <michael@errs.io> | 2025-03-10 16:50:29 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2025-03-13 21:12:07 +0000 |
| commit | aebbd424607b7797f231bc09f44226fcd3040d7e (patch) | |
| tree | 7d40af273c66af6fa289c9cb2857fdb85337fdb9 /compiler/rustc_middle | |
| parent | f9696dda6e9d88a88c057e93fbc854104996bc33 (diff) | |
Only prefer Sized candidates, and only if they certainly hold
Diffstat (limited to 'compiler/rustc_middle')
| -rw-r--r-- | compiler/rustc_middle/src/traits/select.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/compiler/rustc_middle/src/traits/select.rs b/compiler/rustc_middle/src/traits/select.rs index 749f3c31bf8..aa2ee756bc5 100644 --- a/compiler/rustc_middle/src/traits/select.rs +++ b/compiler/rustc_middle/src/traits/select.rs @@ -95,8 +95,11 @@ pub type EvaluationCache<'tcx, ENV> = Cache<(ENV, ty::PolyTraitPredicate<'tcx>), /// parameter environment. #[derive(PartialEq, Eq, Debug, Clone, TypeVisitable)] pub enum SelectionCandidate<'tcx> { - /// UwU - SizedCandidate, + /// A built-in implementation for the `Sized` trait. This is preferred + /// over all other candidates. + SizedCandidate { + has_nested: bool, + }, /// A builtin implementation for some specific traits, used in cases /// where we cannot rely an ordinary library implementations. |
