| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| |
| |
| |
| | |
Basically, we need to allow variables in the caller self type to unify with the
impl's declared self type. That requires some more contortions in the variable
handling. I'm looking forward to (hopefully) handling this in a cleaner way when
we switch to Chalk's types and unification code.
|
| | |
|
| | |
|
| | |
|
|/ |
|
| |
|
|
|
|
|
|
|
| |
It turns out rustc actually only unsizes array method receivers, so we don't
need to do any trait solving for this (at least for now).
Fixes #2670.
|
| |
|
|
|
|
|
|
|
|
|
| |
E.g. for `&{ some_string() }` in a context where a `&str` is expected, we
reported a mismatch inside the block. The problem is that we're passing an
expectation of `str` down, but the expectation is more of a hint in this case.
There's a long comment in rustc about this, which I just copied.
Also, fix reported location for type mismatches in macros.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
It should only shift free vars (maybe the name isn't the best...)
|
|
|
|
|
| |
The self type in the `dyn Trait` trait ref should always be ^0, but we didn't
put that in there in the bare case.
|
| |
|
|
|
|
| |
I'm looking forward to getting rid of this in favor of Chalk's implementation.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
E.g. in `match x { None => ... }`, `None` is a path pattern (resolving to the
option variant), not a binding. To determine this, we need to try to resolve the
name during lowering. This isn't too hard since we already need to resolve names
for macro expansion anyway (though maybe a bit hacky).
Fixes #1618.
|
|
|
|
| |
Fixes #3232.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
3215: Exclude methods from non-parameter types introduced by generic constraints r=flodiebold a=lnicola
Fixes #3184.
r? @flodiebold
Co-authored-by: Laurențiu Nicola <[email protected]>
|
| | |
|
|/ |
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
3169: Show record field names in Enum completion r=flodiebold a=adamrk
Adresses https://github.com/rust-analyzer/rust-analyzer/issues/2947.
Previously the details shown when autocompleting an Enum variant would look like the variant was a tuple even if it was a record:
![2020-02-16-15:59:32_crop](https://user-images.githubusercontent.com/16367467/74607233-64f21980-50d7-11ea-99db-e973e29c71d7.png)
This change will show the names of the fields for a record and use curly braces instead of parentheses:
![2020-02-16-15:33:00_crop](https://user-images.githubusercontent.com/16367467/74607251-8ce17d00-50d7-11ea-9d4d-38d198a4aec0.png)
This required exposing the type `adt::StructKind` from `ra_hir` and adding a function
```
kind(self, db: &impl HirDatabase) -> StructKind
```
in the `impl` of `EnumVariant`.
There was also a previously existing function `is_unit(self, db: &impl HirDatabase) -> bool` for `EnumVariant` which I removed because it seemed redundant after adding `kind`.
Co-authored-by: adamrk <[email protected]>
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
The autoderef coercion logic did not handle matching placeholders. This led to
some type mismatches.
|
|/
|
|
|
|
|
|
|
|
|
|
| |
This adds some tools helpful when debugging nondeterminism in analysis-stats:
- a `--randomize` option that analyses everything in random order
- a `-vv` option that prints even more detail
Also add a debug log if Chalk fuel is exhausted (which would be a source of
nondeterminism, but didn't happen in my tests).
I found one source of nondeterminism (rust-lang/chalk#331), but there are still
other cases remaining.
|
|\
| |
| |
| |
| |
| |
| |
| | |
3147: Check that impl self type matches up with expected self type in path mode r=matklad a=flodiebold
Fixes #3144.
Co-authored-by: Florian Diebold <[email protected]>
|
| |
| |
| |
| | |
Fixes #3144.
|
|/ |
|
| |
|
|
|
|
| |
This aligns more with Chalk.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|