Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | internal: move diagnostics to hir | Aleksey Kladov | 2021-05-25 | 1 | -0/+1 |
| | | | | | | | | | | | | | | | | | | | | | | | The idea here is to eventually get rid of `dyn Diagnostic` and `DiagnosticSink` infrastructure altogether, and just have a `enum hir::Diagnostic` instead. The problem with `dyn Diagnostic` is that it is defined in the lowest level of the stack (hir_expand), but is used by the highest level (ide). As a first step, we free hir_expand and hir_def from `dyn Diagnostic` and kick the can up to `hir_ty`, as an intermediate state. The plan is then to move DiagnosticSink similarly to the hir crate, and, as final third step, remove its usage from the ide. One currently unsolved problem is testing. You can notice that the test which checks precise diagnostic ranges, unresolved_import_in_use_tree, was moved to the ide layer. Logically, only IDE should have the infra to render a specific range. At the same time, the range is determined with the data produced in hir_def and hir crates, so this layering is rather unfortunate. Working on hir_def shouldn't require compiling `ide` for testing. | ||||
* | Add test for #8931 and better checking | Florian Diebold | 2021-05-23 | 1 | -11/+83 |
| | |||||
* | Rework obligation handling | Florian Diebold | 2021-05-21 | 1 | -1/+2 |
| | | | | | | | | 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. | ||||
* | Fix HIR expecting errors to unify with anything | Florian Diebold | 2021-05-21 | 1 | -0/+56 |
| | |||||
* | Fix coercion of two closures to a function pointer | Florian Diebold | 2021-05-21 | 1 | -0/+1 |
| | | | | Fixes #8604. | ||||
* | Rewrite coercion using the new unification | Florian Diebold | 2021-05-21 | 1 | -0/+11 |
| | |||||
* | Add more tests, refactor array lengths/consteval work | Jade | 2021-05-14 | 1 | -0/+1 |
| | | | | | | | | | | | 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 lowering of array lengths in types | Jade | 2021-05-13 | 1 | -3/+6 |
| | | | | | | | | | | | Now e.g. ```rust fn a(b: [u8; 2]) { } ``` will know about the length of b. | ||||
* | Add basic support for array lengths in types | Jade | 2021-05-11 | 1 | -2/+5 |
| | | | | | | | | | | 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? | ||||
* | Exclude inherent traits from flyimports | Kirill Bulatov | 2021-04-16 | 1 | -0/+1 |
| | |||||
* | More cleanups / module docs | Florian Diebold | 2021-04-09 | 1 | -2/+2 |
| | |||||
* | More cleanups | Florian Diebold | 2021-04-09 | 1 | -22/+20 |
| | |||||
* | More moving stuff around | Florian Diebold | 2021-04-09 | 1 | -55/+6 |
| | |||||
* | Move ToChalk -> mapping | Florian Diebold | 2021-04-09 | 1 | -1/+1 |
| | |||||
* | Reorganize hir_ty modules | Florian Diebold | 2021-04-09 | 1 | -1/+6 |
| | | | | | Chalk isn't really a 'traits' thing anymore, so it doesn't make sense to have all the Chalk-related stuff in submodules of `traits`. | ||||
* | Intern Substitutions | Florian Diebold | 2021-04-08 | 1 | -2/+2 |
| | | | | (Costs a bit of performance, reduces memory usage on RA by ~10%.) | ||||
* | Remove unused | Florian Diebold | 2021-04-08 | 1 | -3/+0 |
| | |||||
* | Replace remaining `fold` calls | Florian Diebold | 2021-04-08 | 1 | -0/+27 |
| | |||||
* | Replace some `fold` calls | Florian Diebold | 2021-04-08 | 1 | -0/+26 |
| | |||||
* | Fix shifted_{in,out} calls | Florian Diebold | 2021-04-08 | 1 | -4/+4 |
| | |||||
* | Fix subst_prefix | Florian Diebold | 2021-04-08 | 1 | -1/+4 |
| | |||||
* | Impl Fold for CallableSig | Florian Diebold | 2021-04-08 | 1 | -0/+18 |
| | |||||
* | Add HasInterner bounds | Florian Diebold | 2021-04-08 | 1 | -4/+11 |
| | |||||
* | Allow unused | Florian Diebold | 2021-04-08 | 1 | -0/+3 |
| | |||||
* | Replace all the types by their Chalk versions | Florian Diebold | 2021-04-08 | 1 | -4/+31 |
| | |||||
* | Merge #8409 | bors[bot] | 2021-04-07 | 1 | -17/+13 |
|\ | | | | | | | | | | | | | | | 8409: Various remaining fixes for Chalk IR move r=flodiebold a=flodiebold CC #8313 Co-authored-by: Florian Diebold <[email protected]> | ||||
| * | Make Canonical::new a free-standing function | Florian Diebold | 2021-04-07 | 1 | -10/+12 |
| | | |||||
| * | Move hir_trait_id to extension trait | Florian Diebold | 2021-04-07 | 1 | -7/+1 |
| | | |||||
* | | Move `equals_ctor` to `TyExt` | Florian Diebold | 2021-04-07 | 1 | -31/+1 |
|/ | | | | | | I'd prefer getting rid of it, but it's used in the impl search and not super easy to replace there (I think ideally the impl search would do proper unification, but that's a bit more complicated). | ||||
* | Remove Ty::substs{_mut} | Florian Diebold | 2021-04-07 | 1 | -28/+0 |
| | | | | | | 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. | ||||
* | Move Ty::builtin_deref | Lukas Wirth | 2021-04-07 | 1 | -8/+0 |
| | |||||
* | Align `InferenceVar` to Chalk | Florian Diebold | 2021-04-06 | 1 | -1/+1 |
| | |||||
* | Move Ty accessors to TyExt | Lukas Wirth | 2021-04-06 | 1 | -211/+3 |
| | |||||
* | Add chalk_ir::Const to TyKind::Array | Lukas Wirth | 2021-04-06 | 1 | -3/+26 |
| | |||||
* | Use a constructor function for Static lifetimes | Lukas Wirth | 2021-04-06 | 1 | -0/+4 |
| | |||||
* | Add Lifetime to TyKind::Ref | Lukas Wirth | 2021-04-06 | 1 | -4/+4 |
| | |||||
* | Align FnPointer with Chalk | Florian Diebold | 2021-04-05 | 1 | -6/+7 |
| | |||||
* | Substitution::prefix -> subst_prefix | Florian Diebold | 2021-04-05 | 1 | -4/+3 |
| | | | | I probably want to get rid of this function completely later. | ||||
* | Get rid of Substitution::suffix | Florian Diebold | 2021-04-05 | 1 | -6/+0 |
| | |||||
* | Remove some unused methods, move some to types.rs | Florian Diebold | 2021-04-05 | 1 | -29/+0 |
| | |||||
* | Binders::wrap_empty -> wrap_empty_binders | Florian Diebold | 2021-04-05 | 1 | -7/+5 |
| | |||||
* | Substitution::single -> from1 | Florian Diebold | 2021-04-05 | 1 | -9/+0 |
| | |||||
* | Move ProjectionTy methods to extension trait | Florian Diebold | 2021-04-05 | 1 | -24/+2 |
| | |||||
* | Replace unused hir_ty::Lifetime with chalk equivalents | Lukas Wirth | 2021-04-05 | 1 | -2/+12 |
| | |||||
* | Rename shift_bound_vars{_out} to align with Chalk | Florian Diebold | 2021-04-05 | 1 | -2/+3 |
| | |||||
* | Add Interner parameter to Binders::substitute | Florian Diebold | 2021-04-05 | 1 | -5/+5 |
| | |||||
* | Binders::subst -> substitute | Florian Diebold | 2021-04-05 | 1 | -4/+4 |
| | |||||
* | Use VariableKinds in Binders | Florian Diebold | 2021-04-05 | 1 | -10/+16 |
| | |||||
* | Hide Binders internals more | Florian Diebold | 2021-04-05 | 1 | -33/+11 |
| | |||||
* | Pass interner to TraitRef::self_type_parameter | Laurențiu Nicola | 2021-04-05 | 1 | -3/+5 |
| |