about summary refs log tree commit diff
path: root/tests/ui/unsized-locals
AgeCommit message (Collapse)AuthorLines
2025-07-08Error on moving unsized values rather than ICE'ingmejrs-7/+118
2025-07-01Update version placeholdersJosh Stone-1/+1
2025-06-24Don't include current rustc version string in feature removed helpJieyou Xu-4/+2
The version string is difficult to properly normalize out, and removing it isn't a huge deal (the user can query version info easily through `rustc --version` or `cargo --version`). The normalization options were all non-ideal: - Per-test version string normalization is nasty to maintain, and we need to maintain `n` copies of it. - Centralized compiletest normalization (with a directive opt-out) is also not ideal, because `cfg(version(..))` tests can't have those accidentally normalized out (and you'd have to remember to opt-out).
2025-06-23Account for beta revisions when normalizing versionsJosh Stone-1/+1
Several UI tests have a `normalize-stderr` for "you are using x.y.z" rustc versions, and that regex is flexible enough for suffixes like "-nightly" and "-dev", but not for "-beta.N". We can just add '.' to that trailing pattern to include this.
2025-06-13Unimplement unsized_localsmejrs-257/+293
2025-04-08UI tests: add missing diagnostic kinds where possibleVadim Petrochenkov-2/+4
2025-02-27Delete tuple unsizingAlice Ryhl-54/+7
2024-10-29Remove detail from label/note that is already available in other noteEsteban Küber-5/+5
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-10UI tests: Rename "object safe" to "dyn compatible"León Orell Valerian Liehr-2/+2
2024-03-24add issue numbers via // issue: rust-lang/rust#ISSUE_NUM directiveMatthias Krüger-1/+1
2024-03-24add test for #88212 ICE when lambda captures unsized localMatthias Krüger-0/+44
Fixes #88212
2024-02-16[AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives许杰友 Jieyou Xu (Joe)-11/+11
2024-01-30Provide more context on derived obligation error primary labelEsteban Küber-5/+5
Expand the primary span of E0277 when the immediate unmet bound is not what the user wrote: ``` error[E0277]: the trait bound `i32: Bar` is not satisfied --> f100.rs:6:6 | 6 | <i32 as Foo>::foo(); | ^^^ the trait `Bar` is not implemented for `i32`, which is required by `i32: Foo` | help: this trait has no implementations, consider adding one --> f100.rs:2:1 | 2 | trait Bar {} | ^^^^^^^^^ note: required for `i32` to implement `Foo` --> f100.rs:3:14 | 3 | impl<T: Bar> Foo for T {} | --- ^^^ ^ | | | unsatisfied trait bound introduced here ``` Fix #40120.
2024-01-24Deduplicate more sized errors on call exprsEsteban Küber-1/+1
Change the implicit `Sized` `Obligation` `Span` for call expressions to include the whole expression. This aids the existing deduplication machinery to reduce the number of errors caused by a single unsized expression.
2024-01-02Adjust compiler tests for unused_tuple_struct_fields -> dead_codeJake Goulding-1/+1
2023-11-24Show number in error message even for one errorNilstrieb-9/+9
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-06-13Rollup merge of #111885 - compiler-errors:rust-call-abi-sized, r=eholkMatthias Krüger-0/+25
Don't ICE on unsized `extern "rust-call"` call Conceptually builds on #111864, but doesn't depend on it.
2023-06-06Note why rust-call abi requires sized oblMichael Goulet-0/+1
2023-06-06Don't ICE on unsized rust-call abi callMichael Goulet-0/+24
2023-06-05diagnostics: do not suggest type name tweaks on type-inferred closure argsMichael Howell-4/+1
Fixes #111932
2023-05-23Always require closure parameters to be `Sized`Jules Bertholet-0/+24
The `rust-call` ABI isn't compatible with `#![feature(unsized_fn_params)]`, so trying to use that feature with closures leads to an ICE (#67981). This turns that ICE into a type-check error.
2023-05-13Auto merge of #111374 - tmiasko:align-unsized-locals, r=cjgillotbors-0/+30
Align unsized locals Allocate an extra space for unsized locals and manually align the storage, since alloca doesn't support dynamic alignment. Fixes #71416. Fixes #71695.
2023-05-08Align unsized localsTomasz Miąsko-0/+30
Allocate an extra space for unsized locals and manually align the storage, since alloca doesn't support dynamic alignment.
2023-05-08Tweak borrow suggestionMichael Goulet-4/+7
2023-01-30Modify primary span label for E0308Esteban Küber-2/+2
The previous output was unintuitive to users.
2023-01-11Move /src/test to /testsAlbert Larsan-0/+859