)]}'
{
  "commit": "dfe970a67cd82f1cf3672e6fcba0c80bd11f7a4d",
  "tree": "eb5a647d5710f325f69e69ad6021abe98988e856",
  "parents": [
    "3d1c0b9c409ba43abc6142f185213fc8c7a1f316"
  ],
  "author": {
    "name": "Esteban Küber",
    "email": "esteban@kuber.com.ar",
    "time": "Sun Nov 15 19:41:46 2026 +0000"
  },
  "committer": {
    "name": "Esteban Küber",
    "email": "esteban@kuber.com.ar",
    "time": "Sun Nov 15 19:44:47 2026 +0000"
  },
  "message": "Detect method shadowed by another when accessing a method in method chain\n\nWhen failing to find a method after another method call, look for other methods with the same name on the receiver that are shadowed and have a return type that has the method we couldn\u0027t find:\n\n```\nerror[E0599]: no method named `method` found for unit type `()` in the current scope\n  --\u003e $DIR/method-shadowed-by-trait.rs:104:13\n   |\nLL |     x.foo().method();\n   |       ---   ^^^^^^ method not found in `()`\n   |       |\n   |       this method is `a::T::foo`\n   |\nnote: this returns `()`\n  --\u003e $DIR/method-shadowed-by-trait.rs:71:9\n   |\nLL |     pub trait T {\nLL |         fn foo(\u0026self) {}\n   |         ^^^^^^^^^^^^^\nnote: you might have meant to call `a::K::foo` instead\n  --\u003e $DIR/method-shadowed-by-trait.rs:78:9\n   |\nLL |     pub trait K {\nLL |         fn foo(\u0026self) -\u003e Other { Other { field : () } }\n   |         ^^^^^^^^^^^^^^^^^^^^^^\nnote: you might have meant to call `a::V::foo` instead\n  --\u003e $DIR/method-shadowed-by-trait.rs:85:9\n   |\nLL |     pub trait V {\nLL |         fn foo(\u0026self) -\u003e Other;\n   |         ^^^^^^^^^^^^^^^^^^^^^^^\nnote: you might have meant to call `S::foo` instead\n  --\u003e $DIR/method-shadowed-by-trait.rs:64:5\n   |\nLL | impl S {\nLL |     fn foo(\u0026self) -\u003e Other { Other { field: () } }\n   |     ^^^^^^^^^^^^^^^^^^^^^^\nhelp: consider calling `a::K::foo` using the fully-qualified path\n   |\nLL -     x.foo().method();\nLL +     \u003c_ as K\u003e::foo(\u0026x).method();\n   |\nhelp: consider calling `a::V::foo` using the fully-qualified path\n   |\nLL -     x.foo().method();\nLL +     \u003c_ as V\u003e::foo(\u0026x).method();\n   |\nhelp: consider calling `S::foo` using the fully-qualified path\n   |\nLL -     x.foo().method();\nLL +     S::foo(\u0026x).method();\n   |\n```\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "1296c0e874d8f00b1af7578bfac2b155b002f6c7",
      "old_mode": 33188,
      "old_path": "compiler/rustc_hir_typeck/src/expr.rs",
      "new_id": "3823461805dfc4622c2a1432a6f833f87ceddc06",
      "new_mode": 33188,
      "new_path": "compiler/rustc_hir_typeck/src/expr.rs"
    },
    {
      "type": "modify",
      "old_id": "d4487bfaea67cf5d86cd8cf20aa682edf7b0a2a9",
      "old_mode": 33188,
      "old_path": "compiler/rustc_hir_typeck/src/method/suggest.rs",
      "new_id": "69aa84aed10729dc06356457e50901c9fec62c77",
      "new_mode": 33188,
      "new_path": "compiler/rustc_hir_typeck/src/method/suggest.rs"
    },
    {
      "type": "modify",
      "old_id": "fb80fe2b5a0d8871b78775c64d465cc9ac45f2bc",
      "old_mode": 33188,
      "old_path": "tests/ui/async-await/in-trait/dont-project-to-specializable-projection.stderr",
      "new_id": "3154c880ad673aff75e7ea9dee9cbbee5377ba24",
      "new_mode": 33188,
      "new_path": "tests/ui/async-await/in-trait/dont-project-to-specializable-projection.stderr"
    },
    {
      "type": "modify",
      "old_id": "48ef7985abefccdd2a95dd9a7d44ec59fa83c592",
      "old_mode": 33188,
      "old_path": "tests/ui/methods/method-shadowed-by-trait.rs",
      "new_id": "574bfd93d4cd1ace64e770cd496534aaec9a78eb",
      "new_mode": 33188,
      "new_path": "tests/ui/methods/method-shadowed-by-trait.rs"
    },
    {
      "type": "modify",
      "old_id": "172c6ec911b8f474e110777a219399814dcd1fe8",
      "old_mode": 33188,
      "old_path": "tests/ui/methods/method-shadowed-by-trait.stderr",
      "new_id": "f47fcd001f6ee8a871618e9ac739c9468772f691",
      "new_mode": 33188,
      "new_path": "tests/ui/methods/method-shadowed-by-trait.stderr"
    }
  ]
}
