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

Report fields which are never read as dead. #13426

Closed
eddyb opened this issue Apr 9, 2014 · 1 comment
Closed

Report fields which are never read as dead. #13426

eddyb opened this issue Apr 9, 2014 · 1 comment

Comments

@eddyb
Copy link
Member

eddyb commented Apr 9, 2014

Dead code analysis finds unused types and functions, but doesn't look at struct fields.

struct Foo {
    bar: A,
    baz: B
}
fn foo() {
    let foo = Foo {bar: a, baz: b};
    foo.bar.do_something();
    // Never read foo.baz again. Compiler doesn't complain.
}

This could also be applied to tuple structs and enum variants.

@eddyb
Copy link
Member Author

eddyb commented Oct 18, 2014

Fixed by #14696.

@eddyb eddyb closed this as completed Oct 18, 2014
compiler-errors pushed a commit to compiler-errors/rust that referenced this issue Oct 26, 2022
Refactor language client handling

Follow up to rust-lang/rust-analyzer#12847 (turns out they fixed parts of the problem)

The PR will attempt to allow us to dispose more resources at will, so that we can implement restarts for the server properly instead of restating the entire extension as well as allowing us to implement a stop command.

Closes rust-lang/rust-analyzer#12936
Closes rust-lang/rust-analyzer#4697
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant