about summary refs log tree commit diff
path: root/src/test/ui/traits/trait-upcasting
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-1401/+0
2022-12-29Revert "Add tests"David Tolnay-24/+0
This reverts commit b656e2413022de1863b9ea8db87454477b816042.
2022-12-09Add testsGary Guo-0/+24
2022-11-23Use nicer spans for `deref_into_dyn_supertrait`Maybe Waffle-10/+7
2022-11-23Make `deref_into_dyn_supertrait` lint the impl and not the usageMaybe Waffle-6/+14
2022-11-19Probe + better error messsage for need_migrate_deref_output_trait_objectMichael Goulet-2/+2
2022-11-11Mark `trait_upcasting` feature no longer incomplete.Charles Lew-79/+80
2022-10-21fix some typosRageking8-1/+1
2022-10-01bless ui testsMaybe Waffle-2/+2
2022-08-26Rollup merge of #99064 - lyming2007:issue-97687-fix, r=estebankYuki Okushi-5/+5
distinguish the method and associated function diagnostic information Methods are defined within the context of a struct and their first parameter is always self Associated functions don’t take self as a parameter ``` modified: compiler/rustc_typeck/src/check/method/suggest.rs modified: src/test/ui/auto-ref-slice-plus-ref.stderr modified: src/test/ui/block-result/issue-3563.stderr modified: src/test/ui/issues/issue-28344.stderr modified: src/test/ui/suggestions/dont-suggest-pin-array-dot-set.stderr modified: src/test/ui/suggestions/suggest-methods.stderr modified: src/test/ui/traits/trait-upcasting/subtrait-method.stderr ```
2022-07-28Remove guess_head_span.Camille GILLOT-1/+1
2022-07-08distinguish the method and associated function diagnostic informationYiming Lei-5/+5
Methods are defined within the context of a struct and their first parameter is always self Associated functions don’t take self as a parameter modified: compiler/rustc_typeck/src/check/method/suggest.rs modified: src/test/ui/auto-ref-slice-plus-ref.stderr modified: src/test/ui/block-result/issue-3563.stderr modified: src/test/ui/issues/issue-28344.stderr modified: src/test/ui/suggestions/dont-suggest-pin-array-dot-set.stderr modified: src/test/ui/suggestions/suggest-methods.stderr modified: src/test/ui/traits/trait-upcasting/subtrait-method.stderr
2022-06-28Note concrete type being coerced into objectMichael Goulet-3/+3
2022-06-03Fully stabilize NLLJack Huey-190/+17
2022-05-22Use revisions for NLL in traitsJack Huey-26/+110
2021-12-10Tweak wordingEsteban Kuber-7/+7
2021-12-10Use a more accurate `Span` for `'static` obligation from return typeEsteban Kuber-8/+8
2021-12-10Point at return type when it introduces `'static` obligationEsteban Kuber-0/+32
2021-12-10Clean up visual output logicEsteban Kuber-9/+9
2021-12-10Point at capture points for non-`'static` reference crossing a `yield` pointEsteban Kuber-2/+64
``` error[E0759]: `self` has an anonymous lifetime `'_` but it needs to satisfy a `'static` lifetime requirement --> $DIR/issue-72312.rs:10:24 | LL | pub async fn start(&self) { | ^^^^^ this data with an anonymous lifetime `'_`... ... LL | require_static(async move { | -------------- ...is required to live as long as `'static` here... LL | &self; | ----- ...and is captured here | note: `'static` lifetime requirement introduced by this trait bound --> $DIR/issue-72312.rs:2:22 | LL | fn require_static<T: 'static>(val: T) -> T { | ^^^^^^^ error: aborting due to previous error For more information about this error, try `rustc --explain E0759`. ``` Fix #72312.
2021-10-13Remove textual span from diagnostic stringOli Scherer-4/+4
2021-10-03Add `deref_into_dyn_supertrait` lint.Charles Lew-0/+41
2021-09-26Remove box syntax from most places in src/test outside of the issues direst31-2/+2
2021-08-21Auto merge of #88135 - crlf0710:trait_upcasting_part_3, r=nikomatsakisbors-96/+51
Trait upcasting coercion (part 3) By using separate candidates for each possible choice, this fixes type-checking issues in previous commits. r? `@nikomatsakis`
2021-08-18Add a new test case to verify behavior.Charles Lew-0/+39
2021-08-18Auto merge of #87738 - lqd:polonius-master, r=nikomatsakisbors-0/+55
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-18Properly generate multiple candidates for trait upcasting coercion.Charles Lew-96/+12
2021-08-11Modify structured suggestion outputEsteban Küber-7/+7
* On suggestions that include deletions, use a diff inspired output format * When suggesting addition, use `+` as underline * Color highlight modified span
2021-08-03bless trait upcasting tests under poloniusRémy Rakic-0/+55
The diagnostics are different from the NLL ones but the same errors are emitted.
2021-08-03Various adjustments to historic tests and documents.Charles Lew-192/+327
2021-08-03Added tests.Alexander Regueiro-0/+764
2021-08-03Implement pointer casting.Charles Lew-0/+49
2021-07-31Add more tests to cover more corner cases of type-checking.Charles Lew-0/+342
2021-07-31Implement trait upcasting coercion type-checking.Charles Lew-0/+49