| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
I.e. `<T as Trait>::Foo`.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds three different representations, copied from the Chalk model:
- `Ty::Projection` is an associated type projection written somewhere in the
code, like `<Foo as Trait>::Bar`.
- `Ty::UnselectedProjection` is similar, but we don't know the trait
yet (`Foo::Bar`).
- The above representations are normalized to their actual types during type
inference. When that isn't possible, for example for `T::Item` inside an `fn
foo<T: Iterator>`, the type is normalized to an application type with
`TypeCtor::AssociatedType`.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| | |
1570: switch to upstream rowan's API r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
|
| | |
|
|/ |
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
1562: Continue support for .await r=matklad a=unrealhoang
- add await expr to ast and HIR Expr
- infer type for `.await`
Co-authored-by: Unreal Hoang <[email protected]>
|
| |
| |
| |
| | |
by projecting inner_ty to Future::Output alias
|
| | |
|
|/ |
|
| |
|
| |
|
|
|
|
|
| |
This seems to be enough to prevent hanging in rust-analyzer, Chalk and the rustc
repo.
|
| |
|
|
|
|
| |
fields
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
1515: Trait environment r=matklad a=flodiebold
This adds the environment, i.e. the set of `where` clauses in scope, when solving trait goals. That means that e.g. in
```rust
fn foo<T: SomeTrait>(t: T) {}
```
, we are able to complete methods of `SomeTrait` on the `t`. This affects the trait APIs quite a bit (since every method that needs to be able to solve for some trait needs to get this environment somehow), so I thought I'd do it rather sooner than later ;)
Co-authored-by: Florian Diebold <[email protected]>
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
I.e. if we are inside a function with some where clauses, we assume these where
clauses hold.
|
| | |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
1512: Infer ? operator r=unrealhoang a=unrealhoang
Logical continuation of https://github.com/rust-analyzer/rust-analyzer/pull/1501
cc https://github.com/rust-analyzer/rust-analyzer/issues/1426
Co-authored-by: Unreal Hoang <[email protected]>
|
| | | |
|
| | | |
|
| |/ |
|
|/ |
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| | |
1501: Infer for loop variable r=flodiebold a=unrealhoang
My take on https://github.com/rust-analyzer/rust-analyzer/issues/1425
Co-authored-by: Unreal Hoang <[email protected]>
|
| | |
|
|\ \
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
1499: processing attribute #[path] of module r=matklad a=andreevlex
support two cases
- simple name file `foo.rs`
- declaration in mod.rs
#1211
Co-authored-by: Alexander Andreev <[email protected]>
|
| | |
|
| | |
|
|/
|
|
|
| |
E.g. if we call `foo<T: Into<u32>>(x)`, that adds an obligation that `x:
Into<u32>`, etc.
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
1491: More clippy r=matklad a=kjeremy
A few more clippy changes.
I'm a little unsure of the second commit. It's the trivially_copy_pass_by_ref lint and there are a number of places in the code we could use it if it makes sense.
Co-authored-by: Jeremy Kolb <[email protected]>
|
| | |
|
|/ |
|
| |
|
|
|
|
|
|
| |
This wasn't a right decision in the first place, the feature flag was
broken in the last rustfmt release, and syntax highlighting of imports
is more important anyway
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This gives a significant speedup, because chalk will call these
functions several times even withing a single revision. The only
significant one here is `impl_data`, but I figured it might be good to
cache others just for consistency.
The results I get are:
Before:
from scratch: 16.081457952s
no change: 15.846493ms
trivial change: 352.95592ms
comment change: 361.998408ms
const change: 457.629212ms
After:
from scratch: 14.910610278s
no change: 14.934647ms
trivial change: 85.633023ms
comment change: 96.433023ms
const change: 171.543296ms
Seems like a nice win!
|
| |
|