about summary refs log tree commit diff
path: root/tests/mir-opt/lower_array_len.array_bound.NormalizeArrayLen.panic-abort.diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-09-14 18:10:51 +0000
committerbors <bors@rust-lang.org>2022-09-14 18:10:51 +0000
commitf6a07d1d368ebf04e6b47280c0d45e70cdcc389f (patch)
tree93b452f880db69ba695e21d4c7a7295701b6f6b1 /tests/mir-opt/lower_array_len.array_bound.NormalizeArrayLen.panic-abort.diff
parentcf043f6a168485ef8bae85af2616acd90d7485f4 (diff)
parent27e91b65d565a21b11a0f31fdd2c61a582ea966e (diff)
downloadrust-f6a07d1d368ebf04e6b47280c0d45e70cdcc389f.tar.gz
rust-f6a07d1d368ebf04e6b47280c0d45e70cdcc389f.zip
Auto merge of #101212 - eholk:dyn-star, r=compiler-errors
Initial implementation of dyn*

This PR adds extremely basic and incomplete support for [dyn*](https://smallcultfollowing.com/babysteps//blog/2022/03/29/dyn-can-we-make-dyn-sized/). The goal is to get something in tree behind a flag to make collaboration easier, and also to make sure the implementation so far is not unreasonable. This PR does quite a few things:

* Introduce `dyn_star` feature flag
* Adds parsing for `dyn* Trait` types
* Defines `dyn* Trait` as a sized type
* Adds support for explicit casts, like `42usize as dyn* Debug`
  * Including const evaluation of such casts
* Adds codegen for drop glue so things are cleaned up properly when a `dyn* Trait` object goes out of scope
* Adds codegen for method calls, at least for methods that take `&self`

Quite a bit is still missing, but this gives us a starting point. Note that this is never intended to become stable surface syntax for Rust, but rather `dyn*` is planned to be used as an implementation detail for async functions in dyn traits.

Joint work with `@nikomatsakis` and `@compiler-errors.`

r? `@bjorn3`
Diffstat (limited to 'tests/mir-opt/lower_array_len.array_bound.NormalizeArrayLen.panic-abort.diff')
0 files changed, 0 insertions, 0 deletions