allow_internal_unstable
can be used to bypass incomplete_features
warning
#128175
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-lints
Area: Lints (warnings about flaws in source code) such as unused_mut.
C-bug
Category: This is a bug.
F-allow_internal_unstable
`#![feature(allow_internal_unstable)]`
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
The following example uses the incomplete
dyn_star
feature, which should trigger a warning, but the warning does not show:This is a problem since we want to use the lint to enforce that e.g. std does not depend on incomplete features, and this issue could lead to us accidentally depending on incomplete features anyway!
We probably have to make the incomplete_features lint scan not just the module-level
#![feature]
declarations, but also theallow_internal_unstable
(andrustc_allow_const_fn_unstable
).Or, alternatively, maybe
allow_internal_unstable
should only allow features that are enabled in the crate where the macro is declared? It seems a bit odd to say "ah yes this macro can internally use feature X anywhere it is expanded" when feature X is not even available in the current crate.The text was updated successfully, but these errors were encountered: