about summary refs log tree commit diff
path: root/src/tools/clippy/tests/ui/crashes
AgeCommit message (Collapse)AuthorLines
2025-09-18Merge commit '20ce69b9a63bcd2756cd906fe0964d1e901e042a' into ↵Philipp Krones-0/+39
clippy-subtree-update
2025-08-13Update clippy testsVadim Petrochenkov-2/+22
2025-08-11fix clippy testEsteban Küber-0/+2
2025-06-13Merge commit '4ef75291b5dd6739212f1f61666d19d4e086690d' into ↵Philipp Krones-33/+31
clippy-subtree-update
2025-05-28Stabilise `repr128`beetrees-3/+0
2025-05-21Merge commit 'cadf98bb7d783e2ea3572446c3f80d3592ec5f86' into ↵Philipp Krones-23/+33
clippy-subtree-update
2025-05-15Merge commit '0450db33a5d8587f7c1d4b6d233dac963605766b' into ↵Philipp Krones-0/+43
clippy-subtree-update
2025-04-24Suggest {to,from}_ne_bytes for transmutations between arrays and integers, etcbendn-1/+1
2025-04-22Merge commit '0621446356e20fd2ead13a6763bb936c95eb0cfa' into ↵Philipp Krones-30/+69
clippy-subtree-update
2025-03-30Drop `clippy::invalid_null_ptr_usage`Urgau-1/+1
2025-03-20Merge commit '1e5237f4a56ae958af7e5824343eacf737b67083' into ↵Philipp Krones-2/+5
clippy-subtree-update
2025-03-11Implement `#[define_opaque]` attribute for functions.Oli Scherer-10/+0
2025-02-28Merge commit '9f9a822509e5ad3e560cbbe830d1013f936fca28' into ↵Philipp Krones-67/+335
clippy-subtree-update
2025-01-28Merge commit '51d49c1ae2785b24ef18a46ef233fc1d91844666' into ↵Philipp Krones-7/+53
clippy-subtree-update
2025-01-21remove support for the #[start] attributeRalf Jung-11/+2
2025-01-09Merge commit '19e305bb57a7595f2a8d81f521c0dd8bf854e739' into ↵Philipp Krones-0/+28
clippy-subtree-update
2024-12-12Filter empty lines, comments and delimiters from previous to last multiline ↵Esteban Küber-2/+0
span rendering
2024-12-12Tweak multispan renderingEsteban Küber-6/+0
Consider comments and bare delimiters the same as an "empty line" for purposes of hiding rendered code output of long multispans. This results in more aggressive shortening of rendered output without losing too much context, specially in `*.stderr` tests that have "hidden" comments.
2024-11-28Merge commit 'ff4a26d442bead94a4c96fb1de967374bc4fbd8e' into ↵Philipp Krones-24/+0
clippy-subtree-update
2024-10-11Auto merge of #131045 - compiler-errors:remove-unnamed_fields, r=wesleywiserbors-10/+0
Retire the `unnamed_fields` feature for now `#![feature(unnamed_fields)]` was implemented in part in #115131 and #115367, however work on that feature has (afaict) stalled and in the mean time there have been some concerns raised (e.g.[^1][^2]) about whether `unnamed_fields` is worthwhile to have in the language, especially in its current desugaring. Because it represents a compiler implementation burden including a new kind of anonymous ADT and additional complication to field selection, and is quite prone to bugs today, I'm choosing to remove the feature. However, since I'm not one to really write a bunch of words, I'm specifically *not* going to de-RFC this feature. This PR essentially *rolls back* the state of this feature to "RFC accepted but not yet implemented"; however if anyone wants to formally unapprove the RFC from the t-lang side, then please be my guest. I'm just not totally willing to summarize the various language-facing reasons for why this feature is or is not worthwhile, since I'm coming from the compiler side mostly. Fixes #117942 Fixes #121161 Fixes #121263 Fixes #121299 Fixes #121722 Fixes #121799 Fixes #126969 Fixes #131041 Tracking: * https://github.com/rust-lang/rust/issues/49804 [^1]: https://rust-lang.zulipchat.com/#narrow/stream/213817-t-lang/topic/Unnamed.20struct.2Funion.20fields [^2]: https://github.com/rust-lang/rust/issues/49804#issuecomment-1972619108
2024-10-03Merge commit 'aa0d551351a9c15d8a95fdb3e2946b505893dda8' into ↵Philipp Krones-5/+17
clippy-subtree-update
2024-10-01Remove crashes and fix testsMichael Goulet-10/+0
2024-09-26Rollup merge of #130912 - estebank:point-at-arg-type, r=compiler-errorsJubilee-2/+2
On implicit `Sized` bound on fn argument, point at type instead of pattern Instead of ``` error[E0277]: the size for values of type `(dyn ThriftService<(), AssocType = _> + 'static)` cannot be known at compilation time --> $DIR/issue-59324.rs:23:20 | LL | fn with_factory<H>(factory: dyn ThriftService<()>) {} | ^^^^^^^ doesn't have a size known at compile-time ``` output ``` error[E0277]: the size for values of type `(dyn ThriftService<(), AssocType = _> + 'static)` cannot be known at compilation time --> $DIR/issue-59324.rs:23:29 | LL | fn with_factory<H>(factory: dyn ThriftService<()>) {} | ^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time ```
2024-09-27On implicit `Sized` bound on fn argument, point at type instead of patternEsteban Küber-2/+2
Instead of ``` error[E0277]: the size for values of type `(dyn ThriftService<(), AssocType = _> + 'static)` cannot be known at compilation time --> $DIR/issue-59324.rs:23:20 | LL | fn with_factory<H>(factory: dyn ThriftService<()>) {} | ^^^^^^^ doesn't have a size known at compile-time ``` output ``` error[E0277]: the size for values of type `(dyn ThriftService<(), AssocType = _> + 'static)` cannot be known at compilation time --> $DIR/issue-59324.rs:23:29 | LL | fn with_factory<H>(factory: dyn ThriftService<()>) {} | ^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time ```
2024-09-24Merge commit '7901289135257ca0fbed3a5522526f95b0f5edba' into ↵Philipp Krones-34/+30
clippy-subtree-update
2024-08-24Merge commit '0f8eabd6231366bfc1bb1464601297c2d48f8f68' into clippyupJason Newcomb-3/+12
2024-08-08Merge commit 'cb806113e0f83a8f9b47d35b453b676543bcc40e' into ↵Philipp Krones-7/+7
clippy-subtree-update
2024-07-25Merge commit '37f4fbb92913586b73a35772efd00eccd1cbbe13' into ↵Philipp Krones-12/+3
clippy-subtree-update
2024-07-11Merge commit 'b794b8e08c16517a941dc598bb1483e8e12a8592' into ↵Philipp Krones-1/+1
clippy-subtree-update
2024-06-27Merge commit '68a799aea9b65e2444fbecfe32217ce7d5a3604f' into ↵Philipp Krones-0/+10
clippy-subtree-update
2024-06-13Tweak output of import suggestionsEsteban Küber-3/+1
When both `std::` and `core::` items are available, only suggest the `std::` ones. We ensure that in `no_std` crates we suggest `core::` items. Ensure that the list of items suggested to be imported are always in the order of local crate items, `std`/`core` items and finally foreign crate items. Tweak wording of import suggestion: if there are multiple items but they are all of the same kind, we use the kind name and not the generic "items". Fix #83564.
2024-06-13Merge commit '3e5a02b13b1244545454752c6629b767522a44b1' into ↵Philipp Krones-39/+3
clippy-subtree-update
2024-05-02Merge commit '20b085d500dfba5afe0869707bf357af3afe20be' into ↵Philipp Krones-1/+2
clippy-subtree-update
2024-04-24Error on using `yield` without also using `#[coroutine]` on the closureOli Scherer-2/+2
And suggest adding the `#[coroutine]` to the closure
2024-04-18Merge commit 'ca3b393750ee8d870bf3215dcf6509cafa5c0445' into ↵Philipp Krones-9/+27
clippy-subtree-update
2024-04-04Merge commit '9725c4a162502a02c1c67fdca6b797fe09b2b73c' into ↵Philipp Krones-1/+34
clippy-subtree-update
2024-03-22Update (doc) commentsLeón Orell Valerian Liehr-1/+1
Several (doc) comments were super outdated or didn't provide enough context. Some doc comments shoved everything in a single paragraph without respecting the fact that the first paragraph should be a single sentence because rustdoc treats these as item descriptions / synopses on module pages.
2024-03-21Merge commit '9d6f41691ed9dbfaec2a2df2661c42451f2fe0d3' into ↵Philipp Krones-0/+34
clippy-subtree-update
2024-03-07Merge commit '93f0a9a91f58c9b2153868f458402155fb6265bb' into ↵Philipp Krones-1/+1
clippy-subtree-update
2024-02-29Rollup merge of #121669 - nnethercote:count-stashed-errs-again, r=estebankGuillaume Gomez-0/+17
Count stashed errors again Stashed diagnostics are such a pain. Their "might be emitted, might not" semantics messes with lots of things. #120828 and #121206 made some big changes to how they work, improving some things, but still leaving some problems, as seen by the issues caused by #121206. This PR aims to fix all of them by restricting them in a way that eliminates the "might be emitted, might not" semantics while still allowing 98% of their benefit. Details in the individual commit logs. r? `@oli-obk`
2024-02-29Overhaul how stashed diagnostics work, again.Nicholas Nethercote-0/+17
Stashed errors used to be counted as errors, but could then be cancelled, leading to `ErrorGuaranteed` soundness holes. #120828 changed that, closing the soundness hole. But it introduced other difficulties because you sometimes have to account for pending stashed errors when making decisions about whether errors have occured/will occur and it's easy to overlook these. This commit aims for a middle ground. - Stashed errors (not warnings) are counted immediately as emitted errors, avoiding the possibility of forgetting to consider them. - The ability to cancel (or downgrade) stashed errors is eliminated, by disallowing the use of `steal_diagnostic` with errors, and introducing the more restrictive methods `try_steal_{modify,replace}_and_emit_err` that can be used instead. Other things: - `DiagnosticBuilder::stash` and `DiagCtxt::stash_diagnostic` now both return `Option<ErrorGuaranteed>`, which enables the removal of two `delayed_bug` calls and one `Ty::new_error_with_message` call. This is possible because we store error guarantees in `DiagCtxt::stashed_diagnostics`. - Storing the guarantees also saves us having to maintain a counter. - Calls to the `stashed_err_count` method are no longer necessary alongside calls to `has_errors`, which is a nice simplification, and eliminates two more `span_delayed_bug` calls and one FIXME comment. - Tests are added for three of the four fixed PRs mentioned below. - `issue-121108.rs`'s output improved slightly, omitting a non-useful error message. Fixes #121451. Fixes #121477. Fixes #121504. Fixes #121508.
2024-02-28Use `LitKind::Err` for floats with empty exponents.Nicholas Nethercote-12/+1
This prevents a follow-up type error in a test, which seems fine.
2024-02-27Merge commit '10136170fe9ed01e46aeb4f4479175b79eb0e3c7' into ↵Philipp Krones-55/+59
clippy-subtree-update
2024-02-17Allow newly added non_local_definitions lint in clippyUrgau-0/+3
2024-01-26Rollup merge of #120345 - flip1995:clippy-subtree-update, r=ManishearthMatthias Krüger-1/+1
Clippy subtree update r? `@Manishearth` Closes https://github.com/rust-lang/rust-clippy/issues/12148
2024-01-25Merge commit '66c29b973b3b10278bd39f4e26b08522a379c2c9' into ↵Philipp Krones-1/+1
clippy-subtree-update
2024-01-24remove StructuralEq traitRalf Jung-17/+0
2024-01-11Merge commit '26ac6aab023393c94edf42f38f6ad31196009643'Philipp Krones-23/+0
2024-01-05Rollup merge of #119151 - Jules-Bertholet:no-foreign-doc-hidden-suggest, ↵Matthias Krüger-2/+0
r=davidtwco Hide foreign `#[doc(hidden)]` paths in import suggestions Stops the compiler from suggesting to import foreign `#[doc(hidden)]` paths. ```@rustbot``` label A-suggestion-diagnostics
2024-01-03Track `HirId` instead of `Span` in `ObligationCauseCode::SizedArgumentType`Esteban Küber-1/+1
This gets us more accurate suggestions.