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

pub_restricted field warning spans include close-paren #35435

Closed
causal-agent opened this issue Aug 6, 2016 · 1 comment
Closed

pub_restricted field warning spans include close-paren #35435

causal-agent opened this issue Aug 6, 2016 · 1 comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints

Comments

@causal-agent
Copy link
Contributor

Warnings on pub_restricted fields produce odd spans including the close-paren:

src/lib.rs
#![feature(pub_restricted)]
pub mod foo;
src/foo.rs
pub struct Foo {
    pub(super) bar: u8,
}
cargo build
warning: struct field is never used: `bar`, #[warn(dead_code)] on by default
 --> src/foo.rs:2:14
  |
2 |     pub(super) bar: u8,
  |              ^^^^^^^^^
rustc --version
rustc 1.12.0-nightly (b30eff7ba 2016-08-05)
@Aatch Aatch added the A-diagnostics Area: Messages for errors, warnings, and lints label Aug 8, 2016
@Aatch
Copy link
Contributor

Aatch commented Aug 8, 2016

There's most like some code that is still assuming that privacy modifiers are a single token.

Manishearth added a commit to Manishearth/rust that referenced this issue Aug 13, 2016
…matsakis

Correct span for pub_restricted field

Fix rust-lang#35435.
Manishearth added a commit to Manishearth/rust that referenced this issue Aug 13, 2016
…matsakis

Correct span for pub_restricted field

Fix rust-lang#35435.
eddyb added a commit to eddyb/rust that referenced this issue Aug 14, 2016
…matsakis

Correct span for pub_restricted field

Fix rust-lang#35435.
eddyb added a commit to eddyb/rust that referenced this issue Aug 14, 2016
…matsakis

Correct span for pub_restricted field

Fix rust-lang#35435.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints
Projects
None yet
Development

No branches or pull requests

2 participants