diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2022-09-15 14:53:37 +0200 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2022-09-15 14:53:37 +0200 |
| commit | 75d24552aad0f13c77cdb421c1c93cf53cd4b7bd (patch) | |
| tree | ed00a34379689453ce636271e888a471bfcc0bd2 | |
| parent | 107f9d88137955cbddb341d1feb1582d3f965c25 (diff) | |
| parent | e4d2f94a834f0679d18ae03ef47bddb59a2ac042 (diff) | |
| download | rust-75d24552aad0f13c77cdb421c1c93cf53cd4b7bd.tar.gz rust-75d24552aad0f13c77cdb421c1c93cf53cd4b7bd.zip | |
Sync from rust 00fcc82df204ab81cd887da7d04c023a201afd5b
| -rw-r--r-- | src/base.rs | 4 | ||||
| -rw-r--r-- | src/debuginfo/line_info.rs | 6 | ||||
| -rw-r--r-- | src/value_and_place.rs | 3 |
3 files changed, 9 insertions, 4 deletions
diff --git a/src/base.rs b/src/base.rs index 2aa11ac2eea..399474d79e3 100644 --- a/src/base.rs +++ b/src/base.rs @@ -701,6 +701,10 @@ fn codegen_stmt<'tcx>( let operand = codegen_operand(fx, operand); operand.unsize_value(fx, lval); } + Rvalue::Cast(CastKind::DynStar, _, _) => { + // FIXME(dyn-star) + unimplemented!() + } Rvalue::Discriminant(place) => { let place = codegen_place(fx, place); let value = place.to_cvalue(fx); diff --git a/src/debuginfo/line_info.rs b/src/debuginfo/line_info.rs index 3ad0c420eaf..463de6a91c7 100644 --- a/src/debuginfo/line_info.rs +++ b/src/debuginfo/line_info.rs @@ -68,9 +68,9 @@ impl DebugContext { ) -> (Lrc<SourceFile>, u64, u64) { // Based on https://github.com/rust-lang/rust/blob/e369d87b015a84653343032833d65d0545fd3f26/src/librustc_codegen_ssa/mir/mod.rs#L116-L131 // In order to have a good line stepping behavior in debugger, we overwrite debug - // locations of macro expansions with that of the outermost expansion site - // (unless the crate is being compiled with `-Z debug-macros`). - let span = if !span.from_expansion() || tcx.sess.opts.unstable_opts.debug_macros { + // locations of macro expansions with that of the outermost expansion site (when the macro is + // annotated with `#[collapse_debuginfo]` or when `-Zdebug-macros` is provided). + let span = if tcx.should_collapse_debuginfo(span) { span } else { // Walk up the macro expansion chain until we reach a non-expanded span. diff --git a/src/value_and_place.rs b/src/value_and_place.rs index 2ee98546c99..cfaadca9491 100644 --- a/src/value_and_place.rs +++ b/src/value_and_place.rs @@ -815,7 +815,8 @@ pub(crate) fn assert_assignable<'tcx>( ); // fn(&T) -> for<'l> fn(&'l T) is allowed } - (&ty::Dynamic(from_traits, _), &ty::Dynamic(to_traits, _)) => { + (&ty::Dynamic(from_traits, _, _from_kind), &ty::Dynamic(to_traits, _, _to_kind)) => { + // FIXME(dyn-star): Do the right thing with DynKinds for (from, to) in from_traits.iter().zip(to_traits) { let from = fx.tcx.normalize_erasing_late_bound_regions(ParamEnv::reveal_all(), from); |
