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

Feature request: Support using target from .cargo/config.toml #6604

Closed
rlabrecque opened this issue Nov 22, 2020 · 0 comments · Fixed by #8774
Closed

Feature request: Support using target from .cargo/config.toml #6604

rlabrecque opened this issue Nov 22, 2020 · 0 comments · Fixed by #8774
Labels
S-actionable Someone could pick this issue up and work on it right now

Comments

@rlabrecque
Copy link

I'm not sure if this specific config file is used at all by rust-analyzer (it seems poorly documented), but I have my project set up well for everything else and rust-analyzer was still wanting to use my default target/toolchain, rather than the project specified one.

In the meantime I needed to add a settings.json to my project folder with the following, which works well, but it would just be nicer if the target was automatically picked up from .cargo/config.toml:

{
	/*"rust-analyzer.linkedProjects": [
		{
			"crates": [
				{
					"root_module": "a/src/main.rs",
					"edition": "2018",
					"deps": [],
					"target": "i686-pc-windows-msvc",
				},
				{
					"root_module": "b/src/lib.rs",
					"edition": "2018",
					"deps": [],
					"target": "i686-pc-windows-msvc",
				},
				{
					"root_module": "c/src/lib.rs",
					"edition": "2018",
					"deps": [],
					"target": "i686-pc-windows-msvc",
				},
			]
		}
	],*/
	"rust-analyzer.cargo.target": "i686-pc-windows-msvc",
}

Thanks!

@lnicola lnicola added the S-actionable Someone could pick this issue up and work on it right now label Dec 20, 2020
@bors bors bot closed this as completed in 6c0cdc5 May 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-actionable Someone could pick this issue up and work on it right now
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants