| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Lets steal this good naming from Roslyn before I forget about it yet
again.
|
|
|
|
|
| |
Doesn't save much memory (~2 mb), but interning things is generally a
good pattern to follow
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
8945: fix: Make expected type work in more situations r=flodiebold a=flodiebold
Also makes call info show the correct types for generic methods.
![2021-05-23-182952_1134x616_scrot](https://user-images.githubusercontent.com/906069/119269023-dd5a5b00-bbf5-11eb-993a-b6e122c3b9a6.png)
![2021-05-23-183117_922x696_scrot](https://user-images.githubusercontent.com/906069/119269025-dfbcb500-bbf5-11eb-983c-fc415b8428e0.png)
Co-authored-by: Florian Diebold <[email protected]>
|
| | |
|
| | |
|
| | |
|
|/ |
|
| |
|
|
|
|
|
|
|
|
|
| |
The problem was the skipping of binders in
`resolve_method_call_as_callable`; this still doesn't use the _correct_
substitution, but at least it doesn't return a type with free variables
in it.
Fixes #8931.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
We can't do the easy hack that we did before anymore, where we kept
track of whether any inference variables changed since the last time we
rechecked obligations. Instead, we store the obligations in
canonicalized form; that way we can easily check the inference variables
to see whether they have changed since the goal was canonicalized.
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
8813: Get some more array lengths! r=lf- a=lf-
This is built on #8799 and thus contains its changes. I'll rebase it onto master when that one gets merged. It adds support for r-a understanding the length of:
* `let a: [u8; 2] = ...`
* `let a = b"aaa"`
* `let a = [0u8; 4]`
I have added support for getting the values of byte strings, which was not previously there. I am least confident in the correctness of this part and it probably needs some more tests, as we currently have only one test that exercised that part (!).
Fixes #2922.
Co-authored-by: Jade <[email protected]>
|
| |
| |
| |
| |
| | |
* rename ConstExtension->ConstExt
* refactor a manual construction of a Const
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fix #2922: add unknown length as a condition for a type having unknown.
Incorporate reviews:
* Extract some of the const evaluation workings into functions
* Add fixmes on the hacks
* Add tests for impls on specific array lengths (these work!!! 😁)
* Add tests for const generics (indeed we don't support it yet)
|
|/
|
|
| |
Only async semantic token modifier
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
8745: Support goto_type_definition for types r=matklad a=Veykril
I'm unsure if the approach of lowering an `ast::Type` to a `hir::Type` is a good idea, it seems fine to me at least.
Fixes #2882
Co-authored-by: Lukas Tobias Wirth <[email protected]>
|
| | |
|
| | |
|
| | |
|
|/ |
|
|
|
|
|
| |
Type Constructors have *parameters*, when they are substituted with type
*arguments*, we have a type.
|
|
|
|
| |
All def types in hir are unsubstituted
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Store impls for e.g. &Foo with the ones for Foo instead of the big
"other" bucket. This can improve performance and simplifies the HIR impl
search a bit.
|
|
|
|
| |
(Costs a bit of performance, reduces memory usage on RA by ~10%.)
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Almost all uses actually only care about ADT substs, so it's better to
be explicit. The methods were a bad abstraction anyway since they
already didn't include the inner types of e.g. `TyKind::Ref` anymore.
|
| |
|
|
|
|
| |
... just missing the constraints.
|
|
|
|
|
| |
Same as https://github.com/rust-analyzer/rust-analyzer/pull/8376, this
can be computed from other data
|
|
|
|
|
| |
It stores no useful data, since we can derive all fields from
`variant_resolutions`
|
| |
|
| |
|
| |
|
|
|
|
| |
I probably want to get rid of this function completely later.
|
| |
|
| |
|
| |
|
|
|
|
| |
See: https://github.com/bluss/arrayvec/issues/182
|