Issue deprecation warnings for safe accesses to extern statics

This commit is contained in:
Vadim Petrochenkov
2016-08-26 19:23:42 +03:00
parent ea45edf0ee
commit aadbcffb7c
11 changed files with 123 additions and 16 deletions

View File

@@ -192,6 +192,12 @@ declare_lint! {
"lifetimes or labels named `'_` were erroneously allowed"
}
declare_lint! {
pub SAFE_EXTERN_STATICS,
Warn,
"safe access to extern statics was erroneously allowed"
}
/// Does nothing as a lint pass, but registers some `Lint`s
/// which are used by other parts of the compiler.
#[derive(Copy, Clone)]
@@ -228,7 +234,8 @@ impl LintPass for HardwiredLints {
RENAMED_AND_REMOVED_LINTS,
SUPER_OR_SELF_IN_GLOBAL_PATH,
HR_LIFETIME_IN_ASSOC_TYPE,
LIFETIME_UNDERSCORE
LIFETIME_UNDERSCORE,
SAFE_EXTERN_STATICS
)
}
}