Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unresolved macro call due to defining a macro called test #14254

Closed
CGMossa opened this issue Mar 5, 2023 · 0 comments · Fixed by #14781
Closed

Unresolved macro call due to defining a macro called test #14254

CGMossa opened this issue Mar 5, 2023 · 0 comments · Fixed by #14781
Labels
A-macro macro expansion A-nameres name, path and module resolution C-bug Category: bug

Comments

@CGMossa
Copy link

CGMossa commented Mar 5, 2023

rust-analyzer version: rust-analyzer version: 0.4.1423-standalone (73e2505 2023-03-03)

rustc version: rustc 1.69.0-nightly (d962ea578 2023-02-26)

We have a macro named test! that we need to use inside our tests;
This redefinition causes RA to complain about the regular #[test] attributes.

A screenshot is better a showcasing this:
image

The error is:

[{
	"resource": "/c:/Users/angus/Documents/GitHub/extendr/extendr-api/src/lib.rs",
	"owner": "rustc",
	"code": {
		"value": "unresolved-macro-call",
		"target": {
			"$mid": 1,
			"external": "https://rust-analyzer.github.io/manual.html#unresolved-macro-call",
			"path": "/manual.html",
			"scheme": "https",
			"authority": "rust-analyzer.github.io",
			"fragment": "unresolved-macro-call"
		}
	},
	"severity": 8,
	"message": "unresolved macro `test`",
	"source": "rust-analyzer",
	"startLineNumber": 745,
	"startColumn": 5,
	"endLineNumber": 745,
	"endColumn": 12
}]

I'm more than happy to dig out more information on this.

@CGMossa CGMossa added the C-bug Category: bug label Mar 5, 2023
@lowr lowr added A-macro macro expansion A-nameres name, path and module resolution labels May 9, 2023
@bors bors closed this as completed in 9b33874 May 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-macro macro expansion A-nameres name, path and module resolution C-bug Category: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants