Skip to content

Conversation

@mdx97
Copy link
Contributor

@mdx97 mdx97 commented Sep 16, 2022

Before we were using the range of the corresponding expression node in the macro expanded file, which is obviously incorrect as we are setting the text in the original source.

For some reason, the test I added is failing and I haven't found a way to fix it. Does anyone know why check_fix wouldn't work with macros? Getting this error:

thread 'handlers::type_mismatch::tests::test_add_reference_to_macro_call' panicked at 'no diagnostics', crates/ide-diagnostics/src/handlers/type_mismatch.rs:317:9

closes #13219

@Veykril
Copy link
Member

Veykril commented Sep 16, 2022

The test is failing because String is no defined (tests don't know about std). so just add a struct String; to your fixture and it should work

@mdx97
Copy link
Contributor Author

mdx97 commented Sep 16, 2022

@Veykril thanks Lukas. I will fix that up after work today.

@mdx97
Copy link
Contributor Author

mdx97 commented Sep 16, 2022

I just went ahead and used a u64 instead.

@Veykril
Copy link
Member

Veykril commented Sep 17, 2022

Thanks!
@bors r+

@bors
Copy link
Contributor

bors commented Sep 17, 2022

📌 Commit a65ca20 has been approved by Veykril

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Sep 17, 2022

⌛ Testing commit a65ca20 with merge 932e63b...

@bors
Copy link
Contributor

bors commented Sep 17, 2022

☀️ Test successful - checks-actions
Approved by: Veykril
Pushing 932e63b to master...

@bors bors merged commit 932e63b into rust-lang:master Sep 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add string reference code action wrong positon, when string generated by format!()

4 participants