1
Fork 0

Auto merge of #96082 - michaelwoerister:less_impl_stable_hash_via_hash, r=compiler-errors

incr. comp.: Don't export impl_stable_hash_via_hash!() and warn about using it.

Fixes https://github.com/rust-lang/rust/issues/96013.
This commit is contained in:
bors 2022-04-20 03:51:09 +00:00
commit 27af517549
8 changed files with 38 additions and 37 deletions

View file

@ -8,6 +8,7 @@ use rustc_ast::node_id::{NodeId, NodeMap};
use rustc_ast::{AttrId, Attribute};
use rustc_data_structures::stable_hasher::{HashStable, StableHasher, ToStableHashKey};
use rustc_error_messages::MultiSpan;
use rustc_hir::HashStableContext;
use rustc_hir::HirId;
use rustc_span::edition::Edition;
use rustc_span::{sym, symbol::Ident, Span, Symbol};
@ -146,7 +147,7 @@ impl<HCX: rustc_hir::HashStableContext> ToStableHashKey<HCX> for LintExpectation
/// Setting for how to handle a lint.
///
/// See: <https://doc.rust-lang.org/rustc/lints/levels.html>
#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash, HashStable_Generic)]
pub enum Level {
/// The `allow` level will not issue any message.
Allow,
@ -174,8 +175,6 @@ pub enum Level {
Forbid,
}
rustc_data_structures::impl_stable_hash_via_hash!(Level);
impl Level {
/// Converts a level to a lower-case string.
pub fn as_str(self) -> &'static str {