about summary refs log tree commit diff
path: root/tests/ui/error-codes
AgeCommit message (Collapse)AuthorLines
2025-07-31Extend `is_case_difference` to handle digit-letter confusablesxizheyin-1/+1
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-07-18Rollup merge of #143699 - compiler-errors:async-drop-fund, r=oli-obkMatthias Krüger-1/+1
Make `AsyncDrop` check that it's being implemented on a local ADT Fixes https://github.com/rust-lang/rust/issues/143691
2025-07-13Retire hir::*ItemRef.Camille GILLOT-2/+2
2025-07-09Make AsyncDrop check that it's being implemented on a local ADTMichael Goulet-1/+1
2025-07-08Rollup merge of #143177 - xizheyin:143134, r=lcnrTrevor Gross-2/+0
Remove false label when `self` resolve failure does not relate to macro Fixes rust-lang/rust#143134 In the first commit, I did some code-clean, moving `suggest*` to `suggestions/` dir. In the second, commit, I added ui test. In the third, I change the code, and present the test result. r? compiler
2025-07-03Return early when `self` resolve failure because of `let self = ...`xizheyin-2/+0
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-07-01Suggest use another lifetime specifier instead of underscore lifetimexizheyin-0/+2
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-06-27const checks: avoid 'top-level scope' terminologyRalf Jung-11/+25
2025-06-27Auto merge of #143074 - compiler-errors:rollup-cv64hdh, r=compiler-errorsbors-8/+8
Rollup of 18 pull requests Successful merges: - rust-lang/rust#137843 (make RefCell unstably const) - rust-lang/rust#140942 (const-eval: allow constants to refer to mutable/external memory, but reject such constants as patterns) - rust-lang/rust#142549 (small iter.intersperse.fold() optimization) - rust-lang/rust#142637 (Remove some glob imports from the type system) - rust-lang/rust#142647 ([perf] Compute hard errors without diagnostics in impl_intersection_has_impossible_obligation) - rust-lang/rust#142700 (Remove incorrect comments in `Weak`) - rust-lang/rust#142927 (Add note to `find_const_ty_from_env`) - rust-lang/rust#142967 (Fix RwLock::try_write documentation for WouldBlock condition) - rust-lang/rust#142986 (Port `#[export_name]` to the new attribute parsing infrastructure) - rust-lang/rust#143001 (Rename run always ) - rust-lang/rust#143010 (Update `browser-ui-test` version to `0.20.7`) - rust-lang/rust#143015 (Add `sym::macro_pin` diagnostic item for `core::pin::pin!()`) - rust-lang/rust#143033 (Expand const-stabilized API links in relnotes) - rust-lang/rust#143041 (Remove cache for citool) - rust-lang/rust#143056 (Move an ACE test out of the GCI directory) - rust-lang/rust#143059 (Fix 1.88 relnotes) - rust-lang/rust#143067 (Tracking issue number for `iter_macro`) - rust-lang/rust#143073 (Fix some fixmes that were waiting for let chains) Failed merges: - rust-lang/rust#143020 (codegen_fn_attrs: make comment more precise) r? `@ghost` `@rustbot` modify labels: rollup
2025-06-26clarify and unify 'transient mutable borrow' errorsRalf Jung-8/+8
2025-06-24Make missing lifetime suggestion verboseMichael Goulet-5/+11
2025-06-17make error codes reflect reality betterJana Dönszelmann-37/+50
2025-06-17use consistent attr errors in all attribute parsersJana Dönszelmann-1/+1
2025-06-17fix bugs in inline/force_inline and diagnostics of all attr parsersJana Dönszelmann-3/+16
2025-06-14Rollup merge of #142464 - RalfJung:variadic-fn-abi-error, r=workingjubileeMatthias Krüger-1/+1
variadic functions: remove list of supported ABIs from error I think this list is problematic for multiple reasons: - It is bound to go out-of-date as it is in a very different place from where we actually define which functions support varagrs (`fn supports_varargs`). - Many of the ABIs we list only work on some targets; it makes no sense to mention "aapcs" as a possible ABI when building for x86_64. (This led to a lot of confusion in https://github.com/rust-lang/rust/issues/110505 where the author thought they should use "cdecl" and then were promptly told that "cdecl" is not a legal ABI on their target.) - Typically, when the programmer wrote `extern "foobar"`, it is because they need the "foobar" ABI. It is of little use to tell them that there are other ABIs with which varargs would work. Cc ``@workingjubilee``
2025-06-13variadic functions: remove list of supported ABIs from errorRalf Jung-1/+1
2025-06-13Unimplement unsized_localsmejrs-10/+3
2025-06-08Auto merge of #142008 - RalfJung:const-eval-error-here, r=oli-obkbors-2/+2
const-eval error: always say in which item the error occurred I don't see why "is this generic" should make a difference. It may be reasonable to key this on whether the error occurs in a `const fn` that was invoked by a const (making it non-obvious which constant it is) vs inside the body of the const. r? `@oli-obk`
2025-06-07intrinsics: use const generic to set atomic orderingRalf Jung-15/+0
2025-06-07const-eval error: always say in which item the error occurredRalf Jung-2/+2
also adjust the wording a little so that we don't say "the error occurred here" for two different spans
2025-06-06reword suggestion messageEsteban Küber-2/+2
2025-06-06Make cast suggestions verboseEsteban Küber-7/+13
``` error[E0604]: only `u8` can be cast as `char`, not `u32` --> $DIR/E0604.rs:2:5 | LL | 1u32 as char; | ^^^^^^^^^^^^ invalid cast | help: try `char::from_u32` instead | LL - 1u32 as char; LL + char::from_u32(1u32); | ``` ``` error[E0620]: cast to unsized type: `&[u8]` as `[char]` --> $DIR/cast-to-slice.rs:6:5 | LL | arr as [char]; | ^^^^^^^^^^^^^ | help: try casting to a reference instead | LL | arr as &[char]; | + ``` ``` error[E0620]: cast to unsized type: `Box<{integer}>` as `dyn Send` --> $DIR/cast-to-unsized-trait-object-suggestion.rs:3:5 | LL | Box::new(1) as dyn Send; | ^^^^^^^^^^^^^^^^^^^^^^^ | help: you can cast to a `Box` instead | LL | Box::new(1) as Box<dyn Send>; | ++++ + ```
2025-06-04Rollup merge of #141888 - ferrocene:lw/decouple-tests-from-2015, ↵Matthias Krüger-6/+6
r=compiler-errors Use non-2015 edition paths in tests that do not test for their resolution This allows for testing these tests on editions other than 2015
2025-06-03Rollup merge of #141698 - oli-obk:ctfe-err-flip, r=RalfJungMatthias Krüger-12/+9
Use the informative error as the main const eval error message r? `@RalfJung` I only did the minimal changes necessary to the const eval error machinery. I'd prefer not to mix test changes with refactorings 😆
2025-06-03Use non-2015 edition paths in tests that do not test for their resolutionLukas Wirth-6/+6
This allows for testing these tests on editions other than 2015
2025-06-02Clarify why we are talking about a failed const eval at a random placeOli Scherer-2/+2
2025-06-02Use the informative error as the main const eval error messageOli Scherer-12/+9
2025-06-02Add missing `dyn` keywords to tests that do not test for themLukas Wirth-14/+14
This ensures that these tests can be run on editions other than 2015
2025-05-28Stabilise `repr128`beetrees-10/+6
2025-05-23Do not try to confirm non-dyn compatible methodMichael Goulet-31/+2
2025-05-22Rollup merge of #140218 - fmease:hirtylo-clean-up-path-low, r=compiler-errorsMatthias Krüger-1/+7
HIR ty lowering: Clean up & refactor the lowering of type-relative paths While rebasing #126651 I realized that HIR ty lowering could benefit from some *spring cleaning* now that it's been extended to handle RTN and mGCA paths. More seriously, similar to my merged PR #118668 which unified the handling of all *associated item constraints* (assoc ty, const (ACE) & fn (RTN)), this PR (commit https://github.com/rust-lang/rust/pull/140218/commits/695fcf517d8864b4812225643ef8cfc036ba9f61) partially[^1] deduplicates the resolution code for all *type-relative paths* (assoc ty, const (mGCA) & fn (RTN)). **Why**? DRY'ing that part of the code means PR #126651 will automatically support RTN paths like `Ty::AssocTy::assoc_fn(..)` and it also implies shared diagnostic code and thus better diagnostics for RTN. --- The other commits represent cleanups, renamings, moves. More notably, I've renamed path lowering methods to be a lot more descriptive, so ones lowering `QPath(Resolved)` paths now have `_resolved_` in their name and ones lowering `QPath(TypeRelative)` paths now have `_type_relative_` in their name. This should make it stupidly obvious what their purpose is. --- Best reviewed commit by commit. The changes are close to trivial but the diff might make it look hairier. r? compiler-errors [^1]: Sadly, I couldn't unify as much compared to the other PR without introducing unnecessary `unreachable!()`s or rendering the code otherwise illegible with flags and micro helper traits.
2025-05-07Better error message for late/early lifetime param mismatchMichael Goulet-11/+50
2025-05-07Point out region bound mismatches in check_region_bounds_on_impl_itemMichael Goulet-1/+5
2025-05-06Preserve generic args in suggestions for ambiguous associated itemsLeón Orell Valerian Liehr-1/+7
Most notably, this preserves the `(..)` of ambiguous RTN paths.
2025-05-02resolve: Support imports of associated types and glob imports from traitsVadim Petrochenkov-19/+0
2025-04-30compiletest: Make diagnostic kind mandatory on line annotationsVadim Petrochenkov-10/+15
2025-04-13UI tests: migrate remaining compile time `error-pattern`s to line annotationsVadim Petrochenkov-5/+8
when possible.
2025-04-10Rollup merge of #139530 - oli-obk:rustc-intrinsic-cleanup, r=RalfJungMatthias Krüger-23/+0
Remove some dead or leftover code related to rustc-intrinsic abi removal r? ```@RalfJung``` PR that removed the ABI: https://github.com/rust-lang/rust/pull/139455 tracking issue: https://github.com/rust-lang/rust/issues/132735
2025-04-09Remove some dead or leftover code related to rustc-intrinsic abi removalOli Scherer-23/+0
2025-04-08UI tests: add missing diagnostic kinds where possibleVadim Petrochenkov-9/+9
2025-04-06update/bless testsBennet Bleßmann-23/+29
2025-04-03compiletest: Require `//~` annotations even if `error-pattern` is specifiedVadim Petrochenkov-1/+4
2025-03-16Rollup merge of #138471 - spencer3035:move-ui-test-1ofn, r=jieyouxu许杰友 Jieyou Xu (Joe)-0/+67
Clean up some tests in tests/ui I cleaned up 3 top level tests, keeping the changes minor because it is my first PR and wanted to get feedback before doing more changes/PRs. Tracking issues: https://github.com/rust-lang/rust/issues/73494 https://github.com/rust-lang/rust/issues/133895 r? jieyouxu
2025-03-15improves duplicate lang item testSpencer-0/+36
2025-03-15improves duplicate label testSpencer-0/+31
2025-03-14Do not suggest using `-Zmacro-backtrace` for builtin macrosEsteban Küber-2/+0
For macros that are implemented on the compiler, we do *not* mention the `-Zmacro-backtrace` flag. This includes `derive`s and standard macros.
2025-03-12Disentangle ForwardGenericParamBan and ConstParamTy ribsMichael Goulet-2/+2
2025-03-06`TypeVerifier` do not walk into required constslcnr-1/+1
2025-03-04tests: rebless some tests as a side-effect of `TEST_BUILD_DIR` changes许杰友 Jieyou Xu (Joe)-7/+7
2025-03-04tests: remove explicit long type filename hash normalization from some ui tests许杰友 Jieyou Xu (Joe)-3/+2