Change how edition is determined
This commit is contained in:
parent
a2b1347bbb
commit
d7b226398e
2 changed files with 3 additions and 3 deletions
|
@ -1704,7 +1704,7 @@ impl EarlyLintPass for EllipsisInclusiveRangePatterns {
|
|||
Some(start) => format!("&({}..={})", expr_to_string(&start), end),
|
||||
None => format!("&(..={})", end),
|
||||
};
|
||||
if cx.sess().edition() >= Edition::Edition2021 {
|
||||
if join.edition() >= Edition::Edition2021 {
|
||||
let mut err =
|
||||
rustc_errors::struct_span_err!(cx.sess, pat.span, E0783, "{}", msg,);
|
||||
err.span_suggestion(
|
||||
|
@ -1728,7 +1728,7 @@ impl EarlyLintPass for EllipsisInclusiveRangePatterns {
|
|||
}
|
||||
} else {
|
||||
let replace = "..=".to_owned();
|
||||
if cx.sess().edition() >= Edition::Edition2021 {
|
||||
if join.edition() >= Edition::Edition2021 {
|
||||
let mut err =
|
||||
rustc_errors::struct_span_err!(cx.sess, pat.span, E0783, "{}", msg,);
|
||||
err.span_suggestion_short(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue