summary refs log tree commit diff
path: root/tests/ui/rfcs
AgeCommit message (Collapse)AuthorLines
2024-11-16Add regression test for issue #103476, fixed in edition 2024est31-0/+25
2024-11-16Also check if let chains with multiple lets in these two testsest31-1/+28
2024-11-10Add more places where expressions can occurest31-398/+835
2024-11-10Unify disallowed-positions test files into one fileest31-652/+2405
Also make the file have a third mode for where everything is cfg'd out to make sure it's an early error.
2024-11-04Rollup merge of #132303 - nyurik:non-exhaustive-err, r=compiler-errorsJubilee-1/+10
More tests for non-exhaustive C-like enums in FFI Add a few more tests for the `improper_ctypes` lint as found with the [varnish-rs](https://github.com/gquintard/varnish-rs) project. This follows up on #116831, fixed in #116863 by ``@workingjubilee`` - I have been seeing these fail with the bindgen-generated non-exhaustive enums inside other structs. Seems the issue does not exist in the primary branch, so this PR just makes sure more cases are covered for the future.
2024-11-03use backticks instead of single quotes when reporting "use of unstable ↵dianne-2/+2
library feature" This is consistent with all other diagnostics I could find containing features and enables the use of `DiagSymbolList` for generalizing diagnostics for unstable library features to multiple features.
2024-10-30Rollup merge of #132332 - nnethercote:use-token_descr-more, r=estebankMatthias Krüger-4/+4
Use `token_descr` more in error messages This is the first two commits from #124141, put into their own PR to get things rolling. Commit messages have the details. r? ``@estebank`` cc ``@petrochenkov``
2024-10-30Rollup merge of #129394 - Jarcho:irrefutable_let_patterns, r=NadrierilMatthias Krüger-1/+39
Don't lint `irrefutable_let_patterns` on leading patterns if `else if` let-chains fixes #128661 Is there any preference where the test goes? There looks to be several places it could fit.
2024-10-29Don't lint `irrefutable_let_patterns` on leading patterns if `else if` ↵Jason Newcomb-1/+39
let-chains.
2024-10-29Remove detail from label/note that is already available in other noteEsteban Küber-2/+2
Remove the "which is required by `{root_obligation}`" post-script in "the trait `X` is not implemented for `Y`" explanation in E0277. This information is already conveyed in the notes explaining requirements, making it redundant while making the text (particularly in labels) harder to read. ``` error[E0277]: the trait bound `NotCopy: Copy` is not satisfied --> $DIR/wf-static-type.rs:10:13 | LL | static FOO: IsCopy<Option<NotCopy>> = IsCopy { t: None }; | ^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `NotCopy` | = note: required for `Option<NotCopy>` to implement `Copy` note: required by a bound in `IsCopy` --> $DIR/wf-static-type.rs:7:17 | LL | struct IsCopy<T:Copy> { t: T } | ^^^^ required by this bound in `IsCopy` ``` vs the prior ``` error[E0277]: the trait bound `NotCopy: Copy` is not satisfied --> $DIR/wf-static-type.rs:10:13 | LL | static FOO: IsCopy<Option<NotCopy>> = IsCopy { t: None }; | ^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `NotCopy`, which is required by `Option<NotCopy>: Copy` | = note: required for `Option<NotCopy>` to implement `Copy` note: required by a bound in `IsCopy` --> $DIR/wf-static-type.rs:7:17 | LL | struct IsCopy<T:Copy> { t: T } | ^^^^ required by this bound in `IsCopy` ```
2024-10-28More test for non-exhaustive C-like enums in FFIYuri Astrakhan-1/+10
Add a few more possibly false-positive tests for the `improper_ctypes` lint
2024-10-28Tweak more warnings.Nicholas Nethercote-4/+4
Much like the previous commit. I think the removal of "the token" in each message is fine here. There are many more error messages that mention tokens without saying "the token" than those that do say it.
2024-10-22Move testsMichael Goulet-7896/+0
2024-10-21Auto merge of #130628 - workingjubilee:clean-up-result-ffi-guarantees, ↵bors-0/+133
r=RalfJung Finish stabilization of `result_ffi_guarantees` The internal linting has been changed, so all that is left is making sure we stabilize what we want to stabilize.
2024-10-21lang: Strengthen RFC 3391 guarantees to match T-lang consensusJubilee Young-0/+71
2024-10-19compiler: Fully stabilize `result_ffi_guarantees`Jubilee Young-0/+62
2024-10-19Rollup merge of #116863 - workingjubilee:non-exhaustive-is-not-ffi-unsafe, ↵Matthias Krüger-6/+25
r=jieyouxu warn less about non-exhaustive in ffi Bindgen allows generating `#[non_exhaustive] #[repr(u32)]` enums. This results in nonintuitive nonlocal `improper_ctypes` warnings, even when the types are otherwise perfectly valid in C. Adjust for actual tooling expectations by avoiding warning on simple enums with only unit variants. Closes https://github.com/rust-lang/rust/issues/116831
2024-10-17Rollup merge of #128391 - cafce25:issue-128390, r=lcnrMatthias Krüger-4/+5
Change orphan hint from "only" to "any uncovered type inside..." Fix #128390
2024-10-10Rollup merge of #131475 - fmease:compiler-mv-obj-safe-dyn-compat-2, r=jieyouxuMatthias Krüger-5/+5
Compiler & its UI tests: Rename remaining occurrences of "object safe" to "dyn compatible" Follow-up to #130826. Part of #130852. 1. 1st commit: Fix stupid oversights. Should've been part of #130826. 2. 2nd commit: Rename the unstable feature `object_safe_for_dispatch` to `dyn_compatible_for_dispatch`. Might not be worth the churn, you decide. 3. 3rd commit: Apply the renaming to all UI tests (contents and paths).
2024-10-10UI tests: Rename "object safe" to "dyn compatible"León Orell Valerian Liehr-2/+2
2024-10-10Rename feature object_safe_for_dispatch to dyn_compatible_for_dispatchLeón Orell Valerian Liehr-3/+3
2024-10-06more `asm!` -> `naked_asm!` in testsFolkert de Vries-3/+3
2024-10-04Bless ui tests.Camille GILLOT-28/+28
2024-10-02Improve const traits diagnostics for new desugaringDeadbeef-137/+114
2024-09-30Rollup merge of #131038 - onkoe:fix/adt_const_params_leak_118179, ↵Matthias Krüger-3/+3
r=compiler-errors Fix `adt_const_params` leaking `{type error}` in error msg Fixes the confusing diagnostic described in #118179. (users would see `{type error}` in some situations, which is pretty weird) `adt_const_params` tracking issue: #95174
2024-09-29fix(hir_analysis/wfcheck): don't leak {type error}Barrett Ray-3/+3
avoid `{type error}` being leaked in user-facing messages, particularly when using the `adt_const_params` feature
2024-09-27properly elaborate effects implied bounds for super traitsDeadbeef-53/+21
2024-09-26Make new information notes instead of labelsJonathan Birk-5/+5
2024-09-24Ban combination of GCE and new solverMichael Goulet-8/+23
2024-09-21Don't elaborate effects predicates into bounds list unless we're actually ↵Michael Goulet-14/+1
collecting implied bounds, not super bounds
2024-09-19warn less about non-exhaustive in ffiJubilee Young-6/+25
Bindgen allows generating `#[non_exhaustive] #[repr(u32)]` enums. This results in nonintuitive nonlocal `improper_ctypes` warnings, even when the types are otherwise perfectly valid in C. Adjust for actual tooling expectations by avoiding warning on simple enums with only unit variants.
2024-09-18Never patterns constitute a read for unsafetyMichael Goulet-0/+36
2024-09-15stabilize const_mut_refsRalf Jung-37/+34
2024-09-13Add a machine-applicable suggestion to "unreachable pattern"Nadrieril-5/+20
2024-09-11Revert warning empty patterns as unreachableNadrieril-31/+26
2024-09-02Non-exhaustive structs may be emptyNadrieril-196/+134
2024-08-26Stop using a special inner body for the coroutine by-move body for async ↵Michael Goulet-6/+6
closures
2024-08-24remove invalid `TyCompat` relation for effectsDeadbeef-2/+13
2024-08-21Rollup merge of #129281 - Nadrieril:tweak-unreachable-lint-wording, r=estebankMatthias Krüger-28/+28
Tweak unreachable lint wording Some tweaks to the notes added in https://github.com/rust-lang/rust/pull/128034. r? `@estebank`
2024-08-20Move the "matches no value" note to be a span labelNadrieril-24/+12
2024-08-19Add a note with a link to explain empty typesNadrieril-0/+12
2024-08-19Reword the "unreachable pattern" explanationsNadrieril-16/+16
2024-08-16Simplify cleaning foreign fns in rustdocMichael Goulet-2/+2
2024-08-11Add more information link to orphan implsJonathan Birk-1/+2
2024-08-10Auto merge of #128927 - GuillaumeGomez:rollup-ei2lr0f, r=GuillaumeGomezbors-22/+22
Rollup of 8 pull requests Successful merges: - #128273 (Improve `Ord` violation help) - #128807 (run-make: explaing why fmt-write-bloat is ignore-windows) - #128903 (rustdoc-json-types `Discriminant`: fix typo) - #128905 (gitignore: Add Zed and Helix editors) - #128908 (diagnostics: do not warn when a lifetime bound infers itself) - #128909 (Fix dump-ice-to-disk for RUSTC_ICE=0 users) - #128910 (Differentiate between methods and associated functions in diagnostics) - #128923 ([rustdoc] Stop showing impl items for negative impls) r? `@ghost` `@rustbot` modify labels: rollup
2024-08-10Update testsNadrieril-209/+159
2024-08-10Differentiate between methods and associated functionsEsteban Küber-22/+22
Accurately refer to assoc fn without receiver as assoc fn instead of methods. Add `AssocItem::descr` method to centralize where we call methods and associated functions.
2024-08-07Hide implicit target features from diagnostics when possibleCaleb Zulawski-14/+12
2024-08-07Add test to ensure implied target features work with asm, and fix failing testsCaleb Zulawski-42/+25
2024-07-30Adjust orphan note in testsJonathan Birk-1/+1