aboutsummaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | Merge #8295bors[bot]2021-04-045-1/+398
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8295: Add `convert_into_to_from` assist r=Veykril a=obmarg This adds a "Convert Into to From" assist, useful since clippy has recently started adding lints on every `Into`. It covers converting the signature, and converting any `self`/`Self` references within the body. It does assume that every instance of `Into` can be converted to a `From`, which I _think_ is the case now. Let me know if there's something I'm not thinking of and I can try and make it smarter. Closes #8196 ![CleanShot 2021-04-02 at 13 39 54](https://user-images.githubusercontent.com/556490/113420108-9ce21c00-93c0-11eb-8c49-80b5fb189284.gif) I'm extremely new to this codebase so please let me know if anything needs changed. Co-authored-by: Graeme Coupar <[email protected]>
| * | | | | Convert Into to From assistGraeme Coupar2021-04-035-1/+398
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a "Convert Into to From" assist, useful since clippy has recently started adding lints on every `Into`. It covers converting the signature, and converting any `self`/`Self` references within the body to the correct types. It does assume that every instance of `Into` can be converted to a `From`, which I _think_ is the case now. Let me know if there's something I'm not thinking of and I can try and make it smarter.
* | | | | | Add commentFlorian Diebold2021-04-041-0/+3
| | | | | |
* | | | | | Replace Substitution::type_paramsFlorian Diebold2021-04-046-16/+15
| | | | | |
* | | | | | Replace Substitution::bound_vars and ::type_params_for_genericsFlorian Diebold2021-04-047-54/+42
| | | | | |
* | | | | | Move TyBuilder to its own moduleFlorian Diebold2021-04-042-204/+221
| | | | | |
* | | | | | Replace last uses of SubstsBuilder by TyBuilderFlorian Diebold2021-04-044-64/+23
| | | | | |
* | | | | | Remove CallableSig::from_substsFlorian Diebold2021-04-041-11/+1
| | | | | |
* | | | | | Use TyBuilder in another placeFlorian Diebold2021-04-041-4/+3
| | | | | |
* | | | | | Some more TyBuilder useFlorian Diebold2021-04-042-33/+25
| | | | | |
* | | | | | Replace remaining uses of Substitution::build_for_defFlorian Diebold2021-04-046-21/+46
| | | | | |
* | | | | | More TyBuilder useFlorian Diebold2021-04-041-12/+9
| | | | | |
* | | | | | More TyBuilder useFlorian Diebold2021-04-041-23/+15
| | | | | |
* | | | | | Add and start using TraitRef and ProjectionTy buildersFlorian Diebold2021-04-046-39/+48
| | | | | |
* | | | | | Move Ty::builtin to TyBuilderFlorian Diebold2021-04-043-20/+20
| | | | | |
* | | | | | Add TyBuilder::adtFlorian Diebold2021-04-044-45/+104
| | | | | |
* | | | | | Move Ty::fn_ptr to TyBuilderFlorian Diebold2021-04-042-11/+12
| | | | | |
* | | | | | Add TyBuilder::unit() and TyExt::is_unit()Florian Diebold2021-04-047-25/+39
| | | | | |
* | | | | | Add TyBuilderFlorian Diebold2021-04-041-0/+6
| |/ / / / |/| | | |
* | | | | Merge #8324bors[bot]2021-04-041-1/+11
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8324: Add `Body::shrink_to_fit` r=jonas-schievink a=jonas-schievink Saves ~15 MB bors r+ Co-authored-by: Jonas Schievink <[email protected]>
| * | | | | Add `Body::shrink_to_fit`Jonas Schievink2021-04-041-1/+11
| | | | | |
* | | | | | Only remember blocks that have a DefMapJonas Schievink2021-04-042-6/+8
|/ / / / /
* | | | | Merge #8322bors[bot]2021-04-044-5/+14
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8322: Access a body's block def maps via a method r=jonas-schievink a=jonas-schievink bors r+ Co-authored-by: Jonas Schievink <[email protected]>
| * | | | | Access a body's block def maps via a methodJonas Schievink2021-04-044-5/+14
| | | | | |
* | | | | | Use exhaustive matches in shrink_to_fit implsJonas Schievink2021-04-042-13/+38
|/ / / / /
* | | | | Make `ast_to_token_tree` infallibleJonas Schievink2021-04-0411-41/+32
| | | | | | | | | | | | | | | | | | | | It could never return `None`, so reflect that in the return type
* | | | | Glob-reexport hir_def database typesJonas Schievink2021-04-041-9/+1
| | | | |
* | | | | Use shrink_to_fit to reduce DefMap sizesJonas Schievink2021-04-033-1/+25
| | | | |
* | | | | Use bitflags to compress function propertiesJonas Schievink2021-04-0310-71/+119
| | | | | | | | | | | | | | | | | | | | Very minor savings, only 1 MB or so
* | | | | Intern `ModPath` in `Import`Jonas Schievink2021-04-033-4/+8
| |/ / / |/| | | | | | | | | | | Minor savings only
* | | | Rename Ty::interned to Ty::kindFlorian Diebold2021-04-0317-75/+73
| | | | | | | | | | | | | | | | ... since that's the actual method on Chalk side that matches the signature.
* | | | Introduce `GenericArg` like in ChalkFlorian Diebold2021-04-0317-161/+323
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Plus some more adaptations to Substitution. Lots of `assert_ty_ref` that we should revisit when introducing lifetime/const parameters.
* | | | Allow include! an empty content fileEdwin Cheng2021-04-033-3/+33
| | | |
* | | | Fix joinLines panic if run on the empty last lineEdwin Cheng2021-04-031-2/+16
| | | |
* | | | Support `#[rustc_builtin_macro = "builtin_name"]`Jonas Schievink2021-04-031-1/+11
| | | |
* | | | Implement edition-dependent builtin `panic!` macroJonas Schievink2021-04-033-2/+26
| | | |
* | | | Allow `,` to delimit macro 2.0 rulesJonas Schievink2021-04-033-2/+30
| | | |
* | | | Allow interning stringsJonas Schievink2021-04-031-9/+46
| | | |
* | | | Stop using an upgradeable read lock in interningJonas Schievink2021-04-021-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | Only one upgradeable read lock can be handed out at the same time, and we never acquire a non-upgradeable read lock, so this has no benefit over just using a write lock in the first place.
* | | | Only populate prelude for crate-level DefMapsJonas Schievink2021-04-022-14/+58
| | | |
* | | | Merge #8284bors[bot]2021-04-0214-136/+229
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8284: Reduce memory usage by using global `Arc`-based interning r=jonas-schievink a=jonas-schievink This saves around 50 mb when running `analysis-stats` on r-a itself. Not a lot, but this infra can be easily reused to intern more stuff. Co-authored-by: Jonas Schievink <[email protected]>
| * | | | Remove `?Sized` on `PartialEq`/`Eq` implsJonas Schievink2021-04-021-3/+5
| | | | |
| * | | | Split `Intern::drop` into hot and cold pathJonas Schievink2021-04-021-16/+23
| | | | |
| * | | | Remove unnecessary region, relax `Sized` boundsJonas Schievink2021-04-011-16/+12
| | | | |
| * | | | Intern Attr, MacroCall and Path componentsJonas Schievink2021-04-017-17/+21
| | | | |
| * | | | Global TypeRef/TraitRef interningJonas Schievink2021-04-0110-120/+204
| | | | |
* | | | | Merge #8291bors[bot]2021-04-021-1/+1
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8291: Put the revision in the startup message r=jonas-schievink a=lf- Co-authored-by: Jade <[email protected]>
| * | | | | Put the revision in the logged startup messageJade2021-04-021-1/+1
| | | | | |
* | | | | | Merge #8287bors[bot]2021-04-021-36/+33
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8287: Don't allocate in `associated_type_shorthand_candidates` r=Veykril a=Veykril Co-authored-by: Lukas Wirth <[email protected]>
| * | | | | | Don't allocate in `associated_type_shorthand_candidates`Lukas Wirth2021-04-021-36/+33
| | | | | | |