about summary refs log tree commit diff
path: root/src/tools/rust-analyzer/crates/hir
AgeCommit message (Collapse)AuthorLines
2025-10-01Auto merge of #147210 - lnicola:sync-from-ra, r=lnicolabors-56/+148
`rust-analyzer` subtree update Subtree update of `rust-analyzer` to https://github.com/rust-lang/rust-analyzer/commit/a6bc4a4bbe6a65b71cbf76a0cf528c47a8d9f97f. Created using https://github.com/rust-lang/josh-sync. r? `@ghost`
2025-09-28remove explicit deref of AbiAlign for most methodsJubilee Young-1/+1
Much of the compiler calls functions on Align projected from AbiAlign. AbiAlign impls Deref to its inner Align, so we can simplify these away. Also, it will minimize disruption when AbiAlign is removed. For now, preserve usages that might resolve to PartialOrd or PartialEq, as those have odd inference.
2025-09-25Merge pull request #20738 from jackh726/next-trait-solver-next4Shoyu Vanilla (Flint)-7/+12
Remove non-ns version of impl_self_ty and impl_trait
2025-09-25Merge ref 'caccb4d0368b' from rust-lang/rustThe rustc-josh-sync Cronjob Bot-4/+0
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: caccb4d0368bd918ef6668af8e13834d07040417 Filtered ref: 0f345ed05d559bbfb754f1403b16199366cda2e0 Upstream diff: https://github.com/rust-lang/rust/compare/21a19c297d4f5a03501d92ca251bd7a17073c08a...caccb4d0368bd918ef6668af8e13834d07040417 This merge was created using https://github.com/rust-lang/josh-sync.
2025-09-24Switch next-solver related rustc dependencies of r-a to crates.io onesShoyu Vanilla-4/+0
2025-09-24Remove non-ns version of impl_self_ty and impl_traitjackh726-7/+12
2025-09-23Remove all non-ns diagnostics queries, naming consistenlyJack Huey-9/+9
2025-09-23Use lower_nextsolver::callable_item_signature instead of ↵Jack Huey-14/+66
lower::callable_item_signature
2025-09-23Remove lower::value_ty in favor of lower_nextsolver::value_tyJack Huey-4/+14
2025-09-23Remove lower::ty in favor of lower_nextsolver::tyJack Huey-7/+16
2025-09-23Use ParamEnv in TraitEnvironmentJack Huey-2/+9
2025-09-23Add 'db to TraitEnvironmentJack Huey-6/+6
2025-09-23Make Field::ty return TypeNsjackh726-16/+25
2025-09-22Use ns versions of with_diagnostics queriesjackh726-8/+8
2025-09-18Merge pull request #20664 from ChayimFriedman2/coerce-nsChayim Refael Friedman-3/+5
fix: Port a bunch of stuff from rustc and fix a bunch of type mismatches/diagnostics
2025-09-16Merge pull request #20517 from Veykril/veykril/push-wrurmtqppzusLukas Wirth-8/+15
fix: Only compute unstable paths on nightly toolchains for IDE features
2025-09-16fix: Only compute unstable paths on nightly toolchains for IDE featuresLukas Wirth-8/+15
2025-09-15Port a bunch of stuff from rustc and fix a bunch of type mismatches/diagnosticsChayim Refael Friedman-3/+5
This started from porting coercion, but ended with porting much more.
2025-09-11Merge pull request #20642 from ChayimFriedman2/wasm-safeShoyu Vanilla (Flint)-4/+19
fix: Make `#[target_feature]` always safe on WASM
2025-09-10Properly handle normalizationChayim Refael Friedman-2/+7
Previously normalization was broken, which caused a lot of fake errors. This fix most type mismatches of the new solver, and it also reverts many test regressions. The downside is that now `chalk_ir::TyKind::AssociatedType`/`chalk_ir::TyKind::Alias` cannot be trusted anymore with their roles, namely: `AssociatedType` is always fully normalized and `Alias` only if it can possibly be normalized further. That seems okay as the new solver does not have this distinction at all (due to it being a lazy normalizer), so this will only hold for the migration time. This does mean we have to change some APIs, notably `hir::Type::walk()` and `TyFingerprint`, to treat `Alias` the same as `AssociatedType`. Another small thing this commit does is to isolate processing of user-written types (currently involving replacing error types and normalizing, but in the future validation will also be needed) to separate functions.
2025-09-10Fix failing tests and fill-in missing detailsShoyu Vanilla-2/+10
2025-09-09WIP switch inference table to next-solverjackh726-4/+12
2025-09-09Make `#[target_feature]` safe always on WASMChayim Refael Friedman-4/+19
Even when the feature isn't enabled, as it's not UB to invoke an undefined feature in WASM (just a trap).
2025-09-08Remove support for register_attrWilfred Hughes-33/+8
This was removed in rustc in 2022: https://github.com/rust-lang/rust/pull/101123 Closes #20525.
2025-09-04Upgrade rustc cratesChayim Refael Friedman-24/+5
The main changes are (there are some other small changes): - Using a specific type for trait IDs in the new solver, allowing us to simplify a lot of code. - Add `BoundConst` similar to `BoundTy` and `BoundRegion` (previously consts used `BoundVar` directly), due to a new trait requirement.
2025-09-02Make sense of the mess that were (are) different kind of generics in the solverChayim Refael Friedman-7/+10
To the extent possible. Previously they were confused. Sometimes generic params were treated as `Param` and sometimes as `Placeholder`. A completely redundant (in the new solver) mapping of salsa::Id to ints to intern some info where we could just store it uninterned (not in Chalk though, for some weird reason). Plus fix a cute bug in closure substitution that was caught by the assertions of Chalk but the next solver did not have such assertions. Do we need more assertions?
2025-08-26In highlight_related, when on an unsafe block, don't highlight unsafe ↵Chayim Refael Friedman-3/+22
operations of other unsafe blocks
2025-08-18Merge pull request #20442 from ChayimFriedman2/unqualifyShoyu Vanilla (Flint)-0/+5
fix: Only import the item in "Unqualify method call" if needed
2025-08-17Remove a bunch of stuff from chalk_dbjackh726-19/+56
2025-08-17Use impl_trait_ns in Impl::trait_refjackh726-4/+1
2025-08-17Switch TraitRef in hir::TraitRef to next solverjackh726-18/+25
2025-08-17Replace layout_of_ty with layout_of_ty_nsjackh726-2/+4
2025-08-17Switch associated_type_shorthand_candidates to lower_nextsolverjackh726-8/+11
2025-08-17Cleanup assoc_type_shorthand_candidatesjackh726-10/+11
2025-08-17Change direct_super_traits to use generic_predicates_for_param_nsjackh726-5/+11
2025-08-17Deduplicate layout_of_adtjackh726-1/+1
2025-08-17impl HirDisplay for next_solver::Tyjackh726-4/+9
2025-08-17Convert some of dyn_compatibility to next-solver and remove ↵jackh726-1/+1
generic_predicates_without_parent_query
2025-08-13Merge Trait and TraitAlias handlingDeadbeef-121/+13
2025-08-13Only import the item in "Unqualify method call" if neededChayim Refael Friedman-0/+5
2025-08-09Implement next trait solverjackh726-3/+174
2025-08-05Do not remove the original token when descending into derivesChayim Refael Friedman-11/+9
This caused rename to remove both, because it couldn't rename the derive-expanded one. I spent some time trying to create a test for this, before giving up. But I checked manually that this works.
2025-07-31`cargo clippy --fix`Lukas Wirth-156/+138
2025-07-23Remove `ExpressionStoreDiagnostics::MacroError`, instead recreate it from ↵Chayim Refael Friedman-31/+7
the `MacroCallId` This simplifies the code and also makes us report parse error in macros too.
2025-07-22fix: Apply adjusts to pats and exprs when doing pat analysisShoyu Vanilla-8/+1
2025-07-11Merge pull request #20219 from ChayimFriedman2/expr-store-memChayim Refael Friedman-10/+5
perf: Put the expression stuff in the expression store behind an `Option<Box>`
2025-07-10Merge pull request #20210 from ChayimFriedman2/naked-asm-safeShoyu Vanilla (Flint)-5/+8
fix: Inline asm fixes
2025-07-10Put the expression stuff in the expression store behind an `Option<Box>`Chayim Refael Friedman-10/+5
And leave only the type stuff without it. This is because most expression stores don't have anything but types (e.g. generics, fields, signatures) so this saves a lot of memory. This saves 58mb on `analysis-stats .`.
2025-07-09Make `global_asm!()` workChayim Refael Friedman-3/+5
Because apparently, we were not accepting inline asm in item position, completely breaking it.
2025-07-09Differentiate between `asm!()`, `global_asm!()` and `naked_asm!()`, and make ↵Chayim Refael Friedman-2/+3
only `asm!()` unsafe