about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2025-02-02Some cleanups around EarlyDiagCtxtbjorn3-3/+2
All callers of EarlyDiagCtxt::early_error now emit a fatal error.
2025-01-31Insert null checks for pointer dereferences when debug assertions are enabledBastian Kersting-0/+2
Similar to how the alignment is already checked, this adds a check for null pointer dereferences in debug mode. It is implemented similarly to the alignment check as a MirPass. This is related to a 2025H1 project goal for better UB checks in debug mode: https://github.com/rust-lang/rust-project-goals/pull/177.
2025-01-28Merge commit '51d49c1ae2785b24ef18a46ef233fc1d91844666' into ↵Philipp Krones-1/+1
clippy-subtree-update
2025-01-23Remove RunCompilerbjorn3-3/+3
It has become nothing other than a wrapper around run_compiler.
2025-01-23Remove the need to manually call set_using_internal_featuresbjorn3-7/+3
2024-12-26Merge commit '609cd310be44677ae31d452a17b0f8207e1abfe1' into ↵Philipp Krones-2/+2
clippy-subtree-update
2024-12-06Remove all threading through of ErrorGuaranteed from the driverbjorn3-3/+5
It was inconsistently done (sometimes even within a single function) and most of the rest of the compiler uses fatal errors instead, which need to be caught using catch_with_exit_code anyway. Using fatal errors instead of ErrorGuaranteed everywhere in the driver simplifies things a bit.
2024-10-03Merge commit 'aa0d551351a9c15d8a95fdb3e2946b505893dda8' into ↵Philipp Krones-25/+36
clippy-subtree-update
2024-09-24Merge commit '7901289135257ca0fbed3a5522526f95b0f5edba' into ↵Philipp Krones-3/+1
clippy-subtree-update
2024-08-11Link `std` statically in `rustc_driver`John Kåre Alsaker-0/+3
2024-08-08Merge commit 'cb806113e0f83a8f9b47d35b453b676543bcc40e' into ↵Philipp Krones-3/+0
clippy-subtree-update
2024-07-28step cfg(bootstrap)Mark Rousskov-1/+0
2024-06-25RFC 2383: Stabilize `lint_reasons` in Clippy :paperclips:xFrednet-1/+1
2024-06-18Use a dedicated type instead of a reference for the diagnostic contextOli Scherer-2/+2
This paves the way for tracking more state (e.g. error tainting) in the diagnostic context handle
2024-02-20Stabilize `LazyCell` and `LazyLock` (`lazy_cell`)Peter Jaszkowiak-1/+0
2024-03-08Merge from rustcThe Miri Cronjob Bot-2/+7
2024-03-07Merge commit '93f0a9a91f58c9b2153868f458402155fb6265bb' into ↵Philipp Krones-2/+7
clippy-subtree-update
2024-03-07Use `rustc_driver::args::raw_args()` in Clippybeetrees-1/+1
2024-03-05Rename all `ParseSess` variables/fields/lifetimes as `psess`.Nicholas Nethercote-10/+10
Existing names for values of this type are `sess`, `parse_sess`, `parse_session`, and `ps`. `sess` is particularly annoying because that's also used for `Session` values, which are often co-located, and it can be difficult to know which type a value named `sess` refers to. (That annoyance is the main motivation for this change.) `psess` is nice and short, which is good for a name used this much. The commit also renames some `parse_sess_created` values as `psess_created`.
2024-02-27Merge commit '10136170fe9ed01e46aeb4f4479175b79eb0e3c7' into ↵Philipp Krones-0/+2
clippy-subtree-update
2024-02-18By tracking import use types to check whether it is scope uses or the other ↵surechen-1/+0
situations like module-relative uses, we can do more accurate redundant import checking. fixes #117448 For example unnecessary imports in std::prelude that can be eliminated: ```rust use std::option::Option::Some;//~ WARNING the item `Some` is imported redundantly use std::option::Option::None; //~ WARNING the item `None` is imported redundantly ```
2024-02-09Rollup merge of #120806 - flip1995:clippy-subtree-update, r=ManishearthMatthias Krüger-2/+23
Clippy subtree update r? `@Manishearth`
2024-02-08Merge commit '60cb29c5e4f9772685c9873752196725c946a849' into clippyupPhilipp Krones-2/+23
2024-02-06Invert diagnostic lints.Nicholas Nethercote-0/+2
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.
2023-12-18Rename many `DiagCtxt` and `EarlyDiagCtxt` locals.Nicholas Nethercote-2/+2
2023-12-18Rename `EarlyErrorHandler` as `EarlyDiagCtxt`.Nicholas Nethercote-2/+2
2023-12-16Merge commit 'a859e5cc1ce100df22346a1005da30532d04de59' into clippyupPhilipp Krones-1/+1
2023-12-02Rename `*note_without_error` as `*note`.Nicholas Nethercote-1/+1
Because the variant name in `Level` is `Note`, and the `without_error` suffix is omitted in similar cases like `struct_allow` and `struct_help`.
2023-11-16Merge commit 'edb720b199083f4107b858a8761648065bf38d86' into clippyupPhilipp Krones-1/+1
2023-11-02Merge commit '09ac14c901abc43bd0d617ae4a44e8a4fed98d9c' into clippyupPhilipp Krones-4/+6
2023-10-26Auto merge of #116818 - Nilstrieb:stop-submitting-bug-reports, r=wesleywiserbors-3/+5
Stop telling people to submit bugs for internal feature ICEs This keeps track of usage of internal features, and changes the message to instead tell them that using internal features is not supported. I thought about several ways to do this but now used the explicit threading of an `Arc<AtomicBool>` through `Session`. This is not exactly incremental-safe, but this is fine, as this is set during macro expansion, which is pre-incremental, and also only affects the output of ICEs, at which point incremental correctness doesn't matter much anyways. See [MCP 620.](https://github.com/rust-lang/compiler-team/issues/596) ![image](https://github.com/rust-lang/rust/assets/48135649/be661f05-b78a-40a9-b01d-81ad2dbdb690)
2023-10-25Stop telling people to submit bugs for internal feature ICEsNilstrieb-3/+5
This keeps track of usage of internal features, and changes the message to instead tell them that using internal features is not supported. See MCP 620.
2023-10-21Merge commit '2b030eb03d9e5837440b1ee0b98c50b97c0c5889' into clippyupPhilipp Krones-3/+3
2023-10-06Merge commit 'b105fb4c39bc1a010807a6c076193cef8d93c109' into clippyupPhilipp Krones-54/+64
2023-07-31Merge commit '5436dba826191964ac1d0dab534b7eb6d4c878f6' into clippyupPhilipp Krones-3/+2
2023-07-17Merge commit 'd9c24d1b1ee61f276e550b967409c9f155eac4e3' into clippyupPhilipp Krones-0/+7
2023-07-02Merge commit '37f4c1725d3fd7e9c3ffd8783246bc5589debc53' into clippyupPhilipp Krones-4/+6
2023-06-27Provide more context for `rustc +nightly -Zunstable-options` on stable许杰友 Jieyou Xu (Joe)-1/+5
2023-06-02Merge commit '30448e8cf98d4754350db0c959644564f317bc0f' into clippyupPhilipp Krones-12/+3
2023-05-06Rollup merge of #110989 - jyn514:bug-report-url, r=WaffleLapkinMatthias Krüger-61/+9
Make the BUG_REPORT_URL configurable by tools This greatly simplifies how hard it is to set a custom bug report url; previously tools had to copy the entire hook implementation. I haven't changed clippy in case they want to make the change upstream instead of the subtree, but I'm happy to do so here if the maintainers want - cc ````@rust-lang/clippy```` Fixes https://github.com/rust-lang/rust/issues/109486.
2023-05-05Merge commit '371120bdbf58a331db5dcfb2d9cddc040f486de8' into clippyupPhilipp Krones-1/+1
2023-05-01Make the BUG_REPORT_URL configurable by toolsjyn-61/+9
This greatly simplifies how hard it is to set a custom bug report url; previously tools had to copy the entire hook implementation. - Switch clippy to the new hook This also adds a `extra_info` callback so clippy can include its own version number, which differs from rustc's. - Call `install_ice_hook` in rustfmt
2023-04-17Force -Zflatten-format-args=no in Clippy.Mara Bos-0/+3
2023-04-11Merge commit '83e42a2337dadac915c956d125f1d69132f36425' into clippyupPhilipp Krones-1/+1
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-10Merge commit '3c06e0b1ce003912f8fe0536d3a7fe22558e38cf' into clippyupPhilipp Krones-2/+2
2023-02-25Merge commit '149392b0baa4730c68f3c3eadf5c6ed7b16b85a4' into clippyupJason Newcomb-4/+1
2023-02-22various: translation resources from cg backendDavid Wood-1/+4
Extend `CodegenBackend` trait with a function returning the translation resources from the codegen backend, which can be added to the complete list of resources provided to the emitter. Signed-off-by: David Wood <david.wood@huawei.com>
2023-02-22errors: generate typed identifiers in each crateDavid Wood-1/+1
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-09Introduce `-Zterminal-urls` to use OSC8 for error codesEsteban Küber-0/+1
Terminals supporting the OSC8 Hyperlink Extension can support inline anchors where the text is user defineable but clicking on it opens a browser to a specified URLs, just like `<a href="URL">` does in HTML. https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda