about summary refs log tree commit diff
path: root/compiler/rustc_interface/src/lib.rs
AgeCommit message (Collapse)AuthorLines
2025-05-12update cfg(bootstrap)Pietro Albini-1/+0
2025-04-23Make #![feature(let_chains)] bootstrap conditional in compiler/est31-1/+1
2025-03-11Remove `#![warn(unreachable_pub)]` from all `compiler/` crates.Nicholas Nethercote-1/+0
It's no longer necessary now that `-Wunreachable_pub` is being passed.
2025-03-10Revert "Use workspace lints for crates in `compiler/` #138084"许杰友 Jieyou Xu (Joe)-0/+1
Revert <https://github.com/rust-lang/rust/pull/138084> to buy time to consider options that avoids breaking downstream usages of cargo on distributed `rustc-src` artifacts, where such cargo invocations fail due to inability to inherit `lints` from workspace root manifest's `workspace.lints` (this is only valid for the source rust-lang/rust workspace, but not really the distributed `rustc-src` artifacts). This breakage was reported in <https://github.com/rust-lang/rust/issues/138304>. This reverts commit 48caf81484b50dca5a5cebb614899a3df81ca898, reversing changes made to c6662879b27f5161e95f39395e3c9513a7b97028.
2025-03-08Remove `#![warn(unreachable_pub)]` from all `compiler/` crates.Nicholas Nethercote-1/+0
(Except for `rustc_codegen_cranelift`.) It's no longer necessary now that `unreachable_pub` is in the workspace lints.
2025-02-17Move `rustc_middle::limits` to `rustc_interface`.Nicholas Nethercote-0/+1
It's always good to make `rustc_middle` smaller. `rustc_interface` is the best destination, because it's the only crate that calls `get_recursive_limit`.
2024-12-14Remove the parse querybjorn3-2/+2
2024-12-14Get rid of of the global_ctxt querybjorn3-2/+2
2024-10-01add unstable support for outputting file checksums for use in cargoJacob Kiesel-0/+1
2024-09-24Dogfood `feature(file_buffered)`Josh Stone-0/+1
2024-09-22Reformat using the new identifier sorting from rustfmtMichael Goulet-1/+1
2024-08-27Add `warn(unreachable_pub)` to `rustc_interface`.Nicholas Nethercote-0/+1
2024-08-16Stabilize std::thread::Builder::spawn_uncheckedDavid Tolnay-1/+0
2024-07-01Move codegen_and_build_linker from Queries to Linkerbjorn3-1/+1
2024-06-22Inline write_dep_info querybjorn3-1/+1
2024-06-12Use `tidy` to sort crate attributes for all compiler crates.Nicholas Nethercote-0/+2
We already do this for a number of crates, e.g. `rustc_middle`, `rustc_span`, `rustc_metadata`, `rustc_span`, `rustc_errors`. For the ones we don't, in many cases the attributes are a mess. - There is no consistency about order of attribute kinds (e.g. `allow`/`deny`/`feature`). - Within attribute kind groups (e.g. the `feature` attributes), sometimes the order is alphabetical, and sometimes there is no particular order. - Sometimes the attributes of a particular kind aren't even grouped all together, e.g. there might be a `feature`, then an `allow`, then another `feature`. This commit extends the existing sorting to all compiler crates, increasing consistency. If any new attribute line is added there is now only one place it can go -- no need for arbitrary decisions. Exceptions: - `rustc_log`, `rustc_next_trait_solver` and `rustc_type_ir_macros`, because they have no crate attributes. - `rustc_codegen_gcc`, because it's quasi-external to rustc (e.g. it's ignored in `rustfmt.toml`).
2024-02-20Stabilize `LazyCell` and `LazyLock` (`lazy_cell`)Peter Jaszkowiak-1/+0
2024-05-23Remove `#[macro_use] extern crate tracing` from `rustc_interface`.Nicholas Nethercote-3/+0
2024-04-22Stabilize generic `NonZero`.Markus Reiter-1/+0
2024-02-21Unify dylib loading between proc macros and codegen backendsbjorn3-1/+0
As bonus this makes the errors when failing to load a proc macro more informative to match the backend loading errors. In addition it makes it slightly easier to patch rustc to work on platforms that don't support dynamic linking like wasm.
2024-02-15Use generic `NonZero` internally.Markus Reiter-0/+1
2024-02-06Invert diagnostic lints.Nicholas Nethercote-2/+0
That is, change `diagnostic_outside_of_impl` and `untranslatable_diagnostic` from `allow` to `deny`, because more than half of the compiler has be converted to use translated diagnostics. This commit removes more `deny` attributes than it adds `allow` attributes, which proves that this change is warranted.
2024-01-25Remove unused featuresclubby789-3/+0
2024-01-10Format sources into the error message when loading codegen backendsSimonas Kazlauskas-1/+2
cc https://github.com/rust-lang/rustc_codegen_cranelift/issues/1447
2023-12-05rustc_interface: Address all `rustc::potential_query_instability` lintsMartin Nordholts-1/+0
Instead of allowing `rustc::potential_query_instability` on the whole crate we go over each lint and allow it individually if it is safe to do. Turns out all instances were safe to allow in this crate.
2023-11-26Use `rustc_fluent_macro::fluent_messages!` directly.Nicholas Nethercote-3/+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-10-13MCP636: Add simpler and more explicit syntax to check-cfgUrgau-0/+1
This add a new form and deprecated the other ones: - cfg(name1, ..., nameN, values("value1", "value2", ... "valueN")) - cfg(name1, ..., nameN) or cfg(name1, ..., nameN, values()) - cfg(any()) It also changes the default exhaustiveness to be enable-by-default in the presence of any --check-cfg arguments.
2023-09-22Merge `ExternProviders` into the general `Providers` structOli Scherer-1/+1
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-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-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-02-22errors: generate typed identifiers in each crateDavid Wood-0/+5
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-01-17Don't call closures immediately, use `try{}` blocksMaybe Waffle-0/+1
2022-11-09Fix `rustdoc --version` when used with download-rustcJoshua Nelson-0/+1
Previously, rustdoc would unconditionally report the version that *rustc* was compiled with. That showed things like `nightly-2022-10-30`, which wasn't right, since this was a `dev` build compiled from source. Fix it by changing `rustc_driver::version` to a macro expanded at invocation time.
2022-09-26remove cfg(bootstrap)Pietro Albini-1/+0
2022-09-15Only enable the let_else feature on bootstrapest31-1/+1
On later stages, the feature is already stable. Result of running: rg -l "feature.let_else" compiler/ src/librustdoc/ library/ | xargs sed -s -i "s#\\[feature.let_else#\\[cfg_attr\\(bootstrap, feature\\(let_else\\)#"
2022-09-01Always import all tracing macros for the entire crate instead of piecemeal ↵Oli Scherer-0/+3
by module
2022-08-22Deny diagnostic lints in rustc_interfaceGiacomo Stevanato-0/+2
2022-08-22Move existing diagnostic struct to a new errors moduleGiacomo Stevanato-0/+1
2022-06-03Fully stabilize NLLJack Huey-1/+0
2022-05-04Stabilize `bool::then_some`Josh Triplett-1/+0
2022-02-25Switch bootstrap cfgsMark Rousskov-1/+1
2022-02-12Move setup_callbacks call to create_compiler_and_runbjorn3-0/+1
This ensures that it is called even when run_in_thread_pool_with_globals is avoided and reduces code duplication between the parallel and non-parallel version of run_in_thread_pool_with_globals
2022-02-01add a rustc::query_stability lintlcnr-0/+1
2022-01-18Use let_else in even more placesest31-0/+1
2021-10-28Revert "Add rustc lint, warning when iterating over hashmaps"Mark Rousskov-1/+0
2021-10-15allow `potential_query_instability` everywherelcnr-0/+1
2021-09-23Simplify scoped_threadMark Rousskov-0/+1
Avoids a bunch of manual pointer manipulation.
2021-06-08Don't use a generator for BoxedResolverbjorn3-2/+0
The generator is non-trivial and requires unsafe code anyway. Using regular unsafe code without a generator is much easier to follow.