Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Rework obligation handling | Florian Diebold | 2021-05-21 | 1 | -13/+35 |
| | | | | | | | | 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. | ||||
* | Remove our unification code, use Chalk's instead | Florian Diebold | 2021-05-21 | 1 | -1/+2 |
| | |||||
* | Collect inherent impls in unnamed consts | Jonas Schievink | 2021-04-19 | 1 | -16/+26 |
| | |||||
* | Remove assertion in impl collection | Florian Diebold | 2021-04-11 | 1 | -4/+3 |
| | | | | | | | This condition should always be true for *valid* code, but of course there might be invalid code or things that we can't currently resolve. Fixes #8464. | ||||
* | Include more info in assert | Jonas Schievink | 2021-04-11 | 1 | -3/+3 |
| | |||||
* | Merge #8406 | bors[bot] | 2021-04-09 | 1 | -18/+63 |
|\ | | | | | | | | | | | | | | | 8406: Improve indexing of impls r=flodiebold a=flodiebold Store impls for e.g. &Foo with the ones for Foo instead of the big "other" bucket. This can improve performance and simplifies the HIR impl search a bit. Co-authored-by: Florian Diebold <[email protected]> | ||||
| * | Improve indexing of impls | Florian Diebold | 2021-04-09 | 1 | -18/+63 |
| | | | | | | | | | | | | Store impls for e.g. &Foo with the ones for Foo instead of the big "other" bucket. This can improve performance and simplifies the HIR impl search a bit. | ||||
* | | Fix crash on syn involving lifetimes returned by Chalk | Florian Diebold | 2021-04-09 | 1 | -0/+1 |
|/ | | | | | | | | | | If we get lifetime variables back in autoderef, just immediately replace them by static lifetimes for now. Method resolution doesn't really deal correctly with new variables being introduced (this needs to be fixed more properly). This fixes `rust-analyzer analysis-stats --with-deps` crashing in the RA repo. | ||||
* | Remove unused | Florian Diebold | 2021-04-08 | 1 | -7/+3 |
| | |||||
* | Replace some `fold` calls | Florian Diebold | 2021-04-08 | 1 | -16/+13 |
| | |||||
* | InEnvironment::new takes a reference | Florian Diebold | 2021-04-07 | 1 | -1/+1 |
| | |||||
* | Move hir_trait_id to extension trait | Florian Diebold | 2021-04-07 | 1 | -2/+2 |
| | |||||
* | Free Ty::def_crates | Lukas Wirth | 2021-04-07 | 1 | -54/+52 |
| | |||||
* | Collect trait impls inside unnamed consts | Jonas Schievink | 2021-04-07 | 1 | -19/+35 |
| | |||||
* | Move Ty accessors to TyExt | Lukas Wirth | 2021-04-06 | 1 | -1/+1 |
| | |||||
* | Add chalk_ir::Const to TyKind::Array | Lukas Wirth | 2021-04-06 | 1 | -1/+3 |
| | |||||
* | Use a constructor function for Static lifetimes | Lukas Wirth | 2021-04-06 | 1 | -14/+7 |
| | |||||
* | Add Lifetime to TyKind::Ref | Lukas Wirth | 2021-04-06 | 1 | -4/+14 |
| | |||||
* | Align FnPointer with Chalk | Florian Diebold | 2021-04-05 | 1 | -8/+8 |
| | |||||
* | Get rid of Substitution::suffix | Florian Diebold | 2021-04-05 | 1 | -4/+6 |
| | |||||
* | Add Interner parameter to Binders::substitute | Florian Diebold | 2021-04-05 | 1 | -2/+2 |
| | |||||
* | Binders::subst -> substitute | Florian Diebold | 2021-04-05 | 1 | -2/+2 |
| | |||||
* | Hide Binders internals more | Florian Diebold | 2021-04-05 | 1 | -4/+4 |
| | |||||
* | Rename TyKind::ForeignType to Foreign | Laurențiu Nicola | 2021-04-05 | 1 | -2/+2 |
| | |||||
* | Rename TyKind::Unknown to Error | Laurențiu Nicola | 2021-04-05 | 1 | -1/+1 |
| | |||||
* | Move things from `traits` module to `types` as well | Florian Diebold | 2021-04-04 | 1 | -1/+1 |
| | |||||
* | Replace remaining uses of Substitution::build_for_def | Florian Diebold | 2021-04-04 | 1 | -3/+3 |
| | |||||
* | Add and start using TraitRef and ProjectionTy builders | Florian Diebold | 2021-04-04 | 1 | -5/+3 |
| | |||||
* | Use bitflags to compress function properties | Jonas Schievink | 2021-04-03 | 1 | -1/+1 |
| | | | | Very minor savings, only 1 MB or so | ||||
* | Rename Ty::interned to Ty::kind | Florian Diebold | 2021-04-03 | 1 | -7/+5 |
| | | | | ... since that's the actual method on Chalk side that matches the signature. | ||||
* | Introduce `GenericArg` like in Chalk | Florian Diebold | 2021-04-03 | 1 | -3/+4 |
| | | | | | | | Plus some more adaptations to Substitution. Lots of `assert_ty_ref` that we should revisit when introducing lifetime/const parameters. | ||||
* | Use arrayvec 0.6 | Laurențiu Nicola | 2021-03-25 | 1 | -2/+2 |
| | |||||
* | Merge #7907 | bors[bot] | 2021-03-24 | 1 | -4/+37 |
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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_def: move visibility queries from hir_ty to hir_def | cynecx | 2021-03-24 | 1 | -1/+1 |
| | | |||||
| * | hir_ty: add coverage testing for autoderef_visibility_method test | cynecx | 2021-03-20 | 1 | -0/+1 |
| | | |||||
| * | hir_ty: iterate_method_candidates_for_self_ty pass `visible_from_module` ↵ | cynecx | 2021-03-20 | 1 | -1/+6 |
| | | | | | | | | down to `iterate_inherent_methods` | ||||
| * | hir_ty: introduce visible_from_module param into method resolution | cynecx | 2021-03-20 | 1 | -4/+31 |
| | | |||||
* | | Align InEnvironment with Chalk | Florian Diebold | 2021-03-21 | 1 | -3/+3 |
| | | | | | | | | | | | | This in particular means storing a chalk_ir::Environment, not our TraitEnvironment. This makes InEnvironment not usable for Type, where we need to keep the full TraitEnvironment. | ||||
* | | Align Canonical more with Chalk's version | Florian Diebold | 2021-03-21 | 1 | -15/+34 |
|/ | | | | In particular, use chalk_ir::CanonicalVarKinds. | ||||
* | Turn Obligation into something similar to chalk_ir::DomainGoal | Florian Diebold | 2021-03-20 | 1 | -3/+3 |
| | | | | This includes starting to make use of Chalk's `Cast` trait. | ||||
* | Chalkify TraitRef | Florian Diebold | 2021-03-18 | 1 | -2/+3 |
| | |||||
* | Rename Substs -> Substitution | Florian Diebold | 2021-03-16 | 1 | -7/+7 |
| | |||||
* | Merge #8020 | bors[bot] | 2021-03-15 | 1 | -1/+9 |
|\ | | | | | | | | | | | | | | | | | | | | | | | | | 8020: Power up goto_implementation r=matklad a=Veykril by allowing it to be invoked on references of names, now showing all (trait) implementations of the given type in all crates instead of just the defining crate as well as including support for builtin types ![image](https://user-images.githubusercontent.com/3757771/111144403-52bb0700-8587-11eb-9205-7a2a5b8b75a3.png) Example screenshot of `impl`s of Box in `log`, `alloc`, `std` and the current crate. Before you had to invoke it on the definition where it would only show the `impls` in `alloc`. Co-authored-by: Lukas Wirth <[email protected]> | ||||
| * | Speedup trait impl search for goto_implementation | Lukas Wirth | 2021-03-15 | 1 | -1/+9 |
| | | |||||
* | | Don't use Substs for Ref/Raw/Array/Slice | Florian Diebold | 2021-03-14 | 1 | -4/+2 |
|/ | |||||
* | Use chalk_ir::ForeignDefId | Florian Diebold | 2021-03-13 | 1 | -6/+9 |
| | |||||
* | Separate `Ty` and `TyKind` like in Chalk | Florian Diebold | 2021-03-13 | 1 | -35/+41 |
| | | | | | Currently `Ty` just wraps `TyKind`, but this allows us to change most places to already use `intern` / `interned`. | ||||
* | Use Chalk Environment more directly | Florian Diebold | 2021-03-12 | 1 | -2/+1 |
| | |||||
* | Delete `ContainerId` | Jonas Schievink | 2021-03-09 | 1 | -1/+1 |
| | |||||
* | Stop using `ContainerId` in `AssocContainerId` | Jonas Schievink | 2021-03-09 | 1 | -1/+1 |
| |