diff options
| author | bors <bors@rust-lang.org> | 2024-04-16 11:22:35 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-04-16 11:22:35 +0000 |
| commit | dd0da10511c1d8068ec1f9a2a3bdb65405c06b32 (patch) | |
| tree | 71d6a7c9a610b5306cb1f50785fa5ad4655e2ad1 /compiler/rustc_codegen_llvm/src/errors.rs | |
| parent | ac174ae8d2c5e663fcada4862baf9f77c0c47c46 (diff) | |
| parent | 735f2c6f92dc4dfd23b41550342f91d61b62b5da (diff) | |
| download | rust-dd0da10511c1d8068ec1f9a2a3bdb65405c06b32.tar.gz rust-dd0da10511c1d8068ec1f9a2a3bdb65405c06b32.zip | |
Auto merge of #123468 - compiler-errors:precise-capturing, r=oli-obk
Implement syntax for `impl Trait` to specify its captures explicitly (`feature(precise_capturing)`) Implements `impl use<'a, 'b, T, U> Sized` syntax that allows users to explicitly list the captured parameters for an opaque, rather than inferring it from the opaque's bounds (or capturing *all* lifetimes under 2024-edition capture rules). This allows us to exclude some implicit captures, so this syntax may be used as a migration strategy for changes due to #117587. We represent this list of captured params as `PreciseCapturingArg` in AST and HIR, resolving them between `rustc_resolve` and `resolve_bound_vars`. Later on, we validate that the opaques only capture the parameters in this list. We artificially limit the feature to *require* mentioning all type and const parameters, since we don't currently have support for non-lifetime bivariant generics. This can be relaxed in the future. We also may need to limit this to require naming *all* lifetime parameters for RPITIT, since GATs have no variance. I have to investigate this. This can also be relaxed in the future. r? `@oli-obk` Tracking issue: - https://github.com/rust-lang/rust/issues/123432
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/errors.rs')
0 files changed, 0 insertions, 0 deletions
