David-OConnor / stm32-hal

This library provides access to STM32 peripherals in Rust.
MIT License
147 stars 44 forks source link

rust-analyzer issues #84

Open burrbull opened 1 year ago

burrbull commented 1 year ago

I think this issue is more related for rust-analyzer + VsCode than this crate, but this is good example.

Trying to open repository with this .vscode/settings.json:

{
  "rust-analyzer.check.allTargets": false,
  "rust-analyzer.check.targets": "thumbv7em-none-eabihf",
  "rust-analyzer.cargo.features": [
    "h735"
  ],
}

causes pac not found.

Same time in lapce with .lapce/settings.toml

[lapce-rust]
check.allTargets = false
check.targets = "thumbv7em-none-eabihf"
cargo.features = ["h735"]

all works fine.

I think the cause is that stm32xxx crates are optional.

David-OConnor commented 1 year ago

Weird! I'm curious now. Could indeed be optional. I'm using Intellij myself. LMK if you think of any fix.