mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Parse try
as a keyword only in edition 2018 and up
This commit is contained in:
parent
713c47f25b
commit
d235d09bf9
8 changed files with 24 additions and 42 deletions
|
@ -844,9 +844,9 @@ fn f1() -> DynTrait<Vec<Error>> {foo()}
|
|||
#[test]
|
||||
fn replace_macro_invocations() {
|
||||
assert_ssr_transform(
|
||||
"try!($a) ==>> $a?",
|
||||
"macro_rules! try {() => {}} fn f1() -> Result<(), E> {bar(try!(foo()));}",
|
||||
expect![["macro_rules! try {() => {}} fn f1() -> Result<(), E> {bar(foo()?);}"]],
|
||||
"try_!($a) ==>> $a?",
|
||||
"macro_rules! try_ {() => {}} fn f1() -> Result<(), E> {bar(try_!(foo()));}",
|
||||
expect![["macro_rules! try_ {() => {}} fn f1() -> Result<(), E> {bar(foo()?);}"]],
|
||||
);
|
||||
// FIXME: Figure out why this doesn't work anymore
|
||||
// assert_ssr_transform(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue