You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
jyn514, matklad, Veykril, poliorcetics, LeSeulArtichaut and 2 more
use global_allocator as allow;#[allow(unused)]fnf(){}
error[E0659]: `allow` is ambiguous (built-in attribute vs any other name)
--> src/lib.rs:3:3
|
3 | #[allow(unused)]
| ^^^^^ ambiguous name
|
= note: `allow` could refer to a built-in attribute
note: `allow` could also refer to the attribute macro imported here
--> src/lib.rs:1:5
|
1 | use global_allocator as allow;
| ^^^^^^^^^^^^^^^^^^^^^^^^^
= help: use `crate::allow` to refer to this attribute macro unambiguously
Looks like we just consider all (inert) built-in attributes same during this check.
Activity
petrochenkov commentedon Dec 7, 2020
This should be an error, we have a special check for this in resolve.
I'll check why the error is not reported.
petrochenkov commentedon Dec 7, 2020
Compare with
Looks like we just consider all (inert) built-in attributes same during this check.
petrochenkov commentedon Dec 14, 2020
Fixed in #80031.
Rollup merge of rust-lang#80031 - petrochenkov:builtina, r=estebank
Rollup merge of rust-lang#80031 - petrochenkov:builtina, r=estebank
Rollup merge of rust-lang#80031 - petrochenkov:builtina, r=estebank