Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | hir_ty: don't pass where clauses of associated types down to chalk (temp. ↵ | cynecx | 2021-05-30 | 1 | -8/+23 |
| | | | | fix #9052) | ||||
* | hir_ty: use async ret type for inference inside async bodies | cynecx | 2021-05-29 | 1 | -0/+49 |
| | |||||
* | Consider trait to be in scope for trait-impl | Lukas Wirth | 2021-05-25 | 1 | -0/+30 |
| | |||||
* | Merge #8987 | bors[bot] | 2021-05-25 | 1 | -2/+24 |
|\ | | | | | | | | | | | | | | | 8987: Fix lowering of FnOnce() without return type r=flodiebold a=flodiebold This should result in an implicit `-> ()`, not leaving out the binding. Co-authored-by: Florian Diebold <[email protected]> | ||||
| * | Hide `-> ()` in Fn traits | Florian Diebold | 2021-05-25 | 1 | -3/+3 |
| | | |||||
| * | Fix lowering of FnOnce() without return type | Florian Diebold | 2021-05-25 | 1 | -5/+27 |
| | | | | | | | | This should result in an implicit `-> ()`, not leaving out the binding. | ||||
* | | Fix type inference not working for new Try trait | Lukas Wirth | 2021-05-25 | 1 | -0/+37 |
|/ | |||||
* | Get rid of resolve_ty_as_possible | Florian Diebold | 2021-05-21 | 1 | -1/+1 |
| | | | | Instead use shallow resolving where necessary. | ||||
* | Add more tests, refactor array lengths/consteval work | Jade | 2021-05-14 | 1 | -0/+97 |
| | | | | | | | | | | | 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) | ||||
* | Add basic support for array lengths in types | Jade | 2021-05-11 | 1 | -1/+1 |
| | | | | | | | | | | This recognizes `let a = [1u8, 2, 3]` as having type `[u8; 3]` instead of the previous `[u8; _]`. Byte strings and `[0u8; 2]` kinds of range array declarations are unsupported as before. I don't know why a bunch of our rustc tests had single quotes inside strings un-escaped by `UPDATE_EXPECT=1 cargo t`, but I don't think it's bad? Maybe something in a nightly? | ||||
* | Respect test style guidelines in tests::traits | Lukas Wirth | 2021-04-10 | 1 | -698/+656 |
| | |||||
* | Add test for binary op return ty with adt | Lukas Wirth | 2021-04-10 | 1 | -0/+47 |
| | |||||
* | Add manual ops::Add impls to test::traits::closure_2 | Lukas Wirth | 2021-04-10 | 1 | -20/+46 |
| | |||||
* | Implement more precise binary op return type prediction | Lukas Wirth | 2021-04-10 | 1 | -5/+5 |
| | |||||
* | Resolve prelude and crate root names in the root DefMap | Jonas Schievink | 2021-04-09 | 1 | -0/+30 |
| | |||||
* | Fix generic arguments being incorrectly offset in qualified trait casts | Lukas Wirth | 2021-03-30 | 1 | -0/+43 |
| | |||||
* | Merge #7907 | bors[bot] | 2021-03-24 | 1 | -2/+2 |
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7907: Autoderef with visibility r=cynecx a=cynecx Fixes https://github.com/rust-analyzer/rust-analyzer/issues/7841. I am not sure about the general approach here. Right now this simply tries to check whether the autoderef candidate is reachable from the current module. ~~However this doesn't exactly work with traits (see the `tests::macros::infer_derive_clone_in_core` test, which fails right now).~~ see comment below Refs: - `rustc_typeck` checking fields: https://github.com/rust-lang/rust/blob/66ec64ccf31883cd2c28d045912a76179c0c6ed2/compiler/rustc_typeck/src/check/expr.rs#L1610 r? @flodiebold Co-authored-by: cynecx <[email protected]> | ||||
| * | hir_ty: fix tests by making required methods public | cynecx | 2021-03-20 | 1 | -2/+2 |
| | | |||||
* | | Correctly lower TraitRefs with default params | Lukas Wirth | 2021-03-22 | 1 | -0/+46 |
| | | |||||
* | | Ignore type bindings in generic_predicates_for_param | Florian Diebold | 2021-03-21 | 1 | -3/+2 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | This allows us to handle more cases without a query cycle, which includes certain cases that rustc accepted. That in turn means we avoid triggering salsa-rs/salsa#257 on valid code (it will still happen if the user writes an actual cycle). We actually accept more definitions than rustc now; that's because rustc only ignores bindings when looking up super traits, whereas we now also ignore them when looking for predicates to disambiguate associated type shorthand. We could introduce a separate query for super traits if necessary, but for now I think this should be fine. | ||||
* | | Test for a Salsa bug | Florian Diebold | 2021-03-21 | 1 | -0/+51 |
|/ | |||||
* | Remove WhereClause::Error | Florian Diebold | 2021-03-20 | 1 | -2/+2 |
| | | | | | Chalk doesn't have it, and judging from the removed code, it wasn't useful anyway. | ||||
* | Add test for self-calling inner function | Jonas Schievink | 2021-03-17 | 1 | -0/+21 |
| | |||||
* | Fix unification logic | Florian Diebold | 2021-03-15 | 1 | -100/+116 |
| | |||||
* | Check ancestor maps when computing traits in scope | Jonas Schievink | 2021-03-09 | 1 | -0/+33 |
| | |||||
* | Use upstream cov-mark | Laurențiu Nicola | 2021-03-08 | 1 | -3/+2 |
| | |||||
* | Don't write trailing whitespace when formatting empty GenericPredicates | Lukas Wirth | 2021-02-20 | 1 | -2/+2 |
| | |||||
* | Don't lower TypeBound::Lifetime as GenericPredicate::Error | Lukas Wirth | 2021-02-20 | 1 | -3/+3 |
| | |||||
* | Slightly expand test | Jonas Schievink | 2021-02-10 | 1 | -0/+3 |
| | |||||
* | Add more tests | Jonas Schievink | 2021-02-10 | 1 | -0/+51 |
| | |||||
* | Render Fn* trait objects and impl types as rust does | Lukas Wirth | 2021-01-13 | 1 | -4/+4 |
| | |||||
* | Implement async blocks | oxalica | 2020-09-10 | 1 | -0/+40 |
| | |||||
* | Switch to expect_test from crates.io | Aleksey Kladov | 2020-08-21 | 1 | -1/+1 |
| | |||||
* | Rename ra_hir_ty -> hir_ty | Aleksey Kladov | 2020-08-13 | 1 | -0/+3113 |