mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 05:45:12 +00:00
Use Edition::CURRENT
This commit is contained in:
parent
9c75e9fa7d
commit
83370fe5d7
16 changed files with 17 additions and 19 deletions
|
@ -207,7 +207,7 @@ fn parse_adt(tt: &tt::Subtree, call_site: Span) -> Result<BasicAdtInfo, ExpandEr
|
|||
let (parsed, tm) = &mbe::token_tree_to_syntax_node(
|
||||
tt,
|
||||
mbe::TopEntryPoint::MacroItems,
|
||||
parser::Edition::Edition2021,
|
||||
parser::Edition::CURRENT,
|
||||
);
|
||||
let macro_items = ast::MacroItems::cast(parsed.syntax_node())
|
||||
.ok_or_else(|| ExpandError::other("invalid item definition"))?;
|
||||
|
|
|
@ -676,7 +676,7 @@ fn token_tree_to_syntax_node(
|
|||
ExpandTo::Type => mbe::TopEntryPoint::Type,
|
||||
ExpandTo::Expr => mbe::TopEntryPoint::Expr,
|
||||
};
|
||||
mbe::token_tree_to_syntax_node(tt, entry_point, parser::Edition::Edition2021)
|
||||
mbe::token_tree_to_syntax_node(tt, entry_point, parser::Edition::CURRENT)
|
||||
}
|
||||
|
||||
fn check_tt_count(tt: &tt::Subtree) -> Result<(), ExpandResult<()>> {
|
||||
|
|
|
@ -420,7 +420,7 @@ mod tests {
|
|||
let (parse, _) = mbe::token_tree_to_syntax_node(
|
||||
&tt,
|
||||
::mbe::TopEntryPoint::MacroItems,
|
||||
parser::Edition::Edition2021,
|
||||
parser::Edition::CURRENT,
|
||||
);
|
||||
assert!(
|
||||
parse.errors().is_empty(),
|
||||
|
|
|
@ -303,6 +303,7 @@ pub mod known {
|
|||
rust_2015,
|
||||
rust_2018,
|
||||
rust_2021,
|
||||
rust_2024,
|
||||
v1,
|
||||
new_display,
|
||||
new_debug,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue