diff options
| author | bors <bors@rust-lang.org> | 2022-09-09 03:40:17 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-09-09 03:40:17 +0000 |
| commit | ab32548539ec38a939c1b58599249f3b54130026 (patch) | |
| tree | b7b73cde17986e1f6a2c97093cbadb9b84d3372b /compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp | |
| parent | 7200da0217f99e929e58d0b40483097db37270ac (diff) | |
| parent | 6876c94d800433ad7f2ea72da64d963eb2269589 (diff) | |
| download | rust-ab32548539ec38a939c1b58599249f3b54130026.tar.gz rust-ab32548539ec38a939c1b58599249f3b54130026.zip | |
Auto merge of #101224 - compiler-errors:rpitit, r=oli-obk
Initial implementation of return-position `impl Trait` in traits
* Create a new item kind, called `ImplTraitPlaceholder`, which is used to lower `ast::TyKind::ImplTrait` in trait method returns.
* This item is the child of the trait method, which simplifies the way we calculate bounds and stuff.
* Use the def-id of this type to construct a projection type that we use during astconv for the return type of the trait method signature.
* Implement logic to normalize this `ImplTraitPlaceholder` projection type when we know its concrete impl (this is pretty limited currently, but really there are no other selection candidates that make sense -- for now!)
* Check that the `impl Trait`'s bounds are satisfied on the concrete type provided in the impl.
This is obviously nowhere near complete, but I wanted to at least get some initial support landed so we can start playing around with it.
What works:
* async fn in trait and RPITIT, including multiple `impl Trait`s and `impl Trait` nested in associated type bindings, like `impl Future<Output = impl Sized>`
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
