Skip to content

Commit 6152b1d

Browse files
committed
Filter error by span edition.
1 parent 95fb9ee commit 6152b1d

File tree

1 file changed

+1
-1
lines changed
  • compiler/rustc_typeck/src/astconv

1 file changed

+1
-1
lines changed

compiler/rustc_typeck/src/astconv/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2635,7 +2635,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
26352635
sugg = format!("<{}>", sugg);
26362636
}
26372637
}
2638-
if tcx.sess.edition() >= Edition::Edition2021 {
2638+
if self_ty.span.edition() >= Edition::Edition2021 {
26392639
let msg = "trait objects must include the `dyn` keyword";
26402640
let label = "add `dyn` keyword before this trait";
26412641
let mut err =

0 commit comments

Comments
 (0)