Skip to content

Renaming builtin attributes does not work, but name resolution thinks it does #79798

Closed
@jonas-schievink

Description

@jonas-schievink

Forgive my sins, but:

use allow as deny;

#[deny(unused)]
fn f() {}

The #[deny] still acts as a #[deny], but the import should make it behave like #[allow]. No "unused import" lint is emitted, so name resolution thinks that the import has an effect.

Metadata

Metadata

Assignees

Labels

A-attributesArea: Attributes (`#[…]`, `#![…]`)A-resolveArea: Name/path resolution done by `rustc_resolve` specificallyC-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions