summary refs log tree commit diff
path: root/src/test/ui/impl-trait/in-trait
AgeCommit message (Collapse)AuthorLines
2022-12-04Use parent function WfCheckingContext to check RPITIT.Camille GILLOT-0/+24
2022-11-22Delay bug to deduplicate diagnosticsMichael Goulet-11/+1
2022-11-22Check generics parity between impl and trait before collecting RPITITsMichael Goulet-0/+39
2022-11-19Improve spans for RPITIT object-safety errorsMichael Goulet-6/+6
2022-11-09Emit error in `collecting_trait_impl_trait_tys` on mismatched signaturesNilstrieb-0/+135
Previously, a `delay_span_bug` was isssued, failing normalization. This create a `TyKind::Error` in the signature, which caused `compare_predicate_entailment` to swallow its signature mismatch error, causing ICEs because no error was emitted.
2022-11-01Fix ICE in default impl error reportingMichael Goulet-0/+49
2022-11-01Remap RPITIT substs properlyMichael Goulet-0/+24
2022-11-01Check for substs compatibility for RPITITsMichael Goulet-0/+29
2022-10-27Remap early bound lifetimes tooMichael Goulet-0/+23
2022-10-24Delay span bug when we can't map lifetimes back in collect_trait_impl_trait_tysMichael Goulet-0/+37
2022-10-21Handle RPITITs properly in register_hidden_typeMichael Goulet-13/+50
2022-10-15Fix subst issues with RPITITMichael Goulet-0/+18
2022-10-12Add broken test for AFIT with RPITITMichael Goulet-0/+33
2022-10-05Fix test for default body with implMichael Goulet-4/+10
2022-10-05Support default-body trait functions with RPITITMichael Goulet-0/+15
2022-10-02Avoid ICE in printing RPITIT typeMichael Goulet-0/+38
2022-09-30Auto merge of #102164 - compiler-errors:rpitit-foreign, r=TaKO8Kibors-0/+20
Serialize return-position `impl Trait` in trait hidden values in foreign libraries Fixes #101630
2022-09-23Serialize RPITIT values in libsMichael Goulet-0/+20
2022-09-22Calculate ProjectionTy::trait_def_id correctlyMichael Goulet-0/+59
2022-09-13Auto merge of #101615 - compiler-errors:rpitit-perf, r=oli-obkbors-10/+5
Make `compare_predicate_entailment` no longer a query Make `compare_predicate_entailment` so it's no longer a query (again), and splits out the new logic (that equates the return types to infer RPITITs) into its own query. This means that this new query (now called `collect_trait_impl_trait_tys`) is no longer executed for non-RPITIT cases. This should improve perf (https://github.com/rust-lang/rust/pull/101224#issuecomment-1241682203), though in practice we see that these some crates remain from the primary regressions list on the original report... They are all <= 0.43% regression and seemingly only on the incr-full scenario for all of them. I am at a loss for what might be causing this regression other than what I fixed here, since we don't introduce much new non-RPITIT logic except for some `def_kind` query calls in some places, for example, like projection. Maybe that's it? ---- Originally this PR was opened to test enabling `cache_on_disk` (62164aaaa11) but that didn't turn out to be very useful (https://github.com/rust-lang/rust/pull/101615#issuecomment-1242403205), so that led me to just split the query (and rename the PR).
2022-09-12Rollup merge of #101681 - compiler-errors:rpitit-obj-safety, r=lcnrDylan DPC-0/+72
Deny return-position `impl Trait` in traits for object safety Fixes #101667
2022-09-12Rollup merge of #101676 - compiler-errors:rpitit-wf, r=lcnrDylan DPC-0/+49
Check that the types in return position `impl Trait` in traits are well-formed This effectively duplicates `check_associated_type_bounds`, but that shouldn't be for long, since we're going to remove it once we refactor RPITITs into regular associated items. Fixes #101663 --- We don't check ```rust trait Foo { fn bar() -> impl ?Sized; } ``` currently, but that's for a different reason, which is that we don't currently check that a trait function's return type is sized (i.e. `fn bar() -> [u8]` also works in a trait).
2022-09-11Only encode RPITIT when trait method has default bodyMichael Goulet-0/+9
2022-09-11Deny RPITIT for object safetyMichael Goulet-0/+72
2022-09-11Check that the types in RPITITs are WFMichael Goulet-0/+49
2022-09-10split compare_predicate_entailment and collect_trait_impl_trait_tys outMichael Goulet-10/+5
2022-09-09Tweak feature error, add testMichael Goulet-0/+18
2022-09-09Handle generic parameters.Camille GILLOT-4/+32
2022-09-09Deeply check that method signatures match, and allow for nested RPITITsMichael Goulet-0/+83
2022-09-09Add testsMichael Goulet-0/+126