Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Handle impl/dyn Trait in method resolution | Florian Diebold | 2019-08-22 | 1 | -30/+52 |
| | | | | | | | | | | | | | When we have one of these, the `Trait` doesn't need to be in scope to call its methods. So we need to consider this when looking for method candidates. (Actually I think the same is true when we have a bound `T: some::Trait`, but we don't handle that yet). At the same time, since Chalk doesn't handle these types yet, add a small hack to skip Chalk in method resolution and just consider `impl Trait: Trait` always true. This is enough to e.g. get completions for `impl Trait`, but since we don't do any unification we won't infer the return type of e.g. `impl Into<i64>::into()`. | ||||
* | Add `impl Trait` and `dyn Trait` types | Florian Diebold | 2019-08-22 | 1 | -0/+120 |
| | | | | | | | - refactor bounds handling in the AST a bit - add HIR for bounds - add `Ty::Dyn` and `Ty::Opaque` variants and lower `dyn Trait` / `impl Trait` syntax to them | ||||
* | Don't add `?` bounds as real bounds | Aleksey Kladov | 2019-08-22 | 1 | -0/+29 |
| | | | | closes #1709 | ||||
* | implement initial type inference for index expressions | Aleksey Kladov | 2019-08-17 | 1 | -0/+14 |
| | |||||
* | Handle placeholder assoc types when Chalk produces them | Florian Diebold | 2019-08-12 | 1 | -0/+49 |
| | |||||
* | Normalize assoc types in more places | Florian Diebold | 2019-08-12 | 1 | -6/+6 |
| | |||||
* | Lower fully qualified associated type paths | Florian Diebold | 2019-08-12 | 1 | -7/+7 |
| | | | | I.e. `<T as Trait>::Foo`. | ||||
* | Add another test for assoc type resolution | Florian Diebold | 2019-08-12 | 1 | -6/+46 |
| | |||||
* | implement while let desugaring | Aleksey Kladov | 2019-08-07 | 1 | -0/+20 |
| | |||||
* | Move assist test, add literal type inference test | Phil Ellison | 2019-07-29 | 1 | -11/+15 |
| | |||||
* | streamline API | Aleksey Kladov | 2019-07-21 | 1 | -4/+2 |
| | |||||
* | Merge #1562 | bors[bot] | 2019-07-20 | 1 | -0/+35 |
|\ | | | | | | | | | | | | | | | | | 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]> | ||||
| * | infer type for await | Unreal Hoang | 2019-07-20 | 1 | -0/+35 |
| | | | | | | | | by projecting inner_ty to Future::Output alias | ||||
* | | rename range -> text_range | Aleksey Kladov | 2019-07-20 | 1 | -1/+1 |
|/ | |||||
* | migrate ra_hir to the new rowan | Aleksey Kladov | 2019-07-19 | 1 | -5/+5 |
| | |||||
* | Merge #1515 | bors[bot] | 2019-07-09 | 1 | -0/+79 |
|\ | | | | | | | | | | | | | | | | | | | | | | | 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]> | ||||
| * | Use environment for associated type normalization as well | Florian Diebold | 2019-07-08 | 1 | -0/+19 |
| | | |||||
| * | Start handling environment in trait resolution | Florian Diebold | 2019-07-08 | 1 | -0/+60 |
| | | | | | | | | | | I.e. if we are inside a function with some where clauses, we assume these where clauses hold. | ||||
* | | beautify tests | Unreal Hoang | 2019-07-09 | 1 | -20/+36 |
| | | |||||
* | | projection over std::ops::Try::Ok to infer try/? | Unreal Hoang | 2019-07-08 | 1 | -0/+37 |
|/ | |||||
* | add projection to infer for loop variable | Unreal Hoang | 2019-07-07 | 1 | -0/+36 |
| | |||||
* | Add trait obligations for where clauses when calling functions/methods | Florian Diebold | 2019-07-06 | 1 | -21/+113 |
| | | | | | E.g. if we call `foo<T: Into<u32>>(x)`, that adds an obligation that `x: Into<u32>`, etc. | ||||
* | allow rustfmt to reorder imports | Aleksey Kladov | 2019-07-04 | 1 | -7/+8 |
| | | | | | | 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 | ||||
* | Add test for autoderef infinite recursion | Florian Diebold | 2019-06-16 | 1 | -0/+25 |
| | |||||
* | Simplifications / cleanup from review | Florian Diebold | 2019-06-16 | 1 | -1/+0 |
| | |||||
* | Somewhat handle variables in the derefed type, and add another test | Florian Diebold | 2019-06-15 | 1 | -0/+31 |
| | |||||
* | Add test for Deref | Florian Diebold | 2019-06-15 | 1 | -0/+29 |
| | |||||
* | remove some hacks from nameresolution for macros | Aleksey Kladov | 2019-06-08 | 1 | -2/+4 |
| | |||||
* | add tests for primitive types | Aleksey Kladov | 2019-05-30 | 1 | -0/+18 |
| | |||||
* | fix syntax errors in tests | Aleksey Kladov | 2019-05-28 | 1 | -112/+128 |
| | |||||
* | Add infer for generic default type | Edwin Cheng | 2019-05-19 | 1 | -0/+29 |
| | |||||
* | make AstId untyped | Aleksey Kladov | 2019-05-13 | 1 | -1/+1 |
| | |||||
* | Use traits from prelude for method resolution | Florian Diebold | 2019-05-12 | 1 | -0/+29 |
| | |||||
* | Blacklist some traits from being considered in where clauses | Florian Diebold | 2019-05-12 | 1 | -6/+6 |
| | | | | | | | For Send/Sync/Sized, we don't handle auto traits correctly yet and because they have a lot of impls, they can easily lead to slowdowns. In the case of Fn/FnMut/FnOnce, we don't parse the special Fn notation correctly yet and don't handle closures yet, so we are very unlikely to find an impl. | ||||
* | Add support for inline bounds | Florian Diebold | 2019-05-11 | 1 | -0/+33 |
| | | | | E.g. impl<T: Clone> Foo for T. | ||||
* | Reduce Chalk max_size parameter, add test for slow case | Florian Diebold | 2019-05-11 | 1 | -0/+29 |
| | |||||
* | Handle Chalk conversion for FnDef | Florian Diebold | 2019-05-11 | 1 | -0/+13 |
| | |||||
* | Handle resolution errors in where clauses | Florian Diebold | 2019-05-11 | 1 | -0/+15 |
| | | | | | This is slightly hacky, but maybe more elegant than alternative solutions: We just use a hardcoded Chalk trait ID which we special-case to have no impls. | ||||
* | Handle where clauses in trait solving | Florian Diebold | 2019-05-11 | 1 | -3/+38 |
| | |||||
* | fill struct fields diagnostic | Sergey Parilin | 2019-05-06 | 1 | -0/+1 |
| | |||||
* | Chalk integration | Florian Diebold | 2019-05-04 | 1 | -1/+1 |
| | | | | | - add proper canonicalization logic - add conversions from/to Chalk IR | ||||
* | Introduced resolve_macro_call on resolver | Lenard Pratt | 2019-04-23 | 1 | -0/+26 |
| | | | | | | changed to manual expansion fix for nested macros | ||||
* | Add HIR for where clauses & ignore impls with where clauses in trait resolution | Florian Diebold | 2019-04-21 | 1 | -0/+17 |
| | | | | | This prevents any `impl<T> Trait for T where ...` from being treated as a blanket impl while we don't handle where clauses yet. | ||||
* | Add a simple test for str method completion | Florian Diebold | 2019-04-20 | 1 | -0/+22 |
| | |||||
* | Fix 1099 | Edwin Cheng | 2019-04-17 | 1 | -2/+61 |
| | |||||
* | Refactor method candidate generation a bit | Florian Diebold | 2019-04-14 | 1 | -0/+65 |
| | | | | | | This fixes the order in which candidates are chosen a bit (not completely though, as the ignored test demonstrates), and makes autoderef work with trait methods. As a side effect, this also makes completion of trait methods work :) | ||||
* | More trait infrastructure | Florian Diebold | 2019-04-14 | 1 | -8/+43 |
| | | | | | | | | | | - make it possible to get parent trait from method - add 'obligation' machinery for checking that a type implements a trait (and inferring facts about type variables from that) - handle type parameters of traits (to a certain degree) - improve the hacky implements check to cover enough cases to exercise the handling of traits with type parameters - basic canonicalization (will probably also be done by Chalk) | ||||
* | simplify | Aleksey Kladov | 2019-04-12 | 1 | -11/+12 |
| | |||||
* | simplify tests | Aleksey Kladov | 2019-04-12 | 1 | -26/+13 |
| | |||||
* | type-safer source-map for bindings | Aleksey Kladov | 2019-04-10 | 1 | -1/+1 |
| |