Skip to content

[1.38] Regression: missing unused import warning #81368

Closed
@dylni

Description

@dylni

Code

I tried this code:

use std::clone::Clone;

#[derive(Clone)]
struct S;

fn main() {}

I expected to see this happen: The code compiles with a warning about the import being unused.

Instead, this happened: The code compiles with no warnings.

Version it worked on

It most recently worked on: Rust 1.37

Version with regression

rustc --version --verbose:

rustc 1.49.0 (e1884a8e3 2020-12-29)
binary: rustc
commit-hash: e1884a8e3c3e813aada8254edfa120e85bf5ffca
commit-date: 2020-12-29
host: x86_64-unknown-linux-gnu
release: 1.49.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    regression-untriagedUntriaged performance or correctness regression.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions