Remove rustc_attr_data_structures re-export from rustc_attr_parsing
This commit is contained in:
parent
684b7b70f4
commit
178e09ed37
48 changed files with 83 additions and 63 deletions
|
|
@ -3376,6 +3376,7 @@ version = "0.0.0"
|
|||
dependencies = [
|
||||
"rustc_ast",
|
||||
"rustc_ast_pretty",
|
||||
"rustc_attr_data_structures",
|
||||
"rustc_attr_parsing",
|
||||
"rustc_data_structures",
|
||||
"rustc_errors",
|
||||
|
|
@ -3453,6 +3454,7 @@ dependencies = [
|
|||
"rustc_abi",
|
||||
"rustc_arena",
|
||||
"rustc_ast",
|
||||
"rustc_attr_data_structures",
|
||||
"rustc_attr_parsing",
|
||||
"rustc_data_structures",
|
||||
"rustc_errors",
|
||||
|
|
@ -3666,6 +3668,7 @@ dependencies = [
|
|||
"rustc_ast",
|
||||
"rustc_ast_passes",
|
||||
"rustc_ast_pretty",
|
||||
"rustc_attr_data_structures",
|
||||
"rustc_attr_parsing",
|
||||
"rustc_data_structures",
|
||||
"rustc_errors",
|
||||
|
|
@ -3936,6 +3939,7 @@ dependencies = [
|
|||
"rustc_abi",
|
||||
"rustc_ast",
|
||||
"rustc_ast_pretty",
|
||||
"rustc_attr_data_structures",
|
||||
"rustc_attr_parsing",
|
||||
"rustc_data_structures",
|
||||
"rustc_errors",
|
||||
|
|
@ -4009,6 +4013,7 @@ dependencies = [
|
|||
"odht",
|
||||
"rustc_abi",
|
||||
"rustc_ast",
|
||||
"rustc_attr_data_structures",
|
||||
"rustc_attr_parsing",
|
||||
"rustc_data_structures",
|
||||
"rustc_errors",
|
||||
|
|
@ -4329,6 +4334,7 @@ dependencies = [
|
|||
"rustc_arena",
|
||||
"rustc_ast",
|
||||
"rustc_ast_pretty",
|
||||
"rustc_attr_data_structures",
|
||||
"rustc_attr_parsing",
|
||||
"rustc_data_structures",
|
||||
"rustc_errors",
|
||||
|
|
|
|||
|
|
@ -60,7 +60,8 @@
|
|||
//! `#[stable(...)]` and `#[unstable()]` cannot occur together, and both semantically define
|
||||
//! a "stability" of an item. So, the stability attribute has an
|
||||
//! [`AttributeParser`](attributes::AttributeParser) that recognizes both the `#[stable()]`
|
||||
//! and `#[unstable()]` syntactic attributes, and at the end produce a single [`AttributeKind::Stability`].
|
||||
//! and `#[unstable()]` syntactic attributes, and at the end produce a single
|
||||
//! [`AttributeKind::Stability`](rustc_attr_data_structures::AttributeKind::Stability).
|
||||
//!
|
||||
//! As a rule of thumb, when a syntactical attribute can be applied more than once, they should be
|
||||
//! combined into a single semantic attribute. For example:
|
||||
|
|
@ -92,6 +93,5 @@ mod session_diagnostics;
|
|||
pub use attributes::cfg::*;
|
||||
pub use attributes::util::{find_crate_name, is_builtin_attr, parse_version};
|
||||
pub use context::{AttributeParser, OmitDoc};
|
||||
pub use rustc_attr_data_structures::*;
|
||||
|
||||
rustc_fluent_macro::fluent_messages! { "../messages.ftl" }
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ doctest = false
|
|||
# tidy-alphabetical-start
|
||||
rustc_ast = { path = "../rustc_ast" }
|
||||
rustc_ast_pretty = { path = "../rustc_ast_pretty" }
|
||||
rustc_attr_data_structures = { path = "../rustc_attr_data_structures" }
|
||||
rustc_attr_parsing = { path = "../rustc_attr_parsing" }
|
||||
rustc_data_structures = { path = "../rustc_data_structures" }
|
||||
rustc_errors = { path = "../rustc_errors" }
|
||||
|
|
|
|||
|
|
@ -185,7 +185,8 @@ use rustc_ast::{
|
|||
self as ast, AnonConst, BindingMode, ByRef, EnumDef, Expr, GenericArg, GenericParamKind,
|
||||
Generics, Mutability, PatKind, VariantData,
|
||||
};
|
||||
use rustc_attr_parsing::{AttributeKind, AttributeParser, ReprPacked};
|
||||
use rustc_attr_data_structures::{AttributeKind, ReprPacked};
|
||||
use rustc_attr_parsing::AttributeParser;
|
||||
use rustc_expand::base::{Annotatable, ExtCtxt};
|
||||
use rustc_hir::Attribute;
|
||||
use rustc_span::{DUMMY_SP, Ident, Span, Symbol, kw, sym};
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
use gccjit::FnAttribute;
|
||||
use gccjit::Function;
|
||||
#[cfg(feature = "master")]
|
||||
use rustc_attr_parsing::InlineAttr;
|
||||
use rustc_attr_parsing::InstructionSetAttr;
|
||||
use rustc_attr_data_structures::InlineAttr;
|
||||
use rustc_attr_data_structures::InstructionSetAttr;
|
||||
#[cfg(feature = "master")]
|
||||
use rustc_middle::middle::codegen_fn_attrs::CodegenFnAttrFlags;
|
||||
use rustc_middle::ty;
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ pub fn get_fn<'gcc, 'tcx>(cx: &CodegenCx<'gcc, 'tcx>, instance: Instance<'tcx>)
|
|||
// This is a monomorphization of a generic function.
|
||||
if !(cx.tcx.sess.opts.share_generics()
|
||||
|| tcx.codegen_fn_attrs(instance_def_id).inline
|
||||
== rustc_attr_parsing::InlineAttr::Never)
|
||||
== rustc_attr_data_structures::InlineAttr::Never)
|
||||
{
|
||||
// When not sharing generics, all instances are in the same
|
||||
// crate and have hidden visibility.
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ extern crate tracing;
|
|||
extern crate rustc_abi;
|
||||
extern crate rustc_apfloat;
|
||||
extern crate rustc_ast;
|
||||
extern crate rustc_attr_parsing;
|
||||
extern crate rustc_attr_data_structures;
|
||||
extern crate rustc_codegen_ssa;
|
||||
extern crate rustc_data_structures;
|
||||
extern crate rustc_errors;
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ regex = "1.4"
|
|||
rustc_abi = { path = "../rustc_abi" }
|
||||
rustc_arena = { path = "../rustc_arena" }
|
||||
rustc_ast = { path = "../rustc_ast" }
|
||||
rustc_attr_data_structures = { path = "../rustc_attr_data_structures" }
|
||||
rustc_attr_parsing = { path = "../rustc_attr_parsing" }
|
||||
rustc_data_structures = { path = "../rustc_data_structures" }
|
||||
rustc_errors = { path = "../rustc_errors" }
|
||||
|
|
|
|||
|
|
@ -370,7 +370,7 @@ fn exported_symbols_provider_local<'tcx>(
|
|||
|
||||
if !tcx.sess.opts.share_generics() {
|
||||
if tcx.codegen_fn_attrs(mono_item.def_id()).inline
|
||||
== rustc_attr_parsing::InlineAttr::Never
|
||||
== rustc_attr_data_structures::InlineAttr::Never
|
||||
{
|
||||
// this is OK, we explicitly allow sharing inline(never) across crates even
|
||||
// without share-generics.
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ use itertools::Itertools;
|
|||
use rustc_abi::FIRST_VARIANT;
|
||||
use rustc_ast as ast;
|
||||
use rustc_ast::expand::allocator::{ALLOCATOR_METHODS, AllocatorKind, global_fn_name};
|
||||
use rustc_attr_parsing::OptimizeAttr;
|
||||
use rustc_attr_data_structures::OptimizeAttr;
|
||||
use rustc_data_structures::fx::{FxHashMap, FxIndexSet};
|
||||
use rustc_data_structures::profiling::{get_resident_set_size, print_time_passes_entry};
|
||||
use rustc_data_structures::sync::{IntoDynSyncSend, par_map};
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ use std::str::FromStr;
|
|||
use rustc_abi::ExternAbi;
|
||||
use rustc_ast::expand::autodiff_attrs::{AutoDiffAttrs, DiffActivity, DiffMode};
|
||||
use rustc_ast::{LitKind, MetaItem, MetaItemInner, attr};
|
||||
use rustc_attr_parsing::ReprAttr::ReprAlign;
|
||||
use rustc_attr_parsing::{AttributeKind, InlineAttr, InstructionSetAttr, OptimizeAttr};
|
||||
use rustc_attr_data_structures::ReprAttr::ReprAlign;
|
||||
use rustc_attr_data_structures::{AttributeKind, InlineAttr, InstructionSetAttr, OptimizeAttr};
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_hir::def::DefKind;
|
||||
use rustc_hir::def_id::{DefId, LOCAL_CRATE, LocalDefId};
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
use rustc_abi::{BackendRepr, Float, Integer, Primitive, RegKind};
|
||||
use rustc_attr_parsing::InstructionSetAttr;
|
||||
use rustc_attr_data_structures::InstructionSetAttr;
|
||||
use rustc_hir::def_id::DefId;
|
||||
use rustc_middle::mir::mono::{Linkage, MonoItemData, Visibility};
|
||||
use rustc_middle::mir::{InlineAsmOperand, START_BLOCK};
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
use rustc_attr_parsing::InstructionSetAttr;
|
||||
use rustc_attr_data_structures::InstructionSetAttr;
|
||||
use rustc_data_structures::fx::FxIndexSet;
|
||||
use rustc_data_structures::unord::{UnordMap, UnordSet};
|
||||
use rustc_errors::Applicability;
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ doctest = false
|
|||
rustc_ast = { path = "../rustc_ast" }
|
||||
rustc_ast_passes = { path = "../rustc_ast_passes" }
|
||||
rustc_ast_pretty = { path = "../rustc_ast_pretty" }
|
||||
rustc_attr_data_structures = { path = "../rustc_attr_data_structures" }
|
||||
rustc_attr_parsing = { path = "../rustc_attr_parsing" }
|
||||
rustc_data_structures = { path = "../rustc_data_structures" }
|
||||
rustc_errors = { path = "../rustc_errors" }
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ use rustc_ast::token::MetaVarKind;
|
|||
use rustc_ast::tokenstream::TokenStream;
|
||||
use rustc_ast::visit::{AssocCtxt, Visitor};
|
||||
use rustc_ast::{self as ast, AttrVec, Attribute, HasAttrs, Item, NodeId, PatKind};
|
||||
use rustc_attr_parsing::{AttributeKind, Deprecation, Stability, find_attr};
|
||||
use rustc_attr_data_structures::{AttributeKind, Deprecation, Stability, find_attr};
|
||||
use rustc_data_structures::fx::FxIndexMap;
|
||||
use rustc_data_structures::sync;
|
||||
use rustc_errors::{DiagCtxtHandle, ErrorGuaranteed, PResult};
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ use rustc_ast::token::{self, NonterminalKind, Token, TokenKind};
|
|||
use rustc_ast::tokenstream::{DelimSpan, TokenStream};
|
||||
use rustc_ast::{self as ast, DUMMY_NODE_ID, NodeId};
|
||||
use rustc_ast_pretty::pprust;
|
||||
use rustc_attr_parsing::{AttributeKind, find_attr};
|
||||
use rustc_attr_data_structures::{AttributeKind, find_attr};
|
||||
use rustc_data_structures::fx::{FxHashMap, FxIndexMap};
|
||||
use rustc_errors::{Applicability, Diag, ErrorGuaranteed};
|
||||
use rustc_feature::Features;
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ edition = "2024"
|
|||
rustc_abi = { path = "../rustc_abi" }
|
||||
rustc_ast = { path = "../rustc_ast" }
|
||||
rustc_ast_pretty = { path = "../rustc_ast_pretty" }
|
||||
rustc_attr_data_structures = { path = "../rustc_attr_data_structures" }
|
||||
rustc_attr_parsing = { path = "../rustc_attr_parsing" }
|
||||
rustc_data_structures = { path = "../rustc_data_structures" }
|
||||
rustc_errors = { path = "../rustc_errors" }
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
use rustc_abi::ExternAbi;
|
||||
use rustc_attr_parsing::{AttributeKind, AttributeParser, ReprAttr};
|
||||
use rustc_attr_data_structures::{AttributeKind, ReprAttr};
|
||||
use rustc_attr_parsing::AttributeParser;
|
||||
use rustc_hir::def::{DefKind, Res};
|
||||
use rustc_hir::intravisit::FnKind;
|
||||
use rustc_hir::{AttrArgs, AttrItem, Attribute, GenericParamKind, PatExprKind, PatKind};
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ use rustc_middle::ty::Ty;
|
|||
use rustc_middle::ty::layout::IntegerExt;
|
||||
use rustc_middle::{bug, ty};
|
||||
use rustc_span::Span;
|
||||
use {rustc_ast as ast, rustc_attr_parsing as attr, rustc_hir as hir};
|
||||
use {rustc_ast as ast, rustc_attr_data_structures as attrs, rustc_hir as hir};
|
||||
|
||||
use crate::LateContext;
|
||||
use crate::context::LintContext;
|
||||
|
|
@ -131,18 +131,18 @@ fn report_bin_hex_error(
|
|||
cx: &LateContext<'_>,
|
||||
hir_id: HirId,
|
||||
span: Span,
|
||||
ty: attr::IntType,
|
||||
ty: attrs::IntType,
|
||||
size: Size,
|
||||
repr_str: String,
|
||||
val: u128,
|
||||
negative: bool,
|
||||
) {
|
||||
let (t, actually) = match ty {
|
||||
attr::IntType::SignedInt(t) => {
|
||||
attrs::IntType::SignedInt(t) => {
|
||||
let actually = if negative { -(size.sign_extend(val)) } else { size.sign_extend(val) };
|
||||
(t.name_str(), actually.to_string())
|
||||
}
|
||||
attr::IntType::UnsignedInt(t) => {
|
||||
attrs::IntType::UnsignedInt(t) => {
|
||||
let actually = size.truncate(val);
|
||||
(t.name_str(), actually.to_string())
|
||||
}
|
||||
|
|
@ -264,7 +264,7 @@ fn lint_int_literal<'tcx>(
|
|||
cx,
|
||||
hir_id,
|
||||
span,
|
||||
attr::IntType::SignedInt(ty::ast_int_ty(t)),
|
||||
attrs::IntType::SignedInt(ty::ast_int_ty(t)),
|
||||
Integer::from_int_ty(cx, t).size(),
|
||||
repr_str,
|
||||
v,
|
||||
|
|
@ -336,7 +336,7 @@ fn lint_uint_literal<'tcx>(
|
|||
cx,
|
||||
hir_id,
|
||||
span,
|
||||
attr::IntType::UnsignedInt(ty::ast_uint_ty(t)),
|
||||
attrs::IntType::UnsignedInt(ty::ast_uint_ty(t)),
|
||||
Integer::from_uint_ty(cx, t).size(),
|
||||
repr_str,
|
||||
lit_val,
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ libloading = "0.8.0"
|
|||
odht = { version = "0.3.1", features = ["nightly"] }
|
||||
rustc_abi = { path = "../rustc_abi" }
|
||||
rustc_ast = { path = "../rustc_ast" }
|
||||
rustc_attr_data_structures = { path = "../rustc_attr_data_structures" }
|
||||
rustc_attr_parsing = { path = "../rustc_attr_parsing" }
|
||||
rustc_data_structures = { path = "../rustc_data_structures" }
|
||||
rustc_errors = { path = "../rustc_errors" }
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ use std::any::Any;
|
|||
use std::mem;
|
||||
use std::sync::Arc;
|
||||
|
||||
use rustc_attr_parsing::Deprecation;
|
||||
use rustc_attr_data_structures::Deprecation;
|
||||
use rustc_hir::def::{CtorKind, DefKind, Res};
|
||||
use rustc_hir::def_id::{CrateNum, DefId, DefIdMap, LOCAL_CRATE};
|
||||
use rustc_hir::definitions::{DefKey, DefPath, DefPathHash};
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ use rustc_span::hygiene::{ExpnIndex, MacroKind, SyntaxContextKey};
|
|||
use rustc_span::{self, ExpnData, ExpnHash, ExpnId, Ident, Span, Symbol};
|
||||
use rustc_target::spec::{PanicStrategy, TargetTuple};
|
||||
use table::TableBuilder;
|
||||
use {rustc_ast as ast, rustc_attr_parsing as attr, rustc_hir as hir};
|
||||
use {rustc_ast as ast, rustc_attr_data_structures as attrs, rustc_hir as hir};
|
||||
|
||||
use crate::creader::CrateMetadataRef;
|
||||
|
||||
|
|
@ -200,7 +200,7 @@ type ExpnHashTable = LazyTable<ExpnIndex, Option<LazyValue<ExpnHash>>>;
|
|||
#[derive(MetadataEncodable, MetadataDecodable)]
|
||||
pub(crate) struct ProcMacroData {
|
||||
proc_macro_decls_static: DefIndex,
|
||||
stability: Option<attr::Stability>,
|
||||
stability: Option<attrs::Stability>,
|
||||
macros: LazyArray<DefIndex>,
|
||||
}
|
||||
|
||||
|
|
@ -422,10 +422,10 @@ define_tables! {
|
|||
safety: Table<DefIndex, hir::Safety>,
|
||||
def_span: Table<DefIndex, LazyValue<Span>>,
|
||||
def_ident_span: Table<DefIndex, LazyValue<Span>>,
|
||||
lookup_stability: Table<DefIndex, LazyValue<attr::Stability>>,
|
||||
lookup_const_stability: Table<DefIndex, LazyValue<attr::ConstStability>>,
|
||||
lookup_default_body_stability: Table<DefIndex, LazyValue<attr::DefaultBodyStability>>,
|
||||
lookup_deprecation_entry: Table<DefIndex, LazyValue<attr::Deprecation>>,
|
||||
lookup_stability: Table<DefIndex, LazyValue<attrs::Stability>>,
|
||||
lookup_const_stability: Table<DefIndex, LazyValue<attrs::ConstStability>>,
|
||||
lookup_default_body_stability: Table<DefIndex, LazyValue<attrs::DefaultBodyStability>>,
|
||||
lookup_deprecation_entry: Table<DefIndex, LazyValue<attrs::Deprecation>>,
|
||||
explicit_predicates_of: Table<DefIndex, LazyValue<ty::GenericPredicates<'static>>>,
|
||||
generics_of: Table<DefIndex, LazyValue<ty::Generics>>,
|
||||
type_of: Table<DefIndex, LazyValue<ty::EarlyBinder<'static, Ty<'static>>>>,
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ use std::num::NonZero;
|
|||
|
||||
use rustc_ast::NodeId;
|
||||
use rustc_attr_data_structures::{
|
||||
self as attr, ConstStability, DefaultBodyStability, DeprecatedSince, Deprecation, Stability,
|
||||
self as attrs, ConstStability, DefaultBodyStability, DeprecatedSince, Deprecation, Stability,
|
||||
};
|
||||
use rustc_data_structures::unord::UnordMap;
|
||||
use rustc_errors::{Applicability, Diag, EmissionGuarantee};
|
||||
|
|
@ -411,7 +411,7 @@ impl<'tcx> TyCtxt<'tcx> {
|
|||
|
||||
match stability {
|
||||
Some(Stability {
|
||||
level: attr::StabilityLevel::Unstable { reason, issue, is_soft, implied_by },
|
||||
level: attrs::StabilityLevel::Unstable { reason, issue, is_soft, implied_by },
|
||||
feature,
|
||||
..
|
||||
}) => {
|
||||
|
|
@ -494,7 +494,7 @@ impl<'tcx> TyCtxt<'tcx> {
|
|||
|
||||
match stability {
|
||||
Some(DefaultBodyStability {
|
||||
level: attr::StabilityLevel::Unstable { reason, issue, is_soft, .. },
|
||||
level: attrs::StabilityLevel::Unstable { reason, issue, is_soft, .. },
|
||||
feature,
|
||||
}) => {
|
||||
if span.allows_unstable(feature) {
|
||||
|
|
@ -643,7 +643,7 @@ impl<'tcx> TyCtxt<'tcx> {
|
|||
|
||||
match stability {
|
||||
Some(ConstStability {
|
||||
level: attr::StabilityLevel::Unstable { reason, issue, is_soft, implied_by, .. },
|
||||
level: attrs::StabilityLevel::Unstable { reason, issue, is_soft, implied_by, .. },
|
||||
feature,
|
||||
..
|
||||
}) => {
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ pulldown-cmark = { version = "0.11", features = ["html"], default-features = fal
|
|||
rustc_arena = { path = "../rustc_arena" }
|
||||
rustc_ast = { path = "../rustc_ast" }
|
||||
rustc_ast_pretty = { path = "../rustc_ast_pretty" }
|
||||
rustc_attr_data_structures = { path = "../rustc_attr_data_structures" }
|
||||
rustc_attr_parsing = { path = "../rustc_attr_parsing" }
|
||||
rustc_data_structures = { path = "../rustc_data_structures" }
|
||||
rustc_errors = { path = "../rustc_errors" }
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ use std::sync::Arc;
|
|||
use rustc_ast::expand::StrippedCfgItem;
|
||||
use rustc_ast::{self as ast, Crate, NodeId, attr};
|
||||
use rustc_ast_pretty::pprust;
|
||||
use rustc_attr_parsing::StabilityLevel;
|
||||
use rustc_attr_data_structures::StabilityLevel;
|
||||
use rustc_data_structures::intern::Interned;
|
||||
use rustc_errors::{Applicability, DiagCtxtHandle, StashKey};
|
||||
use rustc_expand::base::{
|
||||
|
|
|
|||
|
|
@ -5,7 +5,9 @@ use std::{fmt, iter};
|
|||
|
||||
use arrayvec::ArrayVec;
|
||||
use rustc_abi::{ExternAbi, VariantIdx};
|
||||
use rustc_attr_parsing::{AttributeKind, ConstStability, Deprecation, Stability, StableSince};
|
||||
use rustc_attr_data_structures::{
|
||||
AttributeKind, ConstStability, Deprecation, Stability, StableSince,
|
||||
};
|
||||
use rustc_data_structures::fx::{FxHashSet, FxIndexMap, FxIndexSet};
|
||||
use rustc_hir::def::{CtorKind, DefKind, Res};
|
||||
use rustc_hir::def_id::{CrateNum, DefId, LOCAL_CRATE, LocalDefId};
|
||||
|
|
@ -403,13 +405,13 @@ impl Item {
|
|||
// versions; the paths that are exposed through it are "deprecated" because they
|
||||
// were never supposed to work at all.
|
||||
let stab = self.stability(tcx)?;
|
||||
if let rustc_attr_parsing::StabilityLevel::Stable {
|
||||
if let rustc_attr_data_structures::StabilityLevel::Stable {
|
||||
allowed_through_unstable_modules: Some(note),
|
||||
..
|
||||
} = stab.level
|
||||
{
|
||||
Some(Deprecation {
|
||||
since: rustc_attr_parsing::DeprecatedSince::Unspecified,
|
||||
since: rustc_attr_data_structures::DeprecatedSince::Unspecified,
|
||||
note: Some(note),
|
||||
suggestion: None,
|
||||
})
|
||||
|
|
@ -777,9 +779,9 @@ impl Item {
|
|||
// don't want it it `Item::attrs`.
|
||||
None
|
||||
}
|
||||
rustc_hir::Attribute::Parsed(rustc_attr_parsing::AttributeKind::Repr(
|
||||
..,
|
||||
)) => {
|
||||
rustc_hir::Attribute::Parsed(
|
||||
rustc_attr_data_structures::AttributeKind::Repr(..),
|
||||
) => {
|
||||
// We have separate pretty-printing logic for `#[repr(..)]` attributes.
|
||||
// For example, there are circumstances where `#[repr(transparent)]`
|
||||
// is applied but should not be publicly shown in rustdoc
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use std::mem;
|
||||
|
||||
use rustc_attr_parsing::StabilityLevel;
|
||||
use rustc_attr_data_structures::StabilityLevel;
|
||||
use rustc_data_structures::fx::{FxHashMap, FxHashSet, FxIndexMap, FxIndexSet};
|
||||
use rustc_hir::def_id::{CrateNum, DefId, DefIdMap, DefIdSet};
|
||||
use rustc_middle::ty::{self, TyCtxt};
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ use std::slice;
|
|||
|
||||
use itertools::Either;
|
||||
use rustc_abi::ExternAbi;
|
||||
use rustc_attr_parsing::{ConstStability, StabilityLevel, StableSince};
|
||||
use rustc_attr_data_structures::{ConstStability, StabilityLevel, StableSince};
|
||||
use rustc_data_structures::fx::FxHashSet;
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::def::DefKind;
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ use std::{fs, str};
|
|||
|
||||
use askama::Template;
|
||||
use itertools::Either;
|
||||
use rustc_attr_parsing::{
|
||||
use rustc_attr_data_structures::{
|
||||
ConstStability, DeprecatedSince, Deprecation, RustcVersion, StabilityLevel, StableSince,
|
||||
};
|
||||
use rustc_data_structures::fx::{FxHashSet, FxIndexMap, FxIndexSet};
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
use rustc_abi::ExternAbi;
|
||||
use rustc_ast::ast;
|
||||
use rustc_attr_parsing::DeprecatedSince;
|
||||
use rustc_attr_data_structures::{self as attrs, DeprecatedSince};
|
||||
use rustc_hir::def::CtorKind;
|
||||
use rustc_hir::def_id::DefId;
|
||||
use rustc_metadata::rendered_const;
|
||||
|
|
@ -153,8 +153,8 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
pub(crate) fn from_deprecation(deprecation: rustc_attr_parsing::Deprecation) -> Deprecation {
|
||||
let rustc_attr_parsing::Deprecation { since, note, suggestion: _ } = deprecation;
|
||||
pub(crate) fn from_deprecation(deprecation: attrs::Deprecation) -> Deprecation {
|
||||
let attrs::Deprecation { since, note, suggestion: _ } = deprecation;
|
||||
let since = match since {
|
||||
DeprecatedSince::RustcVersion(version) => Some(version.to_string()),
|
||||
DeprecatedSince::Future => Some("TBD".to_owned()),
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ extern crate pulldown_cmark;
|
|||
extern crate rustc_abi;
|
||||
extern crate rustc_ast;
|
||||
extern crate rustc_ast_pretty;
|
||||
extern crate rustc_attr_data_structures;
|
||||
extern crate rustc_attr_parsing;
|
||||
extern crate rustc_data_structures;
|
||||
extern crate rustc_driver;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
//! [`core::error`] module is marked as stable since 1.81.0, so we want to show
|
||||
//! [`core::error::Error`] as stable since 1.81.0 as well.
|
||||
|
||||
use rustc_attr_parsing::{Stability, StabilityLevel};
|
||||
use rustc_attr_data_structures::{Stability, StabilityLevel};
|
||||
use rustc_hir::def_id::CRATE_DEF_ID;
|
||||
|
||||
use crate::clean::{Crate, Item, ItemId, ItemKind};
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ use clippy_config::Conf;
|
|||
use clippy_utils::diagnostics::span_lint_and_help;
|
||||
use clippy_utils::msrvs::{self, Msrv};
|
||||
use rustc_ast::ast::{FloatTy, LitFloatType, LitKind};
|
||||
use rustc_attr_parsing::RustcVersion;
|
||||
use rustc_attr_data_structures::RustcVersion;
|
||||
use rustc_hir::{HirId, Lit};
|
||||
use rustc_lint::{LateContext, LateLintPass};
|
||||
use rustc_session::impl_lint_pass;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
use rustc_attr_parsing::{AttributeKind, ReprAttr, find_attr};
|
||||
use rustc_attr_data_structures::{AttributeKind, ReprAttr, find_attr};
|
||||
use rustc_hir::Attribute;
|
||||
use rustc_lint::LateContext;
|
||||
use rustc_span::Span;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ use clippy_utils::source::SpanRangeExt;
|
|||
use clippy_utils::sugg::Sugg;
|
||||
use clippy_utils::ty::{implements_trait, is_type_diagnostic_item};
|
||||
use rustc_ast::ast::LitKind;
|
||||
use rustc_attr_parsing::RustcVersion;
|
||||
use rustc_attr_data_structures::RustcVersion;
|
||||
use rustc_errors::Applicability;
|
||||
use rustc_hir::intravisit::{FnKind, Visitor, walk_expr};
|
||||
use rustc_hir::{BinOpKind, Body, Expr, ExprKind, FnDecl, UnOp};
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
use clippy_utils::diagnostics::span_lint_and_then;
|
||||
use rustc_attr_parsing::{AttributeKind, ReprAttr, find_attr};
|
||||
use rustc_attr_data_structures::{AttributeKind, ReprAttr, find_attr};
|
||||
use rustc_hir::{HirId, Item, ItemKind};
|
||||
use rustc_lint::{LateContext, LateLintPass};
|
||||
use rustc_middle::ty::layout::LayoutOf;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
use clippy_utils::diagnostics::span_lint_and_then;
|
||||
use rustc_ast::AttrStyle;
|
||||
use rustc_ast::token::CommentKind;
|
||||
use rustc_attr_parsing::AttributeKind;
|
||||
use rustc_attr_data_structures::AttributeKind;
|
||||
use rustc_errors::Applicability;
|
||||
use rustc_hir::Attribute;
|
||||
use rustc_lint::LateContext;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
use rustc_attr_parsing::AttributeKind;
|
||||
use rustc_attr_data_structures::AttributeKind;
|
||||
use rustc_errors::Applicability;
|
||||
use rustc_hir::{Attribute, Item, ItemKind};
|
||||
use rustc_lint::LateContext;
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ use rustc_ast::{
|
|||
FormatArgPosition, FormatArgPositionKind, FormatArgsPiece, FormatArgumentKind, FormatCount, FormatOptions,
|
||||
FormatPlaceholder, FormatTrait,
|
||||
};
|
||||
use rustc_attr_parsing::RustcVersion;
|
||||
use rustc_attr_data_structures::RustcVersion;
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_errors::Applicability;
|
||||
use rustc_errors::SuggestionStyle::{CompletelyHidden, ShowCode};
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ use clippy_config::Conf;
|
|||
use clippy_utils::diagnostics::span_lint;
|
||||
use clippy_utils::is_in_test;
|
||||
use clippy_utils::msrvs::Msrv;
|
||||
use rustc_attr_parsing::{RustcVersion, StabilityLevel, StableSince};
|
||||
use rustc_attr_data_structures::{RustcVersion, StabilityLevel, StableSince};
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_hir::{Expr, ExprKind, HirId, QPath};
|
||||
use rustc_lint::{LateContext, LateLintPass};
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ extern crate rustc_abi;
|
|||
extern crate rustc_arena;
|
||||
extern crate rustc_ast;
|
||||
extern crate rustc_ast_pretty;
|
||||
extern crate rustc_attr_parsing;
|
||||
extern crate rustc_attr_data_structures;
|
||||
extern crate rustc_data_structures;
|
||||
extern crate rustc_driver;
|
||||
extern crate rustc_errors;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ use clippy_config::Conf;
|
|||
use clippy_utils::diagnostics::span_lint_and_then;
|
||||
use clippy_utils::is_from_proc_macro;
|
||||
use clippy_utils::msrvs::Msrv;
|
||||
use rustc_attr_parsing::{StabilityLevel, StableSince};
|
||||
use rustc_attr_data_structures::{StabilityLevel, StableSince};
|
||||
use rustc_errors::Applicability;
|
||||
use rustc_hir::def::Res;
|
||||
use rustc_hir::def_id::DefId;
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
#![allow(clippy::missing_clippy_version_attribute)]
|
||||
|
||||
extern crate rustc_ast;
|
||||
extern crate rustc_attr_data_structures;
|
||||
extern crate rustc_attr_parsing;
|
||||
extern crate rustc_data_structures;
|
||||
extern crate rustc_errors;
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
// (Currently there is no way to opt into sysroot crates without `extern crate`.)
|
||||
extern crate rustc_abi;
|
||||
extern crate rustc_ast;
|
||||
extern crate rustc_attr_data_structures;
|
||||
extern crate rustc_attr_parsing;
|
||||
extern crate rustc_const_eval;
|
||||
extern crate rustc_data_structures;
|
||||
|
|
@ -91,7 +92,7 @@ use std::sync::{Mutex, MutexGuard, OnceLock};
|
|||
use itertools::Itertools;
|
||||
use rustc_abi::Integer;
|
||||
use rustc_ast::ast::{self, LitKind, RangeLimits};
|
||||
use rustc_attr_parsing::{AttributeKind, find_attr};
|
||||
use rustc_attr_data_structures::{AttributeKind, find_attr};
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_data_structures::packed::Pu128;
|
||||
use rustc_data_structures::unhash::UnhashMap;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
use crate::sym;
|
||||
use rustc_ast::Attribute;
|
||||
use rustc_ast::attr::AttributeExt;
|
||||
use rustc_attr_parsing::{RustcVersion, parse_version};
|
||||
use rustc_attr_data_structures::RustcVersion;
|
||||
use rustc_attr_parsing::parse_version;
|
||||
use rustc_lint::LateContext;
|
||||
use rustc_session::Session;
|
||||
use rustc_span::Symbol;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
use crate::msrvs::{self, Msrv};
|
||||
use hir::LangItem;
|
||||
use rustc_attr_parsing::{RustcVersion, StableSince};
|
||||
use rustc_attr_data_structures::{RustcVersion, StableSince};
|
||||
use rustc_const_eval::check_consts::ConstCx;
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::def_id::DefId;
|
||||
|
|
@ -404,7 +404,7 @@ fn is_stable_const_fn(cx: &LateContext<'_>, def_id: DefId, msrv: Msrv) -> bool {
|
|||
.and_then(|trait_def_id| cx.tcx.lookup_const_stability(trait_def_id))
|
||||
})
|
||||
.is_none_or(|const_stab| {
|
||||
if let rustc_attr_parsing::StabilityLevel::Stable { since, .. } = const_stab.level {
|
||||
if let rustc_attr_data_structures::StabilityLevel::Stable { since, .. } = const_stab.level {
|
||||
// Checking MSRV is manually necessary because `rustc` has no such concept. This entire
|
||||
// function could be removed if `rustc` provided a MSRV-aware version of `is_stable_const_fn`.
|
||||
// as a part of an unimplemented MSRV check https://github.com/rust-lang/rust/issues/65262.
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ extern crate tracing;
|
|||
extern crate rustc_abi;
|
||||
extern crate rustc_apfloat;
|
||||
extern crate rustc_ast;
|
||||
extern crate rustc_attr_parsing;
|
||||
extern crate rustc_attr_data_structures;
|
||||
extern crate rustc_const_eval;
|
||||
extern crate rustc_data_structures;
|
||||
extern crate rustc_errors;
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ use rand::rngs::StdRng;
|
|||
use rand::{Rng, SeedableRng};
|
||||
use rustc_abi::{Align, ExternAbi, Size};
|
||||
use rustc_apfloat::{Float, FloatConvert};
|
||||
use rustc_attr_parsing::InlineAttr;
|
||||
use rustc_attr_data_structures::InlineAttr;
|
||||
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
|
||||
#[allow(unused)]
|
||||
use rustc_data_structures::static_assert_size;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue