rust/compiler/rustc_borrowck/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
..
constraints Use Predicate ConstraintCategory when normalizing 2022-09-13 20:18:49 -04:00
diagnostics Use Predicate ConstraintCategory when normalizing 2022-09-13 20:18:49 -04:00
region_infer Better errors for implied static bound 2022-09-13 20:18:04 -04:00
type_check Auto merge of #101212 - eholk:dyn-star, r=compiler-errors 2022-09-14 18:10:51 +00:00
borrow_set.rs cleanup mir visitor for rustc::pass_by_value 2022-07-01 16:21:21 +02:00
borrowck_errors.rs On partial uninit error point at where we need init 2022-07-07 12:25:55 -07:00
constraint_generation.rs Replace Body::basic_blocks() with field access 2022-08-26 14:27:08 +02:00
consumers.rs take opaq types 2022-07-20 12:43:10 +03:00
dataflow.rs Generalize the Assume intrinsic statement to a general Intrinsic statement 2022-09-06 14:18:32 +00:00
def_use.rs Add new MutatatingUseContexts for deinit and SetDiscriminant 2022-04-11 09:26:26 -04:00
facts.rs Rename debugging_opts to unstable_opts 2022-07-13 17:47:06 -05:00
invalidation.rs Generalize the Assume intrinsic statement to a general Intrinsic statement 2022-09-06 14:18:32 +00:00
lib.rs Check all operands, they may contain indirections in their place 2022-09-06 15:32:35 +00:00
location.rs Avoid Iterator::last 2022-09-11 17:23:00 +02:00
member_constraints.rs Use real opaque type instead of just saying impl Trait 2022-07-26 06:19:58 +00:00
nll.rs Use def_span for external requirements. 2022-09-13 19:18:24 +02:00
path_utils.rs Remove in_band_lifetimes from borrowck 2021-12-15 08:39:21 +01:00
place_ext.rs Remove crate visibility usage in compiler 2022-05-20 20:04:54 -04:00
places_conflict.rs Various changes to logging of borrowck-related code 2022-08-29 10:59:21 -04:00
prefixes.rs Revert "Rollup merge of #98582 - oli-obk:unconstrained_opaque_type, r=estebank" 2022-07-20 07:55:58 +00:00
renumber.rs fold_region: remove unused parameter 2022-06-27 15:55:03 +02:00
session_diagnostics.rs diag-mig 2022-08-26 10:32:59 +08:00
universal_regions.rs Remove ReEmpty 2022-09-08 20:55:55 -04:00
used_muts.rs cleanup mir visitor for rustc::pass_by_value 2022-07-01 16:21:21 +02:00