rust/crates
bors d3eeadc242 Auto merge of #16852 - ShoyuVanilla:atpit, r=Veykril
feat: Implement ATPIT

Resolves #16584

Note: This implementation only works for ATPIT, not for TAIT.
The main hinderence that blocks the later is the defining sites of TAIT can be inner blocks like in;
```rust
type X = impl Default;

mod foo {
    fn bar() -> super::X {
        ()
    }
}
```
So, to figure out we are defining it or not, we should recursively probe for nested modules and bodies.

For ATPIT, we can just look into current body because `error[E0401]: can't use 'Self' from outer item` prevent such nested structures;

```rust
trait Foo {
    type Item;
    fn foo() -> Self::Item;
}

struct Bar;

impl Foo for Bar {
    type Item = impl Default;
    fn foo() -> Self::Item {
        fn bar() -> Self::Item {
                    ^^^^^^^^^^
                    |
                    use of `Self` from outer item
                    refer to the type directly here instead
            5
        }
        bar()
    }
}
```

But this implementation does not checks for unification of same ATPIT between different bodies, monomorphization, nor layout for similar reason. (But these can be done with lazyness if we can utilize something like "mutation of interned value" with `db`. I coundn't find such thing but I would appreciate it if such thing exists and you could let me know 😅)
2024-03-18 10:38:24 +00:00
..
base-db Merge commit '574e23ec50' into sync-from-ra 2024-03-10 08:47:38 +02:00
cfg Review Updates and added tests. 2024-03-11 11:05:59 -04:00
flycheck Show compilation progress in test explorer 2024-03-15 16:28:59 +03:30
hir remove redundant clone()s 2024-03-17 14:06:21 +01:00
hir-def Repalce Span with SyntaxContextId in MacroCallLoc 2024-03-15 12:47:05 +01:00
hir-expand Remove usages of SpanData where Span suffices 2024-03-15 13:02:40 +01:00
hir-ty Auto merge of #16852 - ShoyuVanilla:atpit, r=Veykril 2024-03-18 10:38:24 +00:00
ide Auto merge of #16860 - Veykril:macarons, r=Veykril 2024-03-18 09:14:08 +00:00
ide-assists fix: typo 2024-03-15 21:14:17 +08:00
ide-completion Auto merge of #16860 - Veykril:macarons, r=Veykril 2024-03-18 09:14:08 +00:00
ide-db Split SymbolKind::Function into Function and Method 2024-03-17 11:07:22 +01:00
ide-diagnostics Auto merge of #16861 - Veykril:macro-diag-exceptions, r=Veykril 2024-03-17 20:41:40 +00:00
ide-ssr internal: Improve rooted upmapping 2024-03-12 13:46:58 +01:00
intern Merge commit '426d2842c1' into sync-from-ra2 2024-01-03 11:35:07 +02:00
limit Merge commit 'ddf105b646' into sync-from-ra 2024-02-11 08:40:19 +02:00
load-cargo Auto merge of #16335 - lnicola:salsa-lz4-file-text, r=Veykril 2024-03-11 13:43:33 +00:00
mbe Remove usages of SpanData where Span suffices 2024-03-15 13:02:40 +01:00
parser Merge commit '574e23ec50' into sync-from-ra 2024-03-10 08:47:38 +02:00
paths Merge commit '4ef6a49b44' into sync-from-ra 2024-03-03 09:17:31 +02:00
proc-macro-api Merge commit '574e23ec50' into sync-from-ra 2024-03-10 08:47:38 +02:00
proc-macro-srv Remove dead test code 2024-03-14 16:24:51 +01:00
proc-macro-srv-cli Merge commit 'ddf105b646' into sync-from-ra 2024-02-11 08:40:19 +02:00
profile Merge commit '574e23ec50' into sync-from-ra 2024-03-10 08:47:38 +02:00
project-model Merge commit '574e23ec50' into sync-from-ra 2024-03-10 08:47:38 +02:00
rust-analyzer Auto merge of #16860 - Veykril:macarons, r=Veykril 2024-03-18 09:14:08 +00:00
salsa Merge commit '574e23ec50' into sync-from-ra 2024-03-10 08:47:38 +02:00
sourcegen Merge commit 'ddf105b646' into sync-from-ra 2024-02-11 08:40:19 +02:00
span Remove usages of SpanData where Span suffices 2024-03-15 13:02:40 +01:00
stdx Remove dead test code 2024-03-14 16:24:51 +01:00
syntax Generate AST in a more stable manner 2024-03-18 09:24:10 +01:00
test-fixture Merge commit '574e23ec50' into sync-from-ra 2024-03-10 08:47:38 +02:00
test-utils Merge commit 'ac998a74b3' into sync-from-ra 2024-02-18 09:41:20 +02:00
text-edit Merge commit 'ddf105b646' into sync-from-ra 2024-02-11 08:40:19 +02:00
toolchain Merge commit '574e23ec50' into sync-from-ra 2024-03-10 08:47:38 +02:00
tt feat: Support macro calls in eager macros for IDE features 2024-03-14 15:40:35 +01:00
vfs Merge commit '574e23ec50' into sync-from-ra 2024-03-10 08:47:38 +02:00
vfs-notify Merge commit 'a911652360' into sync-from-ra 2024-01-21 16:53:06 +02:00