Skip to content

Deprecation warning emitted from derive without a span #56195

Closed
@bluss

Description

@bluss

Reproducing code:

#[derive(Clone)]
#[deprecated(note="This is no longer useful")]
pub struct MyType { }

fn main() { }

Emits (without line numbers)

warning: use of deprecated item 'MyType': This is no longer useful
  |
  = note: #[warn(deprecated)] on by default

(Old report)

In this branch / commit of itertools, running cargo build shows a deprecation error without location in the code.

Running `rustc --crate-name itertools src/lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 --cfg 'feature="default"' --cfg 'feature="use_std"' -C metadata=ba59252761bab077 -C extra-filename=-ba59252761bab077 --out-dir /home/travis/build/bluss/rust-itertools/target/debug/deps -L dependency=/home/travis/build/bluss/rust-itertools/target/debug/deps --extern either=/home/travis/build/bluss/rust-itertools/target/debug/deps/libeither-298d84de5004c8fc.rlib`
warning: use of deprecated item: Use std .step_by() instead
  |
  = note: #[warn(deprecated)] on by default
warning: use of deprecated item: Use std .step_by() instead

Version: rustc 1.32.0-nightly (1f57e48 2018-11-23)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions