-
Couldn't load subscription status.
- Fork 13.9k
Closed
Labels
A-attributesArea: Attributes (`#[…]`, `#![…]`)Area: Attributes (`#[…]`, `#![…]`)A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)C-bugCategory: This is a bug.Category: This is a bug.P-mediumMedium priorityMedium priorityS-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issueStatus: A Minimal Complete and Verifiable Example has been found for this issueT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.
Description
The unused_imports lint is triggered on nightly when it is not on beta or stable. The import is required.
Code
I tried this code:
//! See:
#![doc = a!()]
macro_rules! a {
() => { "Documentation" };
}
use a;
fn main() {}I expected to see this happen: No warnings
Instead, this happened:
warning: unused import: `a`
--> src/main.rs:7:5
|
7 | use a;
| ^
|
= note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default
Version it worked on
It most recently worked on: 1.91.0-beta.10
Version with regression
rustc --version (differs from beta by two versions even after updating):
rustc 1.93.0-nightly (34f954f9b 2025-10-25)
@rustbot modify labels: +regression-from-stable-to-nightly -regression-untriaged
Metadata
Metadata
Assignees
Labels
A-attributesArea: Attributes (`#[…]`, `#![…]`)Area: Attributes (`#[…]`, `#![…]`)A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)C-bugCategory: This is a bug.Category: This is a bug.P-mediumMedium priorityMedium priorityS-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issueStatus: A Minimal Complete and Verifiable Example has been found for this issueT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.