rust/crates/hir-ty/src
bors af30656785 Auto merge of #14436 - lowr:patch/normalize-assoc-type-in-path-expr, r=HKalbasi
Normalize associated types in paths in expressions

Part of #14393

When we resolve paths in expressions (either path expressions or paths in struct expressions), there's a need of projection normalization, which `TyLoweringContext` cannot do on its own. We've been properly applying normalization for paths in struct expressions without type anchor, but not for others:

```rust
enum E {
    S { v: i32 }
    Empty,
}

impl Foo for Bar {
    type Assoc = E;
    fn foo() {
        let _ = Self::Assoc::S { v: 42 };   // path in struct expr without type anchor; we already support this
        let _ = <Self>::Assoc::S { v: 42 }; // path in struct expr with type anchor; resolves with this PR
        let _ = Self::Assoc::Empty;         // path expr; resolves with this PR
    }
}
```

With this PR we correctly resolve the whole path, but we need some more tweaks in HIR and/or IDE layers to properly resolve a qualifier (prefix) of such paths and provide IDE features that are pointed out in #14393 to be currently broken.
2023-04-05 10:47:47 +00:00
..
consteval fix: Handle box and raw pointers correctly in builtin_deref 2023-03-29 21:38:32 +02:00
diagnostics Introduce StructFlags 2023-03-30 12:49:08 +02:00
infer Auto merge of #14436 - lowr:patch/normalize-assoc-type-in-path-expr, r=HKalbasi 2023-04-05 10:47:47 +00:00
layout Introduce StructFlags 2023-03-30 12:49:08 +02:00
mir lower adjusts in simple index except the last one 2023-04-01 16:49:32 +03:30
tests Auto merge of #14436 - lowr:patch/normalize-assoc-type-in-path-expr, r=HKalbasi 2023-04-05 10:47:47 +00:00
autoderef.rs Auto merge of #14448 - Veykril:infer-table, r=Veykril 2023-03-30 12:49:23 +00:00
builder.rs beginning of MIR 2023-02-27 23:45:54 +03:30
chalk_db.rs fix: Properly handle local trait impls 2023-03-28 08:34:29 +02:00
chalk_ext.rs Simplify 2023-03-14 20:22:11 +01:00
consteval.rs Support evaluating inherent associated constants with generics 2023-03-21 02:20:30 +03:30
db.rs fix: Properly handle local trait impls 2023-03-28 08:34:29 +02:00
diagnostics.rs lint incoherent inherent impls 2023-03-14 19:20:44 +01:00
display.rs Add View Mir command and fix some bugs 2023-03-06 21:09:09 +03:30
infer.rs Auto merge of #14436 - lowr:patch/normalize-assoc-type-in-path-expr, r=HKalbasi 2023-04-05 10:47:47 +00:00
inhabitedness.rs use FxHashSet instead of FxHashMap 2023-03-28 15:59:16 +03:30
interner.rs Simplify 2023-03-28 16:32:26 +02:00
lang_items.rs Introduce StructFlags 2023-03-30 12:49:08 +02:00
layout.rs Merge branch 'master' into sync-from-rust 2023-03-13 10:21:53 +02:00
lib.rs internal: Don't expose InferenceTable outside of hir-ty 2023-03-30 13:27:10 +02:00
lower.rs Normalize type anchor type before resolving the rest of value paths 2023-03-29 23:37:01 +09:00
mapping.rs
method_resolution.rs Auto merge of #14448 - Veykril:infer-table, r=Veykril 2023-03-30 12:49:23 +00:00
mir.rs Support "for loop" MIR lowering 2023-03-06 21:09:09 +03:30
primitive.rs
test_db.rs internal: Set Durability to HIGH for enable_proc_attr_macros input 2023-03-30 15:11:22 +02:00
tests.rs internal: Rename AstDatabase to ExpandDatabase 2023-03-13 16:35:41 +01:00
tls.rs ⬆️ rust-analyzer 2023-01-09 10:36:22 -08:00
traits.rs fix: Properly handle local trait impls 2023-03-28 08:34:29 +02:00
utils.rs Simplify 2023-03-28 16:32:26 +02:00