about summary refs log tree commit diff
path: root/tests/ui/sized
AgeCommit message (Collapse)AuthorLines
2025-08-19bless tests with new lint messagesKarol Zwolak-1/+1
2025-07-24Rehome tests/ui/issues/ tests [1/?]Oneirical-0/+27
2025-07-05cleaned up some testsKivooeo-23/+41
2025-07-01moved testsKivooeo-0/+45
2025-06-18Bless/update tests.Mara Bos-2/+2
2025-06-13Unimplement unsized_localsmejrs-5/+2
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-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-5/+5
2025-03-13Only prefer Sized candidates, and only if they certainly holdMichael Goulet-0/+21
2025-02-28normalizing where-clauses is also coinductive, add testslcnr-0/+3
2024-11-23Update tests for new TRPL chapter orderChris Krycho-1/+1
2024-10-06On function and method calls in patterns, link to the bookEsteban Küber-1/+3
``` error: expected a pattern, found an expression --> f889.rs:3:13 | 3 | let (x, y.drop()) = (1, 2); //~ ERROR | ^^^^^^^^ not a pattern | = note: arbitrary expressions are not allowed in patterns: <https://doc.rust-lang.org/book/ch18-00-patterns.html> error[E0532]: expected a pattern, found a function call --> f889.rs:2:13 | 2 | let (x, drop(y)) = (1, 2); //~ ERROR | ^^^^ not a tuple struct or tuple variant | = note: function calls are not allowed in patterns: <https://doc.rust-lang.org/book/ch18-00-patterns.html> ``` Fix #97200.
2024-08-08Detect `*` operator on `!Sized` expressionEsteban Küber-0/+109
``` error[E0277]: the size for values of type `str` cannot be known at compilation time --> $DIR/unsized-str-in-return-expr-arg-and-local.rs:15:9 | LL | let x = *""; | ^ doesn't have a size known at compile-time | = help: the trait `Sized` is not implemented for `str` = note: all local variables must have a statically known size = help: unsized locals are gated as an unstable feature help: references are always `Sized`, even if they point to unsized data; consider not dereferencing the expression | LL - let x = *""; LL + let x = ""; | ```
2024-07-02remove unnecessary ignore-endian-big from stack-overflow-trait-infer testRalf Jung-6/+5
2024-06-22don't ICE when encountering an extern type field during validationRalf Jung-36/+3
2024-06-18Only check locally for reported errorsOli Scherer-2/+14
2024-05-20hir pretty: fix block indentNilstrieb-2/+2
2024-04-15Fix pretty hir for anon consts in diagnosticsMichael Goulet-2/+4
2024-04-02t plit astconv's error report code in check functions to mod errors.surechen-3/+3
Move some error report codes to mod `astconv/errors.rs`
2024-03-29Do not attempt to write `ty::Err` on binding that isn't from current HIR OwnerEsteban Küber-0/+43
Fix #123009.
2024-03-24add issue numbers via // issue: rust-lang/rust#ISSUE_NUM directiveMatthias Krüger-3/+56
2024-03-24add test for stack overflow with recursive type #98842Matthias Krüger-0/+40
Fixes #98842
2024-03-19Silence unecessary `!Sized` binding errorEsteban Küber-14/+3
When gathering locals, we introduce a `Sized` obligation for each binding in the pattern. *After* doing so, we typecheck the init expression. If this has a type failure, we store `{type error}`, for both the expression and the pattern. But later we store an inference variable for the pattern. We now avoid any override of an existing type on a hir node when they've already been marked as `{type error}`, and on E0277, when it comes from `VariableType` we silence the error in support of the type error. Fix #117846.
2024-03-19Add test for #117846Esteban Küber-0/+52
2024-02-16[AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives许杰友 Jieyou Xu (Joe)-6/+6
2024-02-07Update testsr0cky-1/+11
2023-12-26add test for coercing never to infinite typeLukas Markeffsky-0/+30
2023-12-26rename testsLukas Markeffsky-1/+1
2023-11-24Show number in error message even for one errorNilstrieb-2/+2
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-10-09Only emit one error per unsized binding, instead of one per usageEsteban Küber-29/+3
Fix #56607.
2023-10-09Add test for #56607Esteban Küber-0/+44
2023-07-21Revert "Auto merge of #113166 - moulins:ref-niches-initial, r=oli-obk"David Tolnay-5/+9
This reverts commit 557359f92512ca88b62a602ebda291f17a953002, reversing changes made to 1e6c09a803fd543a98bfbe1624d697a55300a786.
2023-07-21add `naive_layout_of` queryMoulins-9/+5
2023-07-18moved note as unspanned note, moved note to the bottom of the msgnxya-1/+1
2023-07-18added links as a notenxya-1/+1
2023-07-18add links to query documentation for E0391nxya-1/+1
2023-07-18added links as a notenxya-1/+2
2023-07-18add links to query documentation for E0391nxya-1/+1
2023-01-11Move /src/test to /testsAlbert Larsan-0/+92