summary refs log tree commit diff
path: root/src/test/ui/issues
AgeCommit message (Collapse)AuthorLines
2021-09-03Auto merge of #88597 - cjgillot:lower-global, r=petrochenkovbors-6/+6
Move global analyses from lowering to resolution Split off https://github.com/rust-lang/rust/pull/87234 r? `@petrochenkov`
2021-09-01Stop sorting bodies by span.Camille GILLOT-6/+6
The definition order is already close to the span order, and only differs in corner cases.
2021-09-01add regression test for issue 83190Rémy Rakic-0/+49
2021-09-01Auto merge of #88121 - camelid:better-recursive-alias-error, r=estebankbors-4/+4
Improve errors for recursive type aliases Fixes #17539.
2021-08-30`feature(const_generics)` -> `feature(const_param_types)`lcnr-15/+5
2021-08-30rename const_evaluatable_checked to generic_const_exprsEllen-1/+1
:sparkles:
2021-08-26Rollup merge of #88270 - lqd:hrtb-type-ascription, r=nikomatsakisManish Goregaokar-8/+0
Handle type ascription type ops in NLL HRTB diagnostics Currently, there are still a few cases of the "higher-ranked subtype error" of yore, 4 of which are related to type ascription. This PR is a follow-up to #86700, adding support for type ascription type ops, and makes 3 of these tests output the same diagnostics in NLL mode as the migrate mode (and 1 is now much closer, especially if you ignore that it already outputs an additional error in NLL mode -- which could be a duplicate caused by a lack of normalization like [these comments point out](https://github.com/rust-lang/rust/blob/9583fd1bdd0127328e25e5b8c24dff575ec2c86b/compiler/rustc_traits/src/type_op.rs#L122-L157), or an imprecision in some parts of normalization as [described here](https://github.com/rust-lang/rust/pull/86700#discussion_r689086688)). Since we discussed these recently: - [here](https://github.com/rust-lang/rust/pull/86700#discussion_r689158868), cc ````@matthewjasper,```` - and [here](https://github.com/rust-lang/rust/issues/57374#issuecomment-901500856), cc ````@Aaron1011.```` It should only leave [this TAIT test](https://github.com/rust-lang/rust/blob/9583fd1bdd0127328e25e5b8c24dff575ec2c86b/src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.rs) as still emitting [the terse error](https://github.com/rust-lang/rust/blob/9583fd1bdd0127328e25e5b8c24dff575ec2c86b/src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.nll.stderr). r? ````@estebank```` (so that they shake their fist at NLL's general direction less often) or ````@nikomatsakis```` or matthew or aaron, the more the merrier.
2021-08-26Rollup merge of #88123 - camelid:tup-pat-precise-spans, r=estebankManish Goregaokar-3/+3
Make spans for tuple patterns in E0023 more precise As suggested in #86307. Closes #86307. r? ````@estebank````
2021-08-26Rollup merge of #87832 - wesleywiser:fix_match_step, r=davidtwcoManish Goregaokar-5/+4
Fix debugger stepping behavior with `match` expressions Previously, we would set up the source lines for `match` expressions so that the code generated to perform the test of the scrutinee was matched to the line of the arm that required the test and then jump from the arm block to the "next" block was matched to all of the lines in the `match` expression. While that makes sense, it has the side effect of causing strange stepping behavior in debuggers. I've changed the source information so that all of the generated tests are sourced to `match {scrutinee}` and the jumps are sourced to the last line of the block they are inside. This resolves the weird stepping behavior in all debuggers and resolves some instances of "ambiguous symbol" errors in WinDbg preventing the user from setting breakpoints at `match` expressions. Before: https://user-images.githubusercontent.com/831192/128577421-ee0c9c03-da28-4d16-997a-d57988a7bb7f.mp4 After: https://user-images.githubusercontent.com/831192/128577433-2ceab04d-953e-4e31-9387-93f049c71ff3.mp4 Fixes #87817
2021-08-25Adjust spansNoah Lev-1/+1
* Highlight the whole pattern if it has no fields * Highlight the whole definition if it has no fields * Only highlight the pattern name if the pattern is multi-line * Determine whether a pattern is multi-line based on distance from name to last field, rather than first field
2021-08-25Fix debugger stepping behavior around `match` expressionsWesley Wiser-5/+4
Previously, we would set up the source lines for `match` expressions so that the code generated to perform the test of the scrutinee was matched to the line of the arm that required the test and then jump from the arm block to the "next" block was matched to all of the lines in the `match` expression. While that makes sense, it has the side effect of causing strange stepping behavior in debuggers. I've changed the source information so that all of the generated tests are sourced to `match {scrutinee}` and the jumps are sourced to the last line of the block they are inside. This resolves the weird stepping behavior in all debuggers and resolves some instances of "ambiguous symbol" errors in WinDbg preventing the user from setting breakpoints at `match` expressions.
2021-08-24Normalize associated types with bound varsJack Huey-43/+41
2021-08-24Update NLL HRTB type ascription blessed expectationsRémy Rakic-8/+0
Some of these tests have reached parity with the migrate-mode output.
2021-08-23Clarify what attribute and derive macros look like.Mara Bos-1/+1
2021-08-23Update tests.Mara Bos-0/+2
2021-08-21Improve errors for recursive type aliasesNoah Lev-4/+4
2021-08-21Make E0023 spans even more preciseNoah Lev-5/+3
2021-08-19Auto merge of #88143 - GuillaumeGomez:rollup-sgh318f, r=GuillaumeGomezbors-8/+8
Rollup of 10 pull requests Successful merges: - #87818 (Fix anchors display in rustdoc) - #87983 (Use more accurate spans when proposing adding lifetime to item) - #88012 (Change WASI's `RawFd` from `u32` to `c_int` (`i32`).) - #88031 (Make `BuildHasher` object safe) - #88036 (Fix dead code warning when inline const is used in pattern) - #88082 (Take into account jobs number for rustdoc GUI tests) - #88109 (Fix environment variable getter docs) - #88111 (Add background-color on clickable definitions in source code) - #88129 (Fix dataflow graphviz bug, make dataflow graphviz modules public) - #88136 (Move private_unused.rs test to impl-trait) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-08-18Auto merge of #86700 - lqd:matthews-nll-hrtb-errors, r=nikomatsakisbors-16/+41
Matthew's work on improving NLL's "higher-ranked subtype error"s This PR rebases `@matthewjasper's` [branch](https://github.com/matthewjasper/rust/tree/nll-hrtb-errors) which has great work to fix the obscure higher-ranked subtype errors that are tracked in #57374. These are a blocker to turning full NLLs on, and doing some internal cleanups to remove some of the old region code. The goal is so `@nikomatsakis` can take a look at this early, and I'll then do my best to help do the changes and followup work to land this work, and move closer to turning off the migration mode. I've only updated the branch and made it compile, removed a warning or two. r? `@nikomatsakis` (Here's the [zulip topic to discuss this](https://rust-lang.zulipchat.com/#narrow/stream/122657-t-compiler.2Fwg-nll/topic/.2357374.3A.20improving.20higher-ranked.20subtype.20errors.20via.20.2386700) that Niko wanted)
2021-08-18Use more accurate spans when proposing adding lifetime to itemEsteban Kuber-8/+8
2021-08-18Auto merge of #87738 - lqd:polonius-master, r=nikomatsakisbors-0/+73
Update `polonius-engine` to 0.13.0 This PR updates the use of `polonius-engine` to the recently released 0.13.0: - this version renamed a lot of relations to match the current terminology - "illegal subset relationships errors" (AKA "subset errors" or "universal region errors" in rustc parlance) have been implemented in all variants, and therefore the `Hybrid` variant can be the rustc default once again - some of the blessed expectations were updated: new tests have been added since the last time I updated the tests, diagnostics have changed, etc. In particular: - a few tests had trivial expectations changes such as basic diagnostics changes for the migrate-mode and full NLLs - others were recursion and lengths limits which emits a file, and under the polonius compare-mode, the folder has a different name - a few tests were ignored in the NLL compare-mode for reasons that obviously also apply to Polonius - some diagnostics were unified so that older expectations no longer made sense: the NLL and Polonius outputs were identical. - in a few cases Polonius gets a chance to emit more errors than NLLs A few tests in the compare-mode still are super slow and trigger the 60s warning, or OOM rustc during fact generation, and I've detailed these [on Zulip](https://rust-lang.zulipchat.com/#narrow/stream/186049-t-compiler.2Fwg-polonius/topic/Challenges.20for.20move.2Finit.2C.20liveness.2C.20and.20.60Location.3A.3AAll.60): - `src/test/ui/numbers-arithmetic/saturating-float-casts.rs` -> OOM during rustc fact generation - `src/test/ui/numbers-arithmetic/num-wrapping.rs` - `src/test/ui/issues/issue-72933-match-stack-overflow.rs` - `src/test/ui/issues/issue-74564-if-expr-stack-overflow.rs` - `src/test/ui/repr/repr-no-niche.rs` In addition, 2 tests don't currently pass and I didn't want to bless them now: they deal with HRTBs and miss errors that NLLs emit. We're currently trying to see if we need chalk to deal with HRTB errors (as we thought we would have to) but during the recent sprint, we discovered that we may be able to detect some of these errors in a way that resembles subset errors: - `ui/hrtb/hrtb-just-for-static.rs` -> 3 errors in NLL, 2 in polonius: a missing error about HRTB + needing to outlive 'static - `ui/issues/issue-26217.rs` -> missing HRTB that makes the test compile instead of emitting an error We'll keep talking about this at the next sprint as well. cc `@rust-lang/wg-polonius` r? `@nikomatsakis`
2021-08-17Make spans for tuple patterns in E0023 more preciseNoah Lev-2/+4
As suggested in #86307.
2021-08-16Use note to point at bound introducing requirementEsteban Küber-105/+173
2021-08-16Auto merge of #80357 - c410-f3r:new-hir-let, r=matthewjasperbors-2/+0
Introduce `hir::ExprKind::Let` - Take 2 Builds on #68577 and depends on #79328. cc #53667
2021-08-15Introduce hir::ExprKind::Let - Take 2Caio-2/+0
2021-08-15Fix ui tests for llvm_asm! deprecationAmanieu d'Antras-4/+9
2021-08-15Report nicer errors for HRTB NLL errors from queriesMatthew Jasper-16/+41
2021-08-14Auto merge of #87600 - JohnTitor:classify-ui-tests, r=petrochenkovbors-106/+0
Move some UI tests to more suitable subdirs The classifui result: https://gist.github.com/JohnTitor/c9e00840990b5e4a8fc562ec3571e427/e06c42226c6038da91e403c33b9947843420cf44 Some notes: - backtrace-debuginfo.rs: previously I skipped this, I'm still not sure what the best dir is. Any ideas? - estr-subtyping.rs: Seems a quite old test so removed, shouldn't? - deref-suggestion.rs: moved to inference as `suggestions` is not an ideal dir. - issue-43023.rs: a bit misclassified, moved to `derives` cc #73494 r? `@petrochenkov`
2021-08-12Rollup merge of #87885 - m-ou-se:edition-guide-links, r=rylevGuillaume Gomez-1/+1
Link to edition guide instead of issues for 2021 lints. This changes the 2021 lints to not link to github issues, but to the edition guide instead. Fixes #86996
2021-08-12Use a more accurate span on assoc types WF checksEsteban Kuber-6/+6
2021-08-11Modify structured suggestion outputEsteban Küber-155/+158
* On suggestions that include deletions, use a diff inspired output format * When suggesting addition, use `+` as underline * Color highlight modified span
2021-08-10Move some UI tests to more suitable subdirsYuki Okushi-106/+0
2021-08-09Use smaller spans when suggesting method call disambiguationEsteban Kuber-4/+5
2021-08-09Link to edition guide instead of issues for 2021 lints.Mara Bos-1/+1
2021-08-07Rollup merge of #87775 - Kobzol:single-associated-item-hint, r=oli-obkYuki Okushi-1/+7
Add hint for unresolved associated trait items if the trait has a single item This PR introduces a special-cased hint for unresolved trait items paths. It is shown if: - the path was not resolved to any existing trait item - and no existing trait item's name was reasonably close with regard to edit distance - and the trait only has a single item in the corresponding namespace I didn't know where I should put tests, therefore so far I just managed to bless two existing tests. I would be glad for hints where should tests for a hint like this be created, how should they be named (with reference to the original issue?) and what tests should I create (is it enough to test it just for types? or create separate tests also for functions and constants?). It could also be turned into a machine applicable suggestion I suppose. This is my first `rustc` PR, so please go easy on me :) Fixes: https://github.com/rust-lang/rust/issues/87638
2021-08-06Add hint for unresolved associated trait items if the trait has a single itemJakub Beránek-1/+7
2021-08-04Remove trailing whitespace from error messagesFabian Wolff-15/+15
2021-08-03bless a few trivial tests under poloniusRémy Rakic-0/+73
These are all about reaching some type and recursion limits and saving the full type in a file, whose folder changes in this compare-mode.
2021-07-31Point at unmet explicit lifetime obligation boundEsteban Küber-1/+5
2021-07-31Auto merge of #86264 - crlf0710:trait_upcasting_part1, r=nikomatsakisbors-7/+7
Trait upcasting coercion (part1) This revives the first part of earlier PR #60900 . It's not very clear to me which parts of that pr was design decisions, so i decide to cut it into pieces and land them incrementally. This allows more eyes on the details. This is the first part, it adds feature gates, adds feature gates tests, and implemented the unsize conversion part. (I hope i have dealt with the `ExistentialTraitRef` values correctly...) The next part will be implementing the pointer casting.
2021-07-30Auto merge of #86754 - estebank:use-multispans-more, r=varkorbors-63/+108
Use `multipart_suggestions` more Built on top of #86532
2021-07-31Implement trait upcasting coercion type-checking.Charles Lew-3/+3
2021-07-31Add feature gate tests.Charles Lew-6/+6
2021-07-30Use multispan suggestions more oftenEsteban Küber-63/+108
* Use more accurate span for `async move` suggestion * Use more accurate span for deref suggestion * Use `multipart_suggestion` more often
2021-07-29Update testsJonas Schievink-4/+10
2021-07-28Rollup merge of #87501 - spastorino:remove-min-tait, r=oli-obkYuki Okushi-34/+2
Remove min_type_alias_impl_trait in favor of type_alias_impl_trait r? ``@oli-obk``
2021-07-27Remove min_tait and full_tait stderr dangling filesSantiago Pastorino-31/+0
2021-07-27Make all tests use type_alias_impl_trait feature instead of minSantiago Pastorino-5/+17
2021-07-27Use type_alias_impl_trait instead of min in compiler and libSantiago Pastorino-14/+1
2021-07-27Rollup merge of #86764 - estebank:issue-86756, r=pnkfelixYuki Okushi-0/+58
Avoid ICE on type error recovery Fix #86756