summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis/src/lib.rs
AgeCommit message (Collapse)AuthorLines
2024-01-25Remove unused featuresclubby789-3/+0
2024-01-23Remove track_errors entirelyOli Scherer-10/+6
2024-01-21Auto merge of #120100 - oli-obk:astconv_lifetimes, r=BoxyUwUbors-2/+2
Don't forget that the lifetime on hir types is `'tcx` This PR just tracks the `'tcx` lifetime to wherever the original objects actually have that lifetime. This code is needed for https://github.com/rust-lang/rust/pull/107606 (now #120131) so that `ast_ty_to_ty` can invoke `lit_to_const` on an argument passed to it. Currently the argument is `&hir::Ty<'_>`, but after this PR it is `&'tcx hir::Ty<'tcx>`.
2024-01-18Don't forget that the lifetime on hir types is `'tcx`Oli Scherer-2/+2
2024-01-17Make crate_inherent_impls fallible and stop using `track_errors` for itOli Scherer-3/+2
2024-01-17Make crate_inherent_impls_overlap_check bubble up its errorsOli Scherer-1/+1
2024-01-17Move `check_mod_impl_wf` query call out of track_errors and bubble errors up ↵Oli Scherer-7/+8
instead.
2024-01-17Stop using track_errors for some forever unstable rustc_attr analysesOli Scherer-7/+3
2024-01-13Auto merge of #119088 - George-lewis:glewis/suggest-upgrading-compiler, ↵bors-7/+2
r=Nilstrieb Suggest Upgrading Compiler for Gated Features This PR addresses #117318 I have a few questions: 1. Do we want to specify the current version and release date of the compiler? I have added this in via environment variables, which I found in the code for the rustc cli where it handles the `--version` flag a. How can I handle the changing message in the tests? 3. Do we want to only show this message when the compiler is old? a. How can we determine when the compiler is old? I'll wait until we figure out the message to bless the tests
2024-01-13Add check for ui_testing via promoting parameters from `ParseSess` to `Session`George-lewis-7/+2
2024-01-13Rollup merge of #119587 - beepster4096:system_varargs, r=petrochenkovMatthias Krüger-1/+2
Varargs support for system ABI This PR allows functions with the `system` ABI to be variadic (under the `extended_varargs_abi_support` feature tracked in #100189). On x86 windows, the `system` ABI is equivalent to `C` for variadic functions. On other platforms, `system` is already equivalent to `C`. Fixes #110505
2024-01-12allow system abi to be variadicbeepster4096-1/+2
2024-01-09Avoid silencing relevant follow-up errorsOli Scherer-6/+5
2024-01-02Merge check_for_entry_fn fully into check_mod_type_wfOli Scherer-7/+2
2024-01-02Reorder `check_item_type` diagnostics so they occur next to the ↵Oli Scherer-6/+2
corresponding `check_well_formed` diagnostics
2023-12-24Remove more `Session` methods that duplicate `DiagCtxt` methods.Nicholas Nethercote-1/+1
2023-12-24Remove `Session` methods that duplicate `DiagCtxt` methods.Nicholas Nethercote-1/+1
Also add some `dcx` methods to types that wrap `TyCtxt`, for easier access.
2023-12-02Rename `HandlerInner::delay_span_bug` as `HandlerInner::span_delayed_bug`.Nicholas Nethercote-2/+2
Because the corresponding `Level` is `DelayedBug` and `span_delayed_bug` follows the pattern used everywhere else: `span_err`, `span_warning`, etc.
2023-11-26Use `rustc_fluent_macro::fluent_messages!` directly.Nicholas Nethercote-2/+1
Currently we always do this: ``` use rustc_fluent_macro::fluent_messages; ... fluent_messages! { "./example.ftl" } ``` But there is no need, we can just do this everywhere: ``` rustc_fluent_macro::fluent_messages! { "./example.ftl" } ``` which is shorter.
2023-11-26Avoid need for `{D,Subd}iagnosticMessage` imports.Nicholas Nethercote-1/+0
The `fluent_messages!` macro produces uses of `crate::{D,Subd}iagnosticMessage`, which means that every crate using the macro must have this import: ``` use rustc_errors::{DiagnosticMessage, SubdiagnosticMessage}; ``` This commit changes the macro to instead use `rustc_errors::{D,Subd}iagnosticMessage`, which avoids the need for the imports.
2023-11-15Bump cfg(bootstrap)sMark Rousskov-3/+3
2023-10-25Auto merge of #117180 - matthiaskrgr:rollup-rxhl6ep, r=matthiaskrgrbors-2/+6
Rollup of 7 pull requests Successful merges: - #117111 (Remove support for alias `-Z instrument-coverage`) - #117141 (Require target features to match exactly during inlining) - #117152 (Fix unwrap suggestion for async fn) - #117154 (implement C ABI lowering for CSKY) - #117159 (Work around the fact that `check_mod_type_wf` may spuriously return `ErrorGuaranteed`) - #117163 (compiletest: Display compilation errors in mir-opt tests) - #117173 (Make `Iterator` a lang item) r? `@ghost` `@rustbot` modify labels: rollup
2023-10-25Work around the fact that `check_mod_type_wf` may spuriously return ↵Oli Scherer-2/+6
`ErrorGuaranteed`, even if that error is only emitted by `check_modwitem_types`
2023-10-24Merge impl_wf_inference into coherence checkingMichael Goulet-6/+3
2023-10-23Let's see what those opaque types actually areMichael Goulet-0/+4
2023-10-23Allow `ensure` queries to return `Result<(), ErrorGuaranteed>`Oli Scherer-1/+1
2023-10-20Avoid a `track_errors` by bubbling up most errors from `check_well_formed`Oli Scherer-4/+2
2023-10-08rustdoc: remove rust logo from non-Rust cratesMichael Howell-0/+3
2023-09-19rustc_hir_analysis: add a helper to check function the signature mismatchesEduardo Sánchez Muñoz-25/+1
This function is now used to check `#[panic_handler]`, `start` lang item, `main`, `#[start]` and intrinsic functions. The diagnosis produced are now closer to the ones produced by trait/impl method signature mismatch.
2023-09-14Enable varargs support for AAPCS calling conventionSoveu-1/+1
This is the default calling convention for ARM - it is used for extern "C", therefore it supports varargs.
2023-09-02Freeze `Definitions` earlierJohn Kåre Alsaker-0/+4
2023-07-16Querify unused trait check.Camille GILLOT-1/+2
2023-07-15Check entry type as part of item type checking.Camille GILLOT-268/+2
2023-07-14refactor(rustc_middle): Substs -> GenericArgMahdi Dibaiee-4/+4
2023-07-11typeck in parallelSparrowLii-0/+12
2023-07-05Move `TyCtxt::mk_x` to `Ty::new_x` where applicableBoxy-13/+19
2023-06-14remove hash_drain_filter feature usesThe 8472-1/+0
2023-06-14s/drain_filter/extract_if/ for Vec, Btree{Map,Set} and LinkedListThe 8472-1/+0
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