)]}'
{
  "commit": "91baabc43dcd81ba0a2cc1e7fb2f2e72dba1dc0d",
  "tree": "1f0e5970b37617c62519d0b10068ccec5c5410ae",
  "parents": [
    "acb1d05705a6f0be5d56590cd09a0d21cc4949a3",
    "9d5273afde3e05cd41dec4583694f8169ec521c7"
  ],
  "author": {
    "name": "Jacob Pratt",
    "email": "jacob@jhpratt.dev",
    "time": "Tue Jun 09 16:52:57 2026 -0400"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Tue Jun 09 16:52:57 2026 -0400"
  },
  "message": "Rollup merge of #153847 - traviscross:TC/fix-typeoutlives-missing-param-check, r\u003dlcnr\n\nFix marker trait winnowing depending on impl order\n\nStory: I was looking through this code for an unrelated reason and happened to notice the duplicate condition.  That seemed obviously wrong, especially in light of the comment, so I worked backward to what it affected, wrote a test that failed, and then found that the test matched an existing `known-bug` test, which pointed me to rust-lang/rust#109481.\n\n---\n\nThe `TypeOutlives` handler in `evaluate_predicate_recursively` means to check whether a type in a `T: \u0027a` predicate has free regions, bound regions, non-region inference variables, or non-region generic parameters -- and if so, to return `EvaluatedToOkModuloRegions` rather than `EvaluatedToOk`.  Correspondingly, the comment says \"no free lifetimes or generic parameters\".  But the code was mistakenly checking `has_non_region_infer()` twice instead of checking both `has_non_region_infer()` and `has_non_region_param()`.\n\nThis meant that `TypeOutlives(T, \u0027static)` where `T` is a type parameter returned `EvaluatedToOk` -- claiming the result holds unconditionally -- when the correct answer is `EvaluatedToOkModuloRegions`.\n\nThe distinction matters during marker trait winnowing in `prefer_lhs_over_victim`, which uses `must_apply_considering_regions()` (true only for `EvaluatedToOk`) to decide whether one impl beats another when there are multiple candidates.  With the bug, a `T: \u0027static`-bounded impl appeared equally as strong as an unrestricted impl, making the winner depend on source order.  This caused spurious E0310 errors when the more-constrained impl happened to appear after the less-constrained one.\n\nFixes rust-lang/rust#109481.\n\nThis same symptom was originally filed as rust-lang/rust#84917 and fixed in PR rust-lang/rust#88139.  Then PR rust-lang/rust#102472 rewrote the `TypeOutlives` handler, introducing the duplicate `has_non_region_infer()` and losing the param check, regressing this. Around this same time, rust-lang/rust#109481 was filed.  It noted the connection to rust-lang/rust#102472 -- the bug only appeared after it -- but the duplicate condition was not noticed.\n\nr? @lcnr\n\ncc @oli-obk @nikomatsakis\n",
  "tree_diff": []
}
