about summary refs log tree commit diff
path: root/tests/ui/infinite
AgeCommit message (Collapse)AuthorLines
2025-09-16Add span for struct tail recursion limit errorTawan Muadmuenwai-21/+24
2025-09-12Add test batch 3Oneirical-0/+63
2025-08-10Fix macro infinite recursion test to not trigger warning about semicolon in exprJosh Triplett-8/+8
The test cases for issue 41731 are about infinite macro recursion that incorporates `print!` and `println!`. However, they also included trailing semicolons despite expanding to expressions; that isn't what these particular test cases are designed to test. Eliminate the trailing semicolons, to simplify future work on removing this special case. Every *other* macro that expands to a semicolon in an expression is a test case for that specifically.
2025-08-06Add support for shortening `Instance` and use itEsteban Küber-14/+27
Replace ad-hoc type path shortening logic for recursive mono instantiation errors to use `tcx.short_string()` instead.
2025-06-30Merge `lower_item` into `check_item_type`Oli Scherer-1/+1
2025-06-30Move lazy type alias checks to non-hir-wfckOli Scherer-8/+8
2025-06-07const-eval error: always say in which item the error occurredRalf Jung-1/+1
also adjust the wording a little so that we don't say "the error occurred here" for two different spans
2025-06-02Clarify why we are talking about a failed const eval at a random placeOli Scherer-1/+1
2025-06-02Use the informative error as the main const eval error messageOli Scherer-3/+3
2025-04-03compiletest: Require `//~` annotations even if `error-pattern` is specifiedVadim Petrochenkov-7/+18
2025-03-31increment depth of nested obligationslcnr-2/+2
2025-03-25compiletest: Support matching on diagnostics without a spanVadim Petrochenkov-0/+2
2025-03-04tests: remove explicit long type filename hash normalization from some ui tests许杰友 Jieyou Xu (Joe)-13/+8
2025-02-28Shorten span of panic failures in const contextEsteban Küber-11/+6
Previously, we included a redundant prefix on the panic message and a postfix of the location of the panic. The prefix didn't carry any additional information beyond "something failed", and the location of the panic is redundant with the diagnostic's span, which gets printed out even if its code is not shown. ``` error[E0080]: evaluation of constant value failed --> $DIR/assert-type-intrinsics.rs:11:9 | LL | MaybeUninit::<!>::uninit().assume_init(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation panicked: aborted execution: attempted to instantiate uninhabited type `!` ``` ``` error[E0080]: evaluation of `Fail::<i32>::C` failed --> $DIR/collect-in-dead-closure.rs:9:19 | LL | const C: () = panic!(); | ^^^^^^^^ evaluation panicked: explicit panic | = note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info) ``` ``` error[E0080]: evaluation of constant value failed --> $DIR/uninhabited.rs:41:9 | LL | assert!(false); | ^^^^^^^^^^^^^^ evaluation panicked: assertion failed: false | = note: this error originates in the macro `assert` (in Nightly builds, run with -Z macro-backtrace for more info) ``` --- When the primary span for a const error is the same as the first frame in the const error report, skip it. ``` error[E0080]: evaluation of constant value failed --> $DIR/issue-88434-removal-index-should-be-less.rs:3:24 | LL | const _CONST: &[u8] = &f(&[], |_| {}); | ^^^^^^^^^^^^^^ evaluation panicked: explicit panic | note: inside `f::<{closure@$DIR/issue-88434-removal-index-should-be-less.rs:3:31: 3:34}>` --> $DIR/issue-88434-removal-index-should-be-less.rs:10:5 | LL | panic!() | ^^^^^^^^ the failure occurred here = note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info) ``` instead of ``` error[E0080]: evaluation of constant value failed --> $DIR/issue-88434-removal-index-should-be-less.rs:10:5 | LL | panic!() | ^^^^^^^^ explicit panic | note: inside `f::<{closure@$DIR/issue-88434-removal-index-should-be-less.rs:3:31: 3:34}>` --> $DIR/issue-88434-removal-index-should-be-less.rs:10:5 | LL | panic!() | ^^^^^^^^ note: inside `_CONST` --> $DIR/issue-88434-removal-index-should-be-less.rs:3:24 | LL | const _CONST: &[u8] = &f(&[], |_| {}); | ^^^^^^^^^^^^^^ = note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info) ``` --- Revert order of constant evaluation errors Point at the code the user wrote first and std functions last. ``` error[E0080]: evaluation of constant value failed --> $DIR/const-errs-dont-conflict-103369.rs:5:25 | LL | impl ConstGenericTrait<{my_fn(1)}> for () {} | ^^^^^^^^ evaluation panicked: Some error occurred | note: called from `my_fn` --> $DIR/const-errs-dont-conflict-103369.rs:10:5 | LL | panic!("Some error occurred"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info) ``` instead of ``` error[E0080]: evaluation of constant value failed --> $DIR/const-errs-dont-conflict-103369.rs:10:5 | LL | panic!("Some error occurred"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Some error occurred | note: called from `<() as ConstGenericTrait<{my_fn(1)}>>::{constant#0}` --> $DIR/const-errs-dont-conflict-103369.rs:5:25 | LL | impl ConstGenericTrait<{my_fn(1)}> for () {} | ^^^^^^^^ = note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info) ```
2025-02-10Show diff suggestion format on verbose replacementEsteban Küber-2/+3
``` error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields --> $DIR/attempted-access-non-fatal.rs:7:15 | LL | let _ = 2.l; | ^ | help: if intended to be a floating point literal, consider adding a `0` after the period and a `f64` suffix | LL - let _ = 2.l; LL + let _ = 2.0f64; | ```
2025-01-30normalize long-type.txt in testsRémy Rakic-9/+13
this allows compare-mode to share the same subdirectory and removes differences due to that
2025-01-27Rollup merge of #136112 - fmease:clean-up-all-dead-files-in-ui-tests, ↵Guillaume Gomez-15/+0
r=compiler-errors Clean up all dead files inside `tests/ui/` While rebasing #135860 I noticed that there are several dead `*.stderr` files inside `tests/ui/`. When I checked thoroughly, I found 69 dead `*.$revision.stderr` files, 3 other dead `*.stderr` files and one dead `*.rs` file. Prior to #134808, compiletest's `--bless` didn't remove dead `*.stderr` files when the set of revisions changed in any way (renamings, removals, additions, …) which explains their existence. Regarding the dead `*.rs` file, that one was located inside an `auxiliary/` directory (together with a `*.stderr` file) despite not being meant to be an auxiliary file (it's not referenced by any `//@ aux-*`, it has an accompanying `*.stderr` file and it's obvious from looking at #111056 which added it). Ideally compiletest or tidy would forbid `*.std{out,err}` files inside `auxiliary/` dirs, that would've caught it. I moved it, updated it and turned it into a proper UI test. --- How to reproduce: 1. Run `rm tests/ui/**/*.stderr` 2. Run `./x test tests/ui --bless` (or similar) 3. Manually / semi-automatically go through all tests that were ignored (likely due to your OS etc. not matching) and restore any stderr files that were overzealously removed --- r? compiler
2025-01-27Remove all dead files inside tests/ui/León Orell Valerian Liehr-15/+0
2025-01-27Add `TooGeneric` variant to `LayoutError` and emit `Unknown` oneFedericoBruzzone-1/+1
- `check-pass` test for a MRE of #135020 - fail test for #135138 - switch to `TooGeneric` for checking CMSE fn signatures - switch to `TooGeneric` for compute `SizeSkeleton` (for transmute) - fix broken tests
2025-01-16Auto merge of #134504 - oli-obk:push-rltsvnyttwll, r=compiler-errorsbors-5/+5
Use trait definition cycle detection for trait alias definitions, too fixes #133901 In general doing this for `All` is not right, but this code path is specifically for traits and trait aliases, and there we only ever use `All` for trait aliases.
2025-01-14fix ICE with references to infinite structs in constsLukas Markeffsky-0/+161
2025-01-09Use trait definition cycle detection for trait alias definitions, tooOli Scherer-5/+5
2024-12-27Remove the `-test` suffix from normalize directivesZalathar-1/+1
2024-10-02only query `params_in_repr` if def kind is adtbohan-0/+44
2024-06-26Automatically taint InferCtxt when errors are emittedOli Scherer-3/+15
2024-03-07Merge collect_mod_item_types query into check_well_formedOli Scherer-21/+9
2024-02-22change error messages to be incorrect, but more helpfullcnr-2/+2
2024-02-22do not use <: in subtyping overflow msglcnr-2/+2
2024-02-22overflow errors: change source to a concrete enumlcnr-8/+8
2024-02-22remove `sub_relations` from infcx, recompute in diagnosticslcnr-53/+6
we don't track them when canonicalizing or when freshening, resulting in instable caching in the old solver, and issues when instantiating query responses in the new one.
2024-02-16[AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives许杰友 Jieyou Xu (Joe)-9/+9
2024-02-08Continue to borrowck even if there were previous errorsOli Scherer-2/+14
2023-12-11Add spacing information to delimiters.Nicholas Nethercote-8/+8
This is an extension of the previous commit. It means the output of something like this: ``` stringify!(let a: Vec<u32> = vec![];) ``` goes from this: ``` let a: Vec<u32> = vec![] ; ``` With this PR, it now produces this string: ``` let a: Vec<u32> = vec![]; ```
2023-11-24Manual find replace updatesNilstrieb-1/+1
2023-11-24Show number in error message even for one errorNilstrieb-9/+9
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-10-20Avoid a `track_errors` by bubbling up most errors from `check_well_formed`Oli Scherer-1/+5
2023-08-30Permit recursive weak type aliasesOli Scherer-13/+70
2023-07-18moved note as unspanned note, moved note to the bottom of the msgnxya-15/+3
2023-07-18added links as a notenxya-3/+3
2023-07-18add links to query documentation for E0391nxya-3/+3
2023-07-18added links as a notenxya-3/+18
2023-07-18add links to query documentation for E0391nxya-3/+3
2023-04-11Split implied and super predicate queriesMichael Goulet-16/+1
2023-02-17Fix ICE on type alias in recursionclubby789-0/+25
2023-01-11Move /src/test to /testsAlbert Larsan-0/+1106