about summary refs log tree commit diff
path: root/src/test/ui/structs-enums
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-5393/+0
2022-11-22add tests for field ordering optimizationThe 8472-0/+21
2022-10-20Move some tests for more reasonable placesCaio-0/+26
2022-10-07Rewrite representabilityCameron Steffen-44/+32
2022-09-27core: Mark all safe intrinsics with #[rustc_safe_intrinsic]Arthur Cohen-0/+2
2022-09-07Use niche-filling optimization even when multiple variants have data.Michael Benfield-0/+79
Fixes #46213
2022-08-07Remove even more box syntax uses from src/testest31-3/+2
Prior work, notably 6550021124451628b1efc60c59284465b109e3aa from #88316 has removed box syntax from most of the testsuite. However, some tests were left out. This commit removes box_syntax uses from more locations in src/test. Some tests that are very box syntax specific are not being migrated.
2022-08-03Warn about dead tuple struct fieldsFabian Wolff-6/+7
2022-05-01Move some tests to more reasonable placesCaio-0/+82
2022-03-31Specialize suggestion for Option<T>Michael Goulet-4/+4
2022-03-28Remove duplicated and unused test filesCaio-0/+12
2022-03-23stop emitting E0026 for struct enums with underscoresTakayuki Maeda-0/+36
2021-12-09Add needs-unwind to tests that depend on panickingDavid Koloski-0/+1
This directive isn't automatically set by compiletest or x.py, but can be turned on manually for targets that require it.
2021-11-14Move some tests to more reasonable directoriesCaio-95/+0
2021-11-09Rollup merge of #90591 - richlowe:illumos-ui-target, r=Mark-SimulacrumYuki Okushi-0/+1
treat illumos like solaris in failing ui tests which need it Just adding the right cfg target for tests which fail because they don't know illumos is a thing. (cc `````@jclulow)`````
2021-11-06Move some tests to more reasonable directoriesCaio-0/+6
2021-11-04treat illumos like solaris in failing ui tests which need itRichard Lowe-0/+1
2021-09-26Remove box syntax from most places in src/test outside of the issues direst31-8/+3
2021-09-15Move some tests to more reasonable directoriesCaio-0/+35
2021-09-09Ignore automatically derived impls of `Clone` and `Debug` in dead code analysisFabian Wolff-0/+6
2021-08-11Modify structured suggestion outputEsteban Küber-6/+6
* On suggestions that include deletions, use a diff inspired output format * When suggesting addition, use `+` as underline * Color highlight modified span
2021-05-11Auto merge of #85012 - FabianWolff:struct-rec, r=davidtwcobors-0/+138
Fix stack overflow when checking for structural recursion This pull request aims to fix #74224 and fix #84611. The current logic for detecting ADTs with structural recursion is flawed because it only looks at the root type, and then for exact matches. What I mean by this is that for examples such as: ```rust struct A<T> { x: T, y: A<A<T>>, } struct B { z: A<usize> } fn main() {} ``` When checking `A`, the compiler correctly determines that it has an infinite size (because the "root" type is `A`, and `A` occurs, albeit with different type arguments, as a nested type in `A`). However, when checking `B`, it also recurses into `A`, but now `B` is the root type, and it only checks for _exact_ matches of `A`, but since `A` never precisely contains itself (only `A<A<T>>`, `A<A<A<T>>>`, etc.), an endless recursion ensues until the stack overflows. In this PR, I have attempted to fix this behavior by implementing a two-phase checking: When checking `B`, my code first checks `A` _separately_ and stops if `A` already turns out to be infinite. If not (such as for `Option<T>`), the second phase checks whether the root type (`B`) is ever nested inside itself, e.g.: ```rust struct Foo { x: Option<Option<Foo>> } ``` Special care needs to be taken for mutually recursive types, e.g.: ```rust struct A<T> { z: T, x: B<T>, } struct B<T> { y: A<T> } ``` Here, both `A` and `B` both _are_ `SelfRecursive` and _contain_ a recursive type. The current behavior, which I have maintained, is to treat both `A` and `B` as `SelfRecursive`, and accordingly report errors for both.
2021-05-10Implement changes suggested by tmiasko and davidtwcoFabian Wolff-0/+138
2021-05-06Fix up/ignore failing ui tests on fuchsiaTyler Mandry-0/+1
2021-03-20Move some tests to more reasonable directories - 5Caio-0/+26
2021-02-16Move some tests to more reasonable directoriesCaio-0/+173
2021-01-13Update code to account for extern ABI requirementMark Rousskov-2/+2
2021-01-13Update tests for extern block lintingMark Rousskov-3/+3
2020-12-29Remove `compile-fail` test suiteVadim Petrochenkov-2/+2
2020-11-29Update tests to remove old numeric constantsbstrie-2/+0
Part of #68490. Care has been taken to leave the old consts where appropriate, for testing backcompat regressions, module shadowing, etc. The intrinsics docs were accidentally referring to some methods on f64 as std::f64, which I changed due to being contrary with how we normally disambiguate the shadow module from the primitive. In one other place I changed std::u8 to std::ops since it was just testing path handling in macros. For places which have legitimate uses of the old consts, deprecated attributes have been optimistically inserted. Although currently unnecessary, they exist to emphasize to any future deprecation effort the necessity of these specific symbols and prevent them from being accidentally removed.
2020-11-26Fix new 'unnecessary trailing semicolon' warningsAaron Hill-2/+2
2020-11-22Drop support for cloudabi targetsLzu Tao-1/+0
2020-04-01Rollup merge of #70081 - lcnr:issue68387, r=varkorDylan DPC-0/+1
add `unused_braces` lint Add the lint `unused_braces` which is warn by default. `unused_parens` is also extended and now checks anon consts. closes #68387 r? @varkor
2020-03-31update testsBastian Kauschke-0/+1
2020-03-19Ensure there are versions of test code for aarch64 windowsDaniel Frampton-7/+0
2019-12-22Remove mem::uninitalized from testsMark Rousskov-6/+13
This purges uses of uninitialized where possible from test cases. Some are merely moved over to the equally bad pattern of MaybeUninit::uninit().assume_init() but with an annotation that this is "the best we can do".
2019-10-23UI failures fixUmesh Kalappa-1/+2
2019-08-15Group all ui tests and move to abi #62593Kevin Per-64/+0
2019-07-27tests: Move run-pass tests without naming conflicts to uiVadim Petrochenkov-0/+4925