rust-lang / rust-lang/rust-analyzer
Unknown type in basic `esp32c3-hal`
Open
Nobody has claimed this yet.
A-nameres
A-ty
C-bug
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
rust-analyzer version: rust-analyzer version: 0.0.0 (7ac161ce7 2023-05-21)
rustc version: rustc 1.69.0 (84c898d65 2023-04-16)
let system = peripherals.SYSTEM.split(); has {unknown} type
1. main.rs
#![no_std]
#![no_main]
use core::panic;
use esp32c3_hal::prelude::_esp_hal_system_SystemExt;
use esp32c3_hal::{entry, peripherals::Peripherals};
#[entry]
fn main() -> ! {
let peripherals = Peripherals::take();
let system = peripherals.SYSTEM.split();
// ^^^^^ system has unknown type
drop(system);
loop {}
}
#[panic_handler]
fn panic_handler(_: &panic::PanicInfo) -> ! {
loop {}
}
2. Cargo.toml
[package]
name = "blink"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
esp32c3-hal = "0.9.0"
[profile.release]
debug = false
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the report using the provided main.rs and Cargo.toml with rust-analyzer 0.0.0 and esp32c3-hal 0.9.0. Inspect why the type of peripherals.SYSTEM.split() is shown as {unknown}; done when rust-analyzer resolves and displays the concrete type for system.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100