-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-libtestArea: `#[test]` / the `test` libraryArea: `#[test]` / the `test` libraryA-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-bugCategory: This is a bug.Category: This is a bug.L-deprecatedLint: deprecatedLint: deprecatedT-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.
Description
This code demonstrates the issue in question:
#[deprecated(since = "0.1.0")]
mod foo {
#[test]
fn stuff() {}
}
Attempting to run cargo test
on this will give an incredibly opaque error message: use of deprecated item 'foo::__test_reexports'
. I had to resort to grepping rustc's codebase to figure out where this was coming from.
Additionally, there is no way to silence this error, other than allowing use of deprecated items for the entire crate. Attempting to put #[allow(deprecated)]
either on the test itself, or on the deprecated module has no effect.
elichai, threecgreen, ShadowJonathan, avsaase, jplatte and 3 morehanna-kruppe, scottmcm and stevenroose
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-libtestArea: `#[test]` / the `test` libraryArea: `#[test]` / the `test` libraryA-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-bugCategory: This is a bug.Category: This is a bug.L-deprecatedLint: deprecatedLint: deprecatedT-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.
Type
Projects
Status
No status