Closed
Description
rust-analyzer version: rust-analyzer version: 0.3.1506-standalone
rustc version: rustc 1.64.0-nightly (f6f9d5e73 2022-08-04)
relevant settings:
This is my cargo
[package]
name = "os"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
riscv = { git = "https://github.com/rcore-os/riscv", features = ["inline-asm"] }
bitflags = "1.2.1"
lazy_static = { version = "1.4.0", features = ["spin_no_std"] }
xmas-elf = "0.7.0"
[features]
default = ["larger_memory"]
# for larger memory to load app's elf file with debug symbols
larger_memory = []
# for loggers
NoneLog = []
Error = []
Warn = ["Error"]
Debug = ["Warn"]
Info = ["Debug"]
Trace = ["Info"]
[profile.release]
debug = true
Today when I open my vscode to check my repo, I found there are so many rust errors appears. They are all
this operation is unsafe and requires an unsafe function or block
which appear at
bitflags! {
pub struct PTEFlags : usize{
const V = 1 << 0; // valid
const R = 1 << 1; // readable
const W = 1 << 2; // writable
const X = 1 << 3; // executable
const U = 1 << 4; // user
const G = 1 << 5; // global
const A = 1 << 6; // accessed
const D = 1 << 7; // dirty
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
This is the shoot cut
I don't know why...