diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2021-10-17 19:10:21 +0200 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2021-12-04 23:13:58 +0100 |
| commit | 6152b1d7225a45c7814ea6c9e3ea09304268c499 (patch) | |
| tree | 1b05996cfe15b845701ca4a9e360cc72bdbb66e2 | |
| parent | 95fb9ee3cda483f9b3112ec64c2fafd34096da22 (diff) | |
| download | rust-6152b1d7225a45c7814ea6c9e3ea09304268c499.tar.gz rust-6152b1d7225a45c7814ea6c9e3ea09304268c499.zip | |
Filter error by span edition.
| -rw-r--r-- | compiler/rustc_typeck/src/astconv/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_typeck/src/astconv/mod.rs b/compiler/rustc_typeck/src/astconv/mod.rs index bc271fac68f..3d449578eb0 100644 --- a/compiler/rustc_typeck/src/astconv/mod.rs +++ b/compiler/rustc_typeck/src/astconv/mod.rs @@ -2635,7 +2635,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o { sugg = format!("<{}>", sugg); } } - if tcx.sess.edition() >= Edition::Edition2021 { + if self_ty.span.edition() >= Edition::Edition2021 { let msg = "trait objects must include the `dyn` keyword"; let label = "add `dyn` keyword before this trait"; let mut err = |
