Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 75d2455

Browse files
committed
Sync from rust 00fcc82
2 parents 107f9d8 + e4d2f94 commit 75d2455

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

src/base.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -701,6 +701,10 @@ fn codegen_stmt<'tcx>(
701701
let operand = codegen_operand(fx, operand);
702702
operand.unsize_value(fx, lval);
703703
}
704+
Rvalue::Cast(CastKind::DynStar, _, _) => {
705+
// FIXME(dyn-star)
706+
unimplemented!()
707+
}
704708
Rvalue::Discriminant(place) => {
705709
let place = codegen_place(fx, place);
706710
let value = place.to_cvalue(fx);

src/debuginfo/line_info.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ impl DebugContext {
6868
) -> (Lrc<SourceFile>, u64, u64) {
6969
// Based on https://github.com/rust-lang/rust/blob/e369d87b015a84653343032833d65d0545fd3f26/src/librustc_codegen_ssa/mir/mod.rs#L116-L131
7070
// In order to have a good line stepping behavior in debugger, we overwrite debug
71-
// locations of macro expansions with that of the outermost expansion site
72-
// (unless the crate is being compiled with `-Z debug-macros`).
73-
let span = if !span.from_expansion() || tcx.sess.opts.unstable_opts.debug_macros {
71+
// locations of macro expansions with that of the outermost expansion site (when the macro is
72+
// annotated with `#[collapse_debuginfo]` or when `-Zdebug-macros` is provided).
73+
let span = if tcx.should_collapse_debuginfo(span) {
7474
span
7575
} else {
7676
// Walk up the macro expansion chain until we reach a non-expanded span.

src/value_and_place.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -815,7 +815,8 @@ pub(crate) fn assert_assignable<'tcx>(
815815
);
816816
// fn(&T) -> for<'l> fn(&'l T) is allowed
817817
}
818-
(&ty::Dynamic(from_traits, _), &ty::Dynamic(to_traits, _)) => {
818+
(&ty::Dynamic(from_traits, _, _from_kind), &ty::Dynamic(to_traits, _, _to_kind)) => {
819+
// FIXME(dyn-star): Do the right thing with DynKinds
819820
for (from, to) in from_traits.iter().zip(to_traits) {
820821
let from =
821822
fx.tcx.normalize_erasing_late_bound_regions(ParamEnv::reveal_all(), from);

0 commit comments

Comments
 (0)