rust/compiler/rustc_codegen_ssa/src
bors 6153d3cbe6 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`
2022-09-14 18:10:51 +00:00
..
back Auto merge of #100101 - BelovDV:issue-99429, r=petrochenkov 2022-09-13 04:00:24 +00:00
coverageinfo Remove in_band_lifetimes from rustc_codegen_ssa 2021-12-15 00:41:41 -05:00
debuginfo Use enum2<_> instead of enum<_> for Cpp-like debuginfo enum type names. 2022-08-12 10:53:07 +02:00
mir Auto merge of #101212 - eholk:dyn-star, r=compiler-errors 2022-09-14 18:10:51 +00:00
traits Remove dead broken code from const zst handling in backends 2022-09-06 14:09:49 +00:00
base.rs Fix pointer value punning. 2022-09-10 23:50:20 +08:00
common.rs rustc_codegen_ssa: derive copy and clone for various enums 2022-05-25 10:34:35 +02:00
glue.rs use unchecked mul to compute slice sizes 2022-06-14 17:09:07 -04:00
lib.rs change rlib format to discern native dependencies 2022-09-12 16:45:03 +03:00
meth.rs Call destructors when dyn* object goes out of scope 2022-09-12 16:55:57 -07:00
mono_item.rs Add codegen for global_asm! sym operands 2022-04-15 14:36:30 +01:00
target_features.rs Auto merge of #99443 - jam1garner:mips-virt-feature, r=nagisa 2022-09-14 08:21:25 +00:00