summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis/src/lib.rs
AgeCommit message (Collapse)AuthorLines
2023-05-15Move expansion of query macros in rustc_middle to rustc_middle::queryJohn Kåre Alsaker-1/+1
2023-05-02Implement negative boundsMichael Goulet-0/+1
2023-05-01Do not consider associated type bounds for ↵Michael Goulet-1/+2
super_predicates_that_define_assoc_type
2023-04-21Leave it to the query system to invoke the typeck query instead of invoking ↵Oli Scherer-2/+0
it eagerly. Later queries that are run on all body owners will invoke typeck as they need information from its result to perform their own logic
2023-04-18Add `rustc_fluent_macro` to decouple fluent from `rustc_macros`Nilstrieb-1/+1
Fluent, with all the icu4x it brings in, takes quite some time to compile. `fluent_messages!` is only needed in further downstream rustc crates, but is blocking more upstream crates like `rustc_index`. By splitting it out, we allow `rustc_macros` to be compiled earlier, which speeds up `x check compiler` by about 5 seconds (and even more after the needless dependency on `serde_json` is removed from `rustc_data_structures`).
2023-04-06Stabilize is_some_andJonas Platte-1/+0
2023-03-29Stabilize a portion of 'once_cell'Trevor Gross-1/+1
Move items not part of this stabilization to 'lazy_cell' or 'once_cell_try'
2023-03-22Auto merge of #109119 - lcnr:trait-system-cleanup, r=compiler-errorsbors-17/+16
a general type system cleanup removes the helper functions `traits::fully_solve_X` as they add more complexity then they are worth. It's confusing which of these helpers should be used in which context. changes the way we deal with overflow to always add depth in `evaluate_predicates_recursively`. It may make sense to actually fully transition to not have `recursion_depth` on obligations but that's probably a bit too much for this PR. also removes some other small - and imo unnecessary - helpers. r? types
2023-03-21Use LocalDefId in ItemCtxtMichael Goulet-2/+2
2023-03-21remove some trait solver helperslcnr-17/+16
they add more complexity then they are worth. It's confusing which of these helpers should be used in which context.
2023-03-15always make `define_opaque_types` explicitlcnr-2/+2
2023-03-12Allow `#[target_feature]` on `main` and `start` for WASMLéo Lanteri Thauvin-2/+11
2023-03-12Forbid the use of `#[target_feature]` on `start`Léo Lanteri Thauvin-0/+7
2023-03-12Forbid the use of `#[target_feature]` on `main`Léo Lanteri Thauvin-0/+5
2023-03-11Simplify message pathsest31-1/+1
This makes it easier to open the messages file while developing on features. The commit was the result of automatted changes: for p in compiler/rustc_*; do mv $p/locales/en-US.ftl $p/messages.ftl; rmdir $p/locales; done for p in compiler/rustc_*; do sed -i "s#\.\./locales/en-US.ftl#../messages.ftl#" $p/src/lib.rs; done
2023-03-09Remove body_def_id from InheritedMichael Goulet-2/+2
2023-02-24Migrate `rustc_hir_analysis` to session diagnosticObei Sideg-63/+17
Part one, lib.rs file
2023-02-23hir-analysis: make where-clause-on-main diagnostic translatableTshepang Mbambo-10/+4
2023-02-22errors: generate typed identifiers in each crateDavid Wood-0/+4
Instead of loading the Fluent resources for every crate in `rustc_error_messages`, each crate generates typed identifiers for its own diagnostics and creates a static which are pulled together in the `rustc_driver` crate and provided to the diagnostic emitter. Signed-off-by: David Wood <david.wood@huawei.com>
2023-02-21hir-analysis: make one diagnostic translatableTshepang Mbambo-4/+1
2023-02-17Use `IntoIterator` for `mk_fn_sig`.Nicholas Nethercote-3/+2
This makes a lot of call sites nicer.
2023-02-16remove bound_type_of query; make type_of return EarlyBinder; change type_of ↵Kyle Matsuda-2/+2
in metadata
2023-02-16change usages of type_of to bound_type_ofKyle Matsuda-2/+2
2023-02-16Replace some `then`s with some `then_some`sMaybe Waffle-1/+1
2023-01-26change fn_sig query to use EarlyBinder; remove bound_fn_sig query; add ↵Kyle Matsuda-2/+2
EarlyBinder to fn_sig in metadata
2023-01-26replace usages of fn_sig query with bound_fn_sigKyle Matsuda-2/+2
2023-01-23fix: use LocalDefId instead of HirId in trait resVincenzo Palazzo-10/+13
use LocalDefId instead of HirId in trait resolution to simplify the obligation clause resolution Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2023-01-20Auto merge of #106090 - WaffleLapkin:dereffffffffff, r=Nilstriebbors-9/+6
Remove some `ref` patterns from the compiler Previous PR: https://github.com/rust-lang/rust/pull/105368 r? `@Nilstrieb`
2023-01-17Remove double spaces after dots in commentsMaybe Waffle-4/+4
2023-01-17`rustc_hir_analysis`: remove `ref` patternsMaybe Waffle-3/+3
2023-01-17`rustc_hir_analysis`: some general code improvementsMaybe Waffle-6/+3
2023-01-11Rollup merge of #106739 - WaffleLapkin:astconv, r=estebankMichael Goulet-3/+2
Remove `<dyn AstConv<'tcx>>::fun(c, ...)` calls in favour of `c.astconv().fun(...)` This removes the need for <>><><><<>> dances and makes the code a bit nicer. Not sure if `astconv` is the best name though, maybe someone has a better idea?
2023-01-11Move autoderef to rustc_hir_analysisMichael Goulet-0/+1
2023-01-11Add `AstConv::astconv` method to remove `<dyn AstConv>::` callsMaybe Waffle-3/+2
2022-11-28Make ObligationCtxt::normalize take cause by borrowMichael Goulet-1/+1
2022-11-06Move fallback_has_occurred to FnCtxtMichael Goulet-2/+2
2022-10-30Rollup merge of #97971 - Soveu:varargs, r=jackh726Michael Howell-13/+33
Enable varargs support for calling conventions other than C or cdecl This patch makes it possible to use varargs for calling conventions, which are either based on C (efiapi) or C is based on them (sysv64 and win64). Also pinging ``@phlopsi,`` because he noticed first this oversight when writing a library for UEFI.
2022-10-29Rename some `OwnerId` fields.Nicholas Nethercote-1/+1
spastorino noticed some silly expressions like `item_id.def_id.def_id`. This commit renames several `def_id: OwnerId` fields as `owner_id`, so those expressions become `item_id.owner_id.def_id`. `item_id.owner_id.local_def_id` would be even clearer, but the use of `def_id` for values of type `LocalDefId` is *very* widespread, so I left that alone.
2022-10-23Cleanup message and bless testsJack Huey-1/+1
2022-10-23Apply suggestions from code review Jack Huey-3/+3
Use ticks around abis. Co-authored-by: Esteban Kuber <estebank@users.noreply.github.com>
2022-10-23Enable varargs support for calling conventions other than C or cdeclSoveu-13/+33
This patch makes it possible to use varargs for calling conventions, which are either based on C (like efiapi) or C is based on them (for example sysv64 and win64).
2022-10-20rustc_hir_typeck: fix paths and partially mv fileslcnr-5/+4
2022-10-07Change InferCtxtBuilder from enter to buildCameron Steffen-33/+31
2022-10-07Introduce TypeErrCtxtCameron Steffen-4/+4
TypeErrCtxt optionally has a TypeckResults so that InferCtxt doesn't need to.
2022-10-01Change feature name to is_some_andCameron Steffen-1/+1
2022-09-27rustc_typeck to rustc_hir_analysislcnr-0/+555