about summary refs log tree commit diff
path: root/src/test/ui/issues
AgeCommit message (Collapse)AuthorLines
2020-11-19Regroup many usefulness-related test in the same folderNadrieril-507/+0
2020-11-19expand: Stop derive expansion un unexpected targets earlyVadim Petrochenkov-26/+3
Collect derive placeholders using `collect` instead of `push`
2020-11-19Rollup merge of #79110 - estebank:issue-58964, r=oli-obkDylan DPC-380/+92
Remove redundant notes in E0275 Fix #58964.
2020-11-19Revert "Normalize function type during validation"Tomasz Miąsko-0/+4
This reverts commit d486bfcbff107e8a6769e00c59d02b13c664b6ee.
2020-11-18Add support for custom allocators in `Vec`Tim Diekmann-1/+1
2020-11-18Account for indirect cyclic requirementsEsteban Küber-1/+89
2020-11-18Remove redundant notes in E0275Esteban Küber-379/+3
Fix #58964.
2020-11-18change error for `LayoutErr::SizeOverflow`Bastian Kauschke-7/+7
2020-11-15Rollup merge of #78969 - tmiasko:normalize, r=davidtwcoDylan DPC-4/+0
Normalize function type during validation During inlining, the callee body is normalized and has types revealed, but some of locals corresponding to the arguments might come from the caller body which is not. As a result the caller body does not pass validation without additional normalization. Closes #78442.
2020-11-14Auto merge of #78809 - vn-ki:fix-issue-76064, r=oli-obkbors-70/+14
add error_occured field to ConstQualifs, fix #76064 I wasn't sure what `in_return_place` actually did and not sure why it returns `ConstQualifs` while it's sibling functions return `bool`. So I tried to make as minimal changes to the structure as possible. Please point out whether I have to refactor it or not. r? `@oli-obk` cc `@RalfJung`
2020-11-13Rollup merge of #78985 - lcnr:cg-drop-test, r=nikomatsakisGuillaume Gomez-34/+0
add dropck test for const params r? `@nikomatsakis` or `@varkor`
2020-11-13Rollup merge of #77151 - rust-lang:LeSeulArtichaut-patch-1, r=pnkfelixGuillaume Gomez-0/+16
Add regression test for issue #76042 Originally posted in https://github.com/rust-lang/rust/issues/76042#issuecomment-683272710. r? `@pnkfelix`
2020-11-12Normalize function type during validationTomasz Miąsko-4/+0
During inlining, the callee body is normalized and has types revealed, but some of locals corresponding to the arguments might come from the caller body which is not. As a result the caller body does not pass validation without additional normalization.
2020-11-12Rollup merge of #78836 - fanzier:struct-and-slice-destructuring, r=petrochenkovMara Bos-10/+38
Implement destructuring assignment for structs and slices This is the second step towards implementing destructuring assignment (RFC: rust-lang/rfcs#2909, tracking issue: #71126). This PR is the second part of #71156, which was split up to allow for easier review. Note that the first PR (#78748) is not merged yet, so it is included as the first commit in this one. I thought this would allow the review to start earlier because I have some time this weekend to respond to reviews. If ``@petrochenkov`` prefers to wait until the first PR is merged, I totally understand, of course. This PR implements destructuring assignment for (tuple) structs and slices. In order to do this, the following *parser change* was necessary: struct expressions are not required to have a base expression, i.e. `Struct { a: 1, .. }` becomes legal (in order to act like a struct pattern). Unfortunately, this PR slightly regresses the diagnostics implemented in #77283. However, it is only a missing help message in `src/test/ui/issues/issue-77218.rs`. Other instances of this diagnostic are not affected. Since I don't exactly understand how this help message works and how to fix it yet, I was hoping it's OK to regress this temporarily and fix it in a follow-up PR. Thanks to ``@varkor`` who helped with the implementation, particularly around the struct rest changes. r? ``@petrochenkov``
2020-11-12check mir exists before validation; fix testsVishnunarayan K I-70/+14
2020-11-12move dropck tests from ui -> ui/dropckBastian Kauschke-34/+0
2020-11-11Implement destructuring assignment for structs and slicesFabian Zaiser-10/+38
Co-authored-by: varkor <github@varkor.com>
2020-11-10Rollup merge of #76765 - guswynn:async_return, r=tmandryJonas Schievink-0/+83
Make it more clear what an about async fn's returns when referring to what it returns see #76547 This is *likely* not the ONLY place that this happens to be unclear, but we can move this fn to rustc_middle or something like that and reuse it if need be, to apply it to more diagnostics One outstanding question I have is, if the fn returns (), should I make the message more clear (what about `fn f()` vs `fn f() -> ()`, can you tell those apart in the hir?) R? `@tmandry` `@rustbot` modify labels +A-diagnostics +T-compiler
2020-11-09Update src/test/ui/issues/issue-76547.rsTyler Mandry-1/+1
Co-authored-by: Camelid <camelidcamel@gmail.com>
2020-11-09add nll compare mode stderr fileGus Wynn-0/+20
2020-11-09Add `#[cfg(panic = "...")]`David Hewitt-2/+2
2020-11-01Add delay_span_bug to no longer ICEkadmin-0/+16
2020-11-01Auto merge of #78553 - Nadrieril:fix-78549, r=varkorbors-6/+6
Fix #78549 Before #78430, this worked because `specialize_constructor` didn't actually care too much which constructor was passed to it unless needed. That PR however handles `&str` as a special case, and I did not anticipate patterns for the `&str` type other than string literals. I am not very confident there are not other similar oversights left, but hopefully only `&str` was different enough to break my assumptions. Fixes https://github.com/rust-lang/rust/issues/78549
2020-11-01Fix #78549Nadrieril-6/+6
Before #78430, string literals worked because `specialize_constructor` didn't actually care too much which constructor was passed to it unless needed. Since then, string literals are special cased and a bit hacky. I did not anticipate patterns for the `&str` type other than string literals, hence this bug. This makes string literals less hacky.
2020-10-31Auto merge of #76257 - JulianKnodt:i75777, r=Dylan-DPCbors-0/+60
Add regression test This adds a regression test for #75777, effectively closing it since it is solved on nightly and beta. Closes #75777
2020-10-30Rollup merge of #78545 - jackh726:anonymous, r=oli-obkYuki Okushi-5/+5
Make anonymous binders start at 0 A few changes to some test outputs, but these actually look *more* correct to me.
2020-10-30Add regression testkadmin-0/+60
2020-10-30Auto merge of #78432 - sexxi-goose:fix-77993-take3, r=nikomatsakisbors-0/+45
Handle type errors in closure/generator upvar_tys Fixes #77993
2020-10-29Make anonymous binders start at 0Jack Huey-5/+5
2020-10-29Rollup merge of #78422 - estebank:fix-78372, r=pnkfelixJonas Schievink-0/+76
Do not ICE on invalid input Fix #78372.
2020-10-29Add regression test for issue #76042LeSeulArtichaut-0/+16
2020-10-29Auto merge of #78430 - Nadrieril:taking-constructors-seriously2, r=varkorbors-6/+6
Clarify main code paths in exhaustiveness checking This PR massively clarifies the main code paths of exhaustiveness checking, by using the `Constructor` enum to a fuller extent. I've been itching to write it for more than a year, but the complexity of matching consts had prevented me. Behold a massive simplification :D. This in particular removes a fair amount of duplication between various parts, localizes code into methods of relevant types when applicable, makes some implicit assumptions explicit, and overall improves legibility a lot (or so I hope). Additionally, after my changes undoing #76918 turned out to be a noticeable perf gain. As usual I tried my best to make the commits self-contained and easy to follow. I've also tried to keep the code well-commented, but I tend to forget how complex this file is; I'm happy to clarify things as needed. My measurements show good perf improvements on the two match-heavy benchmarks (-18.0% on `unicode_normalization-check`! :D); I'd like a perf run to check the overall impact. r? `@varkor` `@rustbot` modify labels: +A-exhaustiveness-checking
2020-10-28Rollup merge of #78401 - ↵Dylan DPC-11/+45
davidtwco:issue-75906-tuple-construct-private-field, r=estebank resolve: private fields in tuple struct ctor diag Fixes #75906. This PR improves the diagnostic emitted when a tuple struct is being constructed which has private fields so that private fields are labelled and the message is improved. r? @estebank
2020-10-28Rollup merge of #78379 - estebank:fn-signature-parse, r=varkorDylan DPC-11/+4
Tweak invalid `fn` header and body parsing * Rely on regular "expected"/"found" parser error for `fn`, fix #77115 * Recover empty `fn` bodies when encountering `}` * Recover trailing `>` in return types * Recover from non-type in array type `[<BAD TOKEN>; LEN]`
2020-10-27Add unsized_fn_params featureSantiago Pastorino-10/+10
2020-10-27Disable "optimization to avoid load of address" in InstCombineJonas Schievink-0/+17
2020-10-27Handle type errors in closure/generator upvar_tysAman Arora-0/+45
Co-authored-by: Roxane Fruytier <roxane.fruytier@hotmail.com>
2020-10-27Be honest about being able to list constructorsNadrieril-6/+6
The test change is because we used to treat `&str` like other `&T`s, ie as having a single constructor. That's not quite true though since we consider `&str` constants as atomic instead of refs to `str` constants.
2020-10-26Do not ICE on invalid inputEsteban Küber-0/+76
2020-10-27Rollup merge of #78388 - camelid:regression-tests, r=lcnrYuki Okushi-0/+34
Add some regression tests Closes #75763. Closes #76179.
2020-10-26Auto merge of #77187 - TimDiekmann:box-alloc, r=Amanieubors-9/+9
Support custom allocators in `Box` r? `@Amanieu` This pull request requires a crater run. ### Prior work: - #71873 - #58457 - [`alloc-wg`](https://github.com/TimDiekmann/alloc-wg)-crate Currently blocked on: - ~#77118~ - ~https://github.com/rust-lang/chalk/issues/615 (#77515)~
2020-10-26Add FIXME note to const generics testCamelid-0/+1
Co-authored-by: lcnr <bastian_kauschke@hotmail.de>
2020-10-26Add some regression testsCamelid-0/+33
2020-10-26resolve: private fields in tuple struct ctor diagDavid Wood-11/+45
This commit improves the diagnostic emitted when a tuple struct is being constructed which has private fields so that private fields are labelled and the message is improved. Signed-off-by: David Wood <david@davidtw.co>
2020-10-26Auto merge of #78387 - Dylan-DPC:rollup-ch0st6z, r=Dylan-DPCbors-0/+134
Rollup of 10 pull requests Successful merges: - #74477 (`#[deny(unsafe_op_in_unsafe_fn)]` in sys/wasm) - #77836 (transmute_copy: explain that alignment is handled correctly) - #78126 (Properly define va_arg and va_list for aarch64-apple-darwin) - #78137 (Initialize tracing subscriber in compiletest tool) - #78161 (Add issue template link to IRLO) - #78214 (Tweak match arm semicolon removal suggestion to account for futures) - #78247 (Fix #78192) - #78252 (Add codegen test for #45964) - #78268 (Do not try to report on closures to avoid ICE) - #78295 (Add some regression tests) Failed merges: r? `@ghost`
2020-10-26Rollup merge of #78295 - Alexendoo:ice-regression-tests, r=nagisaDylan DPC-0/+134
Add some regression tests Closes #56229 Closes #59494 Closes #70746 Closes #73229
2020-10-26Auto merge of #77283 - estebank:if-let-sugg, r=Mark-Simulacrumbors-0/+21
Tweak `if let` suggestion to be more liberal with suggestion and to not ICE Fix #77218. Fix #77238.
2020-10-25Tweak invalid `fn` header and body parsingEsteban Küber-8/+1
* Recover empty `fn` bodies when encountering `}` * Recover trailing `>` in return types * Recover from non-type in array type `[<BAD TOKEN>; LEN]`
2020-10-25Tweak `if let` suggestion to be more liberal with suggestion and to not ICEEsteban Küber-0/+21
Fix #77218. Fix #77238.
2020-10-25Rely on regular "expected"/"found" parser error for `fn`Esteban Küber-6/+6