-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
S-unactionableIssue requires feedback, design decisions or is blocked on other workIssue requires feedback, design decisions or is blocked on other work
Description
The latest (stable and nightly) builds of Rust analyzer fails to capture errors. Iam expecting value moved error in the below code but RA does report any. Note I'm no way a Rust expert just picking up the language reporting this issue based on my understanding.
Editor - VSCode (latest) Hope this does not matter much
Rustc - 1.46.0
The below code is where I found the issue.
(Note :- RLS )
pub(crate) fn main() {
let score = Score::new(90);
calcScore(score);
dispScore(score); **// Expected moved value error in this line.**
}
#[derive(Debug)]
struct Score {
runs: i32,
}
impl Score {
fn new(runs: i32) -> Self { Self { runs } }
}
fn calcScore(score : Score) {
println!("{:?}",score)
}
fn dispScore(score: Score) {
println!("{:?}",score)
}
Metadata
Metadata
Assignees
Labels
S-unactionableIssue requires feedback, design decisions or is blocked on other workIssue requires feedback, design decisions or is blocked on other work