about summary refs log tree commit diff
path: root/src/test/ui/where-clauses
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-570/+0
2022-11-11Do not rename bound variables when verbose-printing binders.Camille GILLOT-3/+3
2022-09-30bless testsb-naber-3/+3
2022-09-27Do not overwrite binders for another HirId.Camille GILLOT-0/+61
2022-08-21Rework point-at-argMichael Goulet-6/+4
2022-06-03Fully stabilize NLLJack Huey-16/+1
2022-04-17Bless tests.Camille GILLOT-6/+27
2022-04-05Rollup merge of #95591 - jackh726:nll-revisions-1, r=oli-obkDylan DPC-2/+6
Use revisions to track NLL test output (part 1) The idea here is 2 fold: 1) When we eventually do make NLL default on, that PR should be systematic in "delete revisions and corresponding error annotations" 2) This allows us to look at test NLL outputs in chunks. (Though, I've opted here not to "mark" these tests. There are some tests with NLL revisions *now* that will be missed. I expect we do a second pass once we have all the tests with NLL revisions; these tests should be easy enough to eyeball.) The actual review here should be "easy", but a bit tedious. I expect we should manually go through each test output and confirm it's okay. The majority of these are either: 1) Only span change (the one I see most common is highlighting an entire function call, rather than just the function name in that call) 2) "E0308 mismatched types" -> "lifetime does not live long enough" 3) "E0495 cannot infer an appropriate lifetime for lifetime parameter" -> "lifetime does not live long enough" 4) "E0312 lifetime of reference outlives lifetime of borrowed content" -> "lifetime does not live long enough" 5) "E0759 `XXX` has an anonymous lifetime `'_` but it needs to satisfy a `'static` lifetime requirement" -> "lifetime does not live long enough" 6) "E0623 lifetime mismatch" -> "lifetime does not live long enough" Other than the now lack of an error code, most of these look fine (with most giving more helpful suggestions now). `rfc1623` output isn't great. cc ``@marmeladema`` if you want to look through these Let's r? ``@oli-obk`` since you've commented on the Zulip thread ;)
2022-04-05More nll revisionsJack Huey-2/+6
2022-04-05Suggest derivable trait on E0277ohno418-0/+8
2022-02-24Remove in-band lifetimesMichael Goulet-4/+0
2021-11-20Point at source of trait bound obligations in more placesEsteban Kuber-0/+12
Be more thorough in using `ItemObligation` and `BindingObligation` when evaluating obligations so that we can point at trait bounds that introduced unfulfilled obligations. We no longer incorrectly point at unrelated trait bounds (`substs-ppaux.verbose.stderr`). In particular, we now point at trait bounds on method calls. We no longer point at "obvious" obligation sources (we no longer have a note pointing at `Trait` saying "required by a bound in `Trait`", like in `associated-types-no-suitable-supertrait*`). Address part of #89418.
2021-09-16Point at call span that introduced obligation for the argEsteban Kuber-3/+9
2021-08-18Auto merge of #86700 - lqd:matthews-nll-hrtb-errors, r=nikomatsakisbors-2/+5
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-16Use note to point at bound introducing requirementEsteban Küber-9/+16
2021-08-15Report nicer errors for HRTB NLL errors from queriesMatthew Jasper-2/+5
2021-08-11Modify structured suggestion outputEsteban Küber-2/+2
* On suggestions that include deletions, use a diff inspired output format * When suggesting addition, use `+` as underline * Color highlight modified span
2021-06-07Bless ui/where-clauses/where-for-self.rs testFabian Wolff-0/+1
2021-03-31give full path of constraint in suggest_constraining_type_paramhi-rustin-4/+4
revert file bless with nll mode
2021-02-10Keep existing names of regions in placeholder_errorMatthew Jasper-2/+2
2021-02-09Remove unnecessary note on errorsMatthew Jasper-7/+2
Seeing the trait definition doesn't help with implementation not general enough errors, so don't make the error message larger to show it.
2020-09-02pretty: trim paths of unique symbolsDan Aloni-16/+16
If a symbol name can only be imported from one place for a type, and as long as it was not glob-imported anywhere in the current crate, we can trim its printed path and print only the name. This has wide implications on error messages with types, for example, shortening `std::vec::Vec` to just `Vec`, as long as there is no other `Vec` importable anywhere. This adds a new '-Z trim-diagnostic-paths=false' option to control this feature. On the good path, with no diagnosis printed, we should try to avoid issuing this query, so we need to prevent trimmed_def_paths query on several cases. This change also relies on a previous commit that differentiates between `Debug` and `Display` on various rustc types, where the latter is trimmed and presented to the user and the former is not.
2020-07-10Tweak wordingYuki Okushi-2/+2
2020-07-10Add a help to use `in_band_lifetimes` in nightlyYuki Okushi-0/+4
2020-06-22fix subtle bug in NLL type checkerNiko Matsakis-0/+8
The bug was revealed by the behavior of the old-lub-glb-hr-noteq1.rs test. The old-lub-glb-hr-noteq2 test shows the current 'order dependent' behavior of coercions around higher-ranked functions, at least when running with `-Zborrowck=mir`. Also, run compare-mode=nll.
2020-06-22remove snapshot calls from "match" operations during selectNiko Matsakis-14/+15
Motivation: - we want to use leak-check sparingly, first off - these calls were essentially the same as doing the check during subtyping
2020-06-22Revert "modify leak-check to track only outgoing edges from placeholders"Niko Matsakis-10/+11
This reverts commit 2e01db4b396a1e161f7a73933fff34bc9421dba0.
2020-06-22modify leak-check to track only outgoing edges from placeholdersNiko Matsakis-11/+10
Also, update the affected tests. This seems strictly better but it is actually more permissive than I initially intended. In particular it accepts this ``` forall<'a, 'b> { exists<'intersection> { 'a: 'intersection, 'b: 'intersection, } } ``` and I'm not sure I want to accept that. It implies that we have a `'empty` in the new universe intoduced by the `forall`.
2020-06-20Correctly handle binders inside trait predicatesMatthew Jasper-8/+1
2020-04-18Add label to item source of bound obligationEsteban Küber-1/+1
2020-04-08Small tweaks to required bound spanEsteban Küber-3/+3
2020-03-29Tweak `suggest_constraining_type_param`Esteban Küber-8/+6
Some of the bound restriction structured suggestions were incorrect while others had subpar output.
2020-02-11Auto merge of #68929 - matprec:consistent-issue-references, r=Dylan-DPCbors-2/+2
Make issue references consistent Fixes https://github.com/rust-lang/rust/issues/62976 cc https://github.com/rust-lang/rust/pull/63008 r? @varkor because you reviewed the original pr
2020-02-09--bless --compare-mode=nllMatthias Prechtl-2/+2
2020-02-09Improve reporting errors and suggestions for trait boundsPatryk Wychowaniec-6/+12
2020-01-19When encountering an undefined named lifetime, point to where it can beEsteban Küber-0/+6
This doesn't mention that using an existing lifetime is possible, but that would hopefully be clear as always being an option. The intention of this is to teach newcomers what the lifetime syntax is.
2019-12-24Handle more specific case E0222Esteban Küber-2/+2
2019-12-23Add the full issue reference to equality constraints in `where` clausesvarkor-4/+8
2019-10-15Handle more cases involving `impl` and `trait`Esteban Küber-4/+6
2019-09-22On obligation errors point at the unfulfilled binding when possibleEsteban Küber-9/+9
2019-09-19When possible point at argument causing item obligation failureEsteban Küber-6/+6
2019-08-31Use span label instead of note for cause in E0631Esteban Küber-25/+16
2019-07-27tests: Move run-pass tests with naming conflicts to uiVadim Petrochenkov-0/+23
2019-07-27tests: Move run-pass tests without naming conflicts to uiVadim Petrochenkov-0/+159
2019-05-29Update ui test suite to use dynmemoryruins-12/+12
2019-04-18hide `--explain` hint if error has no extended infoAndy Russell-3/+1
2019-03-11Update testsVadim Petrochenkov-1/+1
2019-02-21update test files to reflect new outputNiko Matsakis-7/+14
One surprise: old-lub-glb-object.rs, may indicate a bug
2019-01-28Refer to synthetically named lifetimes as "some specific lifetime" rather ↵Rémy Rakic-1/+1
than "the specific lifetime"
2019-01-27Update test expectations for new placeholder error messagesRemy Rakic-2/+2