Skip to content

pub_restricted field warning spans include close-paren #35435

Closed
@causal-agent

Description

@causal-agent

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lints

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions