Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | handle array pattern matching type inference | Josh Mcguigan | 2020-03-01 | 2 | -10/+55 |
| | |||||
* | remove match statement, handle suffix | Josh Mcguigan | 2020-03-01 | 2 | -14/+11 |
| | |||||
* | handle arbitrary length slices | Josh Mcguigan | 2020-03-01 | 2 | -12/+29 |
| | |||||
* | match single prefix slice | Josh Mcguigan | 2020-03-01 | 2 | -1/+48 |
| | |||||
* | Do autoderef for indexing | Florian Diebold | 2020-02-29 | 4 | -7/+74 |
| | |||||
* | Do array unsizing for method receivers | Florian Diebold | 2020-02-29 | 2 | -2/+37 |
| | | | | | | | 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. | ||||
* | Rename ast::ImplBlock -> ast::ImplDef | Aleksey Kladov | 2020-02-29 | 6 | -29/+28 |
| | |||||
* | Fix a common false-positive type mismatch | Florian Diebold | 2020-02-29 | 3 | -9/+71 |
| | | | | | | | | | 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. | ||||
* | Basic injections | Aleksey Kladov | 2020-02-27 | 1 | -2/+2 |
| | |||||
* | Bump chalk and replace TypeFamily with Interner | Laurențiu Nicola | 2020-02-24 | 2 | -56/+65 |
| | |||||
* | Shorten some code | Florian Diebold | 2020-02-22 | 1 | -4/+1 |
| | |||||
* | Rework find_super_trait_path to protect against cycles | Florian Diebold | 2020-02-22 | 5 | -23/+74 |
| | |||||
* | Fix shift_bound_vars | Florian Diebold | 2020-02-22 | 1 | -3/+3 |
| | | | | It should only shift free vars (maybe the name isn't the best...) | ||||
* | Fix wrong handling of bare `dyn Trait` exposed by canonicalizer fix | Florian Diebold | 2020-02-22 | 1 | -1/+3 |
| | | | | | 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. | ||||
* | Add &dyn Trait -> &dyn SuperTrait coercion, and fix &T -> &dyn Trait | Florian Diebold | 2020-02-22 | 4 | -44/+132 |
| | |||||
* | Fix handling of binders in canonicalization | Florian Diebold | 2020-02-22 | 1 | -64/+35 |
| | | | | I'm looking forward to getting rid of this in favor of Chalk's implementation. | ||||
* | Implement dyn Trait unsizing as well | Florian Diebold | 2020-02-22 | 5 | -9/+136 |
| | |||||
* | Implement unsize coercion using proper trait solving | Florian Diebold | 2020-02-22 | 5 | -187/+170 |
| | |||||
* | Fix handling of const patterns | Florian Diebold | 2020-02-21 | 2 | -2/+48 |
| | | | | | | | | | 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. | ||||
* | Normalize associated types in types coming from Chalk | Florian Diebold | 2020-02-21 | 2 | -1/+46 |
| | | | | Fixes #3232. | ||||
* | Merge #3215 | bors[bot] | 2020-02-19 | 2 | -6/+34 |
|\ | | | | | | | | | | | | | | | | | | | 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]> | ||||
| * | Exclude methods from non-parameter types introduced by generic constraints | Laurențiu Nicola | 2020-02-19 | 2 | -6/+34 |
| | | |||||
* | | Fill missing fields of enum variants | Aleksey Kladov | 2020-02-19 | 1 | -7/+11 |
|/ | |||||
* | More manual clippy fixes | Kirill Bulatov | 2020-02-18 | 12 | -54/+38 |
| | |||||
* | Run cargo +nightly fix --clippy -Z unstable-options | Kirill Bulatov | 2020-02-18 | 10 | -76/+66 |
| | |||||
* | Merge #3169 | bors[bot] | 2020-02-17 | 1 | -4/+5 |
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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]> | ||||
| * | use 'if let' instead of match on kind in lower.rs | adamrk | 2020-02-17 | 1 | -6/+4 |
| | | |||||
| * | replace uses of VariantData::is_unit with VariantData::kind | adamrk | 2020-02-16 | 1 | -4/+7 |
| | | |||||
* | | Fix coercion of &T to itself | Florian Diebold | 2020-02-16 | 2 | -0/+24 |
| | | | | | | | | | | The autoderef coercion logic did not handle matching placeholders. This led to some type mismatches. | ||||
* | | Extend analysis-stats a bit | Florian Diebold | 2020-02-15 | 1 | -0/+3 |
|/ | | | | | | | | | | | | 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. | ||||
* | Merge #3147 | bors[bot] | 2020-02-14 | 3 | -0/+42 |
|\ | | | | | | | | | | | | | | | 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]> | ||||
| * | Check that impl self type matches up with expected self type in path mode | Florian Diebold | 2020-02-14 | 3 | -0/+42 |
| | | | | | | | | Fixes #3144. | ||||
* | | Make Self implement the trait inside trait default methods | Florian Diebold | 2020-02-14 | 3 | -4/+77 |
|/ | |||||
* | Move hir_fmt code to display module | Florian Diebold | 2020-02-14 | 2 | -372/+376 |
| | |||||
* | Rename Ty::Param => Ty::Placeholder | Florian Diebold | 2020-02-14 | 3 | -11/+11 |
| | | | | This aligns more with Chalk. | ||||
* | Don't let unknown match arms fall back to ! | Florian Diebold | 2020-02-11 | 2 | -1/+22 |
| | |||||
* | Add or- and parenthesized-patterns | Matthew Jasper | 2020-02-09 | 2 | -3/+13 |
| | |||||
* | Add two more tests | Florian Diebold | 2020-02-07 | 1 | -0/+51 |
| | |||||
* | Fix some TODOs | Florian Diebold | 2020-02-07 | 3 | -11/+17 |
| | |||||
* | Don't print implicit type args from impl Trait | Florian Diebold | 2020-02-07 | 2 | -14/+21 |
| | |||||
* | Deal better with implicit type parameters and argument lists | Florian Diebold | 2020-02-07 | 4 | -26/+138 |
| | |||||
* | Formatting | Florian Diebold | 2020-02-07 | 9 | -38/+82 |
| | |||||
* | Clean up RPIT a bit | Florian Diebold | 2020-02-07 | 4 | -41/+13 |
| | |||||
* | Fix compilation of other crates | Florian Diebold | 2020-02-07 | 2 | -4/+10 |
| | |||||
* | Use variables in predicates as well | Florian Diebold | 2020-02-07 | 5 | -63/+52 |
| | |||||
* | Comment fixes / todos | Florian Diebold | 2020-02-07 | 3 | -6/+8 |
| | |||||
* | Fix APIT some more | Florian Diebold | 2020-02-07 | 4 | -101/+115 |
| | |||||
* | Fix APIT | Florian Diebold | 2020-02-07 | 1 | -0/+2 |
| | |||||
* | Change Ty::Param to contain param ID | Florian Diebold | 2020-02-07 | 11 | -127/+136 |
| | |||||
* | WIP use params for APIT | Florian Diebold | 2020-02-07 | 3 | -1/+64 |
| |