Skip to content

Commit

Permalink
fixup rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
jdonszelmann committed Dec 6, 2024
1 parent 301dd9c commit 0747288
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion compiler/rustc_hir/src/attribute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use rustc_target::abi::Align;
use smallvec::SmallVec;
use thin_vec::ThinVec;

use crate::{DefaultBodyStability, ItemLocalId, PartialConstStability, RustcVersion, Stability};
use crate::{DefaultBodyStability, PartialConstStability, RustcVersion, Stability};

/// The derived implementation of [`HashStable_Generic`] on [`Attribute`]s shouldn't hash
/// [`AttrId`]s. By wrapping them in this, we make sure we never do.
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_hir/src/hir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ use rustc_target::asm::InlineAsmRegOrRegClass;
use smallvec::SmallVec;
use tracing::debug;

use crate::{Attribute, LangItem};
use crate::def::{CtorKind, DefKind, Res};
use crate::def_id::{DefId, LocalDefIdMap};
pub(crate) use crate::hir_id::{HirId, ItemLocalId, ItemLocalMap, OwnerId};
use crate::intravisit::FnKind;
use crate::{Attribute, LangItem};

#[derive(Debug, Copy, Clone, HashStable_Generic)]
pub struct Lifetime {
Expand Down
6 changes: 3 additions & 3 deletions compiler/rustc_hir/src/stable_hash_impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ use rustc_data_structures::stable_hasher::{HashStable, StableHasher, ToStableHas
use rustc_span::def_id::DefPathHash;

use crate::HashIgnoredAttrId;
use crate::attribute::AttributeMap;
use crate::hir::{BodyId, Crate, ForeignItemId, ImplItemId, ItemId, OwnerNodes, TraitItemId};
use crate::hir::{
AttributeMap, BodyId, Crate, ForeignItemId, ImplItemId, ItemId, OwnerNodes, TraitItemId,
};
use crate::hir_id::{HirId, ItemLocalId};
use crate::Attribute;

/// Requirements for a `StableHashingContext` to be used in this crate.
/// This is a hack to allow using the `HashStable_Generic` derive macro
Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/html/render/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1051,7 +1051,7 @@ fn render_stability_since_raw_with_extra(

fn since_to_string(since: &StableSince) -> Option<String> {
match since {
StableSince::Version(since) => Some(since.to_string()),
StableSince::Version(since, _) => Some(since.to_string()),
StableSince::Current => Some(RustcVersion::CURRENT.to_string()),
StableSince::Err => None,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub(super) fn check(
) {
if cfg_attr.has_name(sym::clippy)
&& let Some(ident) = behind_cfg_attr.ident()
&& Level::from_symbol(ident.name, Some(attr.id)).is_some()
&& Level::from_symbol(ident.name, || Some(attr.id)).is_some()
&& let Some(items) = behind_cfg_attr.meta_item_list()
{
let nb_items = items.len();
Expand Down
2 changes: 1 addition & 1 deletion src/tools/clippy/clippy_lints/src/attrs/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub(super) fn is_word(nmi: &MetaItemInner, expected: Symbol) -> bool {
}

pub(super) fn is_lint_level(symbol: Symbol, attr_id: AttrId) -> bool {
Level::from_symbol(symbol, Some(attr_id)).is_some()
Level::from_symbol(symbol, || Some(attr_id)).is_some()
}

pub(super) fn is_relevant_item(cx: &LateContext<'_>, item: &Item<'_>) -> bool {
Expand Down
2 changes: 1 addition & 1 deletion src/tools/clippy/clippy_lints/src/incompatible_msrv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ impl IncompatibleMsrv {
.lookup_stability(def_id)
.and_then(|stability| match stability.level {
StabilityLevel::Stable {
since: StableSince::Version(version),
since: StableSince::Version(version, _),
..
} => Some(version),
_ => None,
Expand Down
2 changes: 1 addition & 1 deletion src/tools/clippy/clippy_lints/src/std_instead_of_core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ fn is_stable(cx: &LateContext<'_>, mut def_id: DefId, msrv: &Msrv) -> bool {
} = stability.level
{
let stable = match since {
StableSince::Version(v) => msrv.meets(v),
StableSince::Version(v, _) => msrv.meets(v),
StableSince::Current => msrv.current().is_none(),
StableSince::Err => false,
};
Expand Down
2 changes: 1 addition & 1 deletion src/tools/clippy/clippy_utils/src/qualify_min_const_fn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ fn is_stable_const_fn(tcx: TyCtxt<'_>, def_id: DefId, msrv: &Msrv) -> bool {
// as a part of an unimplemented MSRV check https://github.com/rust-lang/rust/issues/65262.

let const_stab_rust_version = match since {
StableSince::Version(version) => version,
StableSince::Version(version, _) => version,
StableSince::Current => rustc_hir::RustcVersion::CURRENT,
StableSince::Err => return false,
};
Expand Down

0 comments on commit 0747288

Please sign in to comment.