summary refs log tree commit diff
path: root/src/test/ui/impl-trait/in-trait
AgeCommit message (Collapse)AuthorLines
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