Skip to content

Rollup of 16 pull requests #145728

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 40 commits into from
Aug 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
4983fda
libstd: init(): dup() subsequent /dev/nulls instead of opening them a…
nabijaczleweli Feb 23, 2025
c73cfb8
#[allow(dead_code)]
nabijaczleweli Mar 26, 2025
ac761f2
https://github.com/rust-lang/rust/pull/139717#issuecomment-2799036117 🥴
nabijaczleweli Apr 12, 2025
ca58013
Enable features that are always available in a live system.
pantsman0 Jul 29, 2025
05cd6e8
Add the CRC instructions.
pantsman0 Jul 29, 2025
74c6fdf
c-variadic: multiple ABIs in the same program for arm
folkertdev Jul 27, 2025
7b13a50
Add a method to dump MIR in the middle of MIR building
bjorn3 Aug 1, 2025
695473a
Also dump coverage info
bjorn3 Aug 13, 2025
db0c825
Gate static coroutines behind a parser feature
compiler-errors Aug 19, 2025
812c93e
tidy: Add a check that there are no duplicate runtime dependencies
bjorn3 Aug 20, 2025
30fa518
tidy: Add check against proc macros as standard library dependencies
bjorn3 Aug 20, 2025
609c38d
update some s390x codegen tests
folkertdev Aug 20, 2025
d18d94d
Instantiate higher-ranked binder with erased when checking IntoIterat…
compiler-errors Aug 20, 2025
d41cd48
Migrate `panic_unwind` to use `cfg_select!`
cuviper Aug 20, 2025
95b3b61
Handle `ReEarlyParam` in `type_name`.
nnethercote Aug 21, 2025
a75aed3
Remove MIPS targets from CI LLVM platforms
Gelbpunkt Aug 21, 2025
e073f90
ci: don't cleanup windows disk
marcoieni Aug 21, 2025
b32f4d5
remove an `as` cast in prefetch codegen
folkertdev Aug 21, 2025
377a0c8
Consolidate panicking functions in `slice/index.rs`
Kmeakin Jul 25, 2025
9be8eff
impl IntoDiagArg for AttrPath
jdonszelmann Aug 16, 2025
2158e2d
refactor target checking, move out of context.rs and rename MaybeWarn…
jdonszelmann Aug 16, 2025
9da8541
Introduce a prelude for very common imports across dozens of files
jdonszelmann Aug 16, 2025
becefdd
split up context.rs
jdonszelmann Aug 16, 2025
9bcaa93
update early and late bound docs link
notJoon Aug 21, 2025
0a0553e
Rollup merge of #137494 - nabijaczleweli:dup, r=Mark-Simulacrum
jhpratt Aug 21, 2025
32975fe
Rollup merge of #144541 - folkertdev:c-variadic-same-program-multiple…
jhpratt Aug 21, 2025
057fee9
Rollup merge of #144613 - pantsman0:nintendo_switch_cpu_features, r=w…
jhpratt Aug 21, 2025
cd0972f
Rollup merge of #144780 - bjorn3:mir_build_debug, r=matthewjasper
jhpratt Aug 21, 2025
02deabb
Rollup merge of #145137 - Kmeakin:km/optimize-slice-index-panicking, …
jhpratt Aug 21, 2025
54da040
Rollup merge of #145507 - jdonszelmann:refactor-attr-parsing, r=david…
jhpratt Aug 21, 2025
f49d690
Rollup merge of #145604 - compiler-errors:static-closure, r=fmease
jhpratt Aug 21, 2025
5619a46
Rollup merge of #145648 - bjorn3:tidy_deps_stricter, r=davidtwco
jhpratt Aug 21, 2025
b426cb2
Rollup merge of #145661 - folkertdev:s390x-codegen-test-cleanup, r=di…
jhpratt Aug 21, 2025
268ef7b
Rollup merge of #145672 - compiler-errors:query-instab-ice, r=lcnr
jhpratt Aug 21, 2025
e4d71b8
Rollup merge of #145689 - cuviper:panic_unwind-cfg, r=joshtriplett
jhpratt Aug 21, 2025
cc98a84
Rollup merge of #145700 - nnethercote:fix-145696, r=lcnr
jhpratt Aug 21, 2025
01f353a
Rollup merge of #145703 - Gelbpunkt:ci-llvm-mips, r=Kobzol
jhpratt Aug 21, 2025
0fcf80c
Rollup merge of #145704 - marcoieni:no-windows-disk-cleanup, r=jieyouxu
jhpratt Aug 21, 2025
03fbcdb
Rollup merge of #145705 - folkertdev:prefetch-remove-as-cast, r=RalfJung
jhpratt Aug 21, 2025
7d2993d
Rollup merge of #145712 - notJoon:fix/outdate-link, r=lqd
jhpratt Aug 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,12 @@ jobs:
with:
fetch-depth: 2

# Free up disk space on Linux and Windows by removing preinstalled components that
# Free up disk space on Linux by removing preinstalled components that
# we do not need. We do this to enable some of the less resource
# intensive jobs to run on free runners, which however also have
# less disk space.
- name: free up disk space
run: src/ci/scripts/free-disk-space.sh
run: src/ci/scripts/free-disk-space-linux.sh
if: matrix.free_disk

# If we don't need to free up disk space then just report how much space we have
Expand Down Expand Up @@ -223,11 +223,6 @@ jobs:
cd src/ci/citool
CARGO_INCREMENTAL=0 CARGO_TARGET_DIR=../../../build/citool cargo build

- name: wait for Windows disk cleanup to finish
if: ${{ matrix.free_disk && startsWith(matrix.os, 'windows-') }}
run: |
python3 src/ci/scripts/free-disk-space-windows-wait.py

- name: run the build
run: |
set +e
Expand Down
1 change: 0 additions & 1 deletion Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3481,7 +3481,6 @@ dependencies = [
name = "rustc_attr_parsing"
version = "0.0.0"
dependencies = [
"itertools",
"rustc_abi",
"rustc_ast",
"rustc_ast_pretty",
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_ast_passes/src/feature_gate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,7 @@ pub fn check_crate(krate: &ast::Crate, sess: &Session, features: &Features) {
gate_all!(where_clause_attrs, "attributes in `where` clause are unstable");
gate_all!(super_let, "`super let` is experimental");
gate_all!(frontmatter, "frontmatters are experimental");
gate_all!(coroutines, "coroutine syntax is experimental");

if !visitor.features.never_patterns() {
if let Some(spans) = spans.get(&sym::never_patterns) {
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_attr_parsing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ edition = "2024"

[dependencies]
# tidy-alphabetical-start
itertools = "0.12"
rustc_abi = { path = "../rustc_abi" }
rustc_ast = { path = "../rustc_ast" }
rustc_ast_pretty = { path = "../rustc_ast_pretty" }
Expand Down
10 changes: 1 addition & 9 deletions compiler/rustc_attr_parsing/src/attributes/allow_unstable.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
use std::iter;

use rustc_feature::{AttributeTemplate, template};
use rustc_hir::attrs::AttributeKind;
use rustc_hir::{MethodKind, Target};
use rustc_span::{Span, Symbol, sym};

use super::{CombineAttributeParser, ConvertFn};
use crate::context::MaybeWarn::{Allow, Warn};
use crate::context::{AcceptContext, AllowedTargets, Stage};
use crate::parser::ArgParser;
use super::prelude::*;
use crate::session_diagnostics;

pub(crate) struct AllowInternalUnstableParser;
Expand Down
8 changes: 1 addition & 7 deletions compiler/rustc_attr_parsing/src/attributes/body.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
//! Attributes that can be found in function body.

use rustc_hir::Target;
use rustc_hir::attrs::AttributeKind;
use rustc_span::{Symbol, sym};

use super::{NoArgsAttributeParser, OnDuplicate};
use crate::context::MaybeWarn::Allow;
use crate::context::{AllowedTargets, Stage};
use super::prelude::*;

pub(crate) struct CoroutineParser;

Expand Down
15 changes: 3 additions & 12 deletions compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
use rustc_feature::{AttributeTemplate, template};
use rustc_hir::attrs::{AttributeKind, CoverageAttrKind, OptimizeAttr, UsedBy};
use rustc_hir::{MethodKind, Target};
use rustc_hir::attrs::{CoverageAttrKind, OptimizeAttr, UsedBy};
use rustc_session::parse::feature_err;
use rustc_span::{Span, Symbol, sym};

use super::{
AcceptMapping, AttributeOrder, AttributeParser, CombineAttributeParser, ConvertFn,
NoArgsAttributeParser, OnDuplicate, SingleAttributeParser,
};
use crate::context::MaybeWarn::{Allow, Warn};
use crate::context::{AcceptContext, AllowedTargets, FinalizeContext, Stage};
use crate::parser::ArgParser;

use super::prelude::*;
use crate::session_diagnostics::{NakedFunctionIncompatibleAttribute, NullOnExport};

pub(crate) struct OptimizeParser;
Expand Down
15 changes: 4 additions & 11 deletions compiler/rustc_attr_parsing/src/attributes/confusables.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
use rustc_feature::template;
use rustc_hir::attrs::AttributeKind;
use rustc_hir::{MethodKind, Target};
use rustc_span::{Span, Symbol, sym};
use thin_vec::ThinVec;

use super::{AcceptMapping, AttributeParser};
use crate::context::MaybeWarn::Allow;
use crate::context::{AllowedTargets, FinalizeContext, Stage};
use crate::session_diagnostics;
use super::prelude::*;
use crate::session_diagnostics::EmptyConfusables;

#[derive(Default)]
pub(crate) struct ConfusablesParser {
confusables: ThinVec<Symbol>,
Expand All @@ -25,7 +18,7 @@ impl<S: Stage> AttributeParser<S> for ConfusablesParser {
};

if list.is_empty() {
cx.emit_err(session_diagnostics::EmptyConfusables { span: cx.attr_span });
cx.emit_err(EmptyConfusables { span: cx.attr_span });
}

for param in list.mixed() {
Expand Down
23 changes: 10 additions & 13 deletions compiler/rustc_attr_parsing/src/attributes/deprecation.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
use rustc_feature::{AttributeTemplate, template};
use rustc_hir::attrs::{AttributeKind, DeprecatedSince, Deprecation};
use rustc_hir::{MethodKind, Target};
use rustc_span::{Span, Symbol, sym};
use rustc_hir::attrs::{DeprecatedSince, Deprecation};

use super::prelude::*;
use super::util::parse_version;
use super::{AttributeOrder, OnDuplicate, SingleAttributeParser};
use crate::context::MaybeWarn::{Allow, Error};
use crate::context::{AcceptContext, AllowedTargets, Stage};
use crate::parser::ArgParser;
use crate::session_diagnostics;
use crate::session_diagnostics::{
DeprecatedItemSuggestion, InvalidSince, MissingNote, MissingSince,
};

pub(crate) struct DeprecationParser;

fn get<S: Stage>(
Expand Down Expand Up @@ -102,7 +99,7 @@ impl<S: Stage> SingleAttributeParser<S> for DeprecationParser {
}
Some(name @ sym::suggestion) => {
if !features.deprecated_suggestion() {
cx.emit_err(session_diagnostics::DeprecatedItemSuggestion {
cx.emit_err(DeprecatedItemSuggestion {
span: param.span(),
is_nightly: cx.sess().is_nightly_build(),
details: (),
Expand Down Expand Up @@ -144,18 +141,18 @@ impl<S: Stage> SingleAttributeParser<S> for DeprecationParser {
} else if let Some(version) = parse_version(since) {
DeprecatedSince::RustcVersion(version)
} else {
cx.emit_err(session_diagnostics::InvalidSince { span: cx.attr_span });
cx.emit_err(InvalidSince { span: cx.attr_span });
DeprecatedSince::Err
}
} else if is_rustc {
cx.emit_err(session_diagnostics::MissingSince { span: cx.attr_span });
cx.emit_err(MissingSince { span: cx.attr_span });
DeprecatedSince::Err
} else {
DeprecatedSince::Unspecified
};

if is_rustc && note.is_none() {
cx.emit_err(session_diagnostics::MissingNote { span: cx.attr_span });
cx.emit_err(MissingNote { span: cx.attr_span });
return None;
}

Expand Down
4 changes: 3 additions & 1 deletion compiler/rustc_attr_parsing/src/attributes/dummy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ use rustc_hir::attrs::AttributeKind;
use rustc_span::{Symbol, sym};

use crate::attributes::{AttributeOrder, OnDuplicate, SingleAttributeParser};
use crate::context::{ALL_TARGETS, AcceptContext, AllowedTargets, Stage};
use crate::context::{AcceptContext, Stage};
use crate::parser::ArgParser;
use crate::target_checking::{ALL_TARGETS, AllowedTargets};

pub(crate) struct DummyParser;
impl<S: Stage> SingleAttributeParser<S> for DummyParser {
const PATH: &[Symbol] = &[sym::rustc_dummy];
Expand Down
11 changes: 2 additions & 9 deletions compiler/rustc_attr_parsing/src/attributes/inline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,10 @@
// note: need to model better how duplicate attr errors work when not using
// SingleAttributeParser which is what we have two of here.

use rustc_feature::{AttributeTemplate, template};
use rustc_hir::attrs::{AttributeKind, InlineAttr};
use rustc_hir::lints::AttributeLintKind;
use rustc_hir::{MethodKind, Target};
use rustc_span::{Symbol, sym};

use super::{AcceptContext, AttributeOrder, OnDuplicate};
use crate::attributes::SingleAttributeParser;
use crate::context::MaybeWarn::{Allow, Warn};
use crate::context::{AllowedTargets, Stage};
use crate::parser::ArgParser;
use super::prelude::*;

pub(crate) struct InlineParser;

impl<S: Stage> SingleAttributeParser<S> for InlineParser {
Expand Down
16 changes: 5 additions & 11 deletions compiler/rustc_attr_parsing/src/attributes/link_attrs.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
use rustc_feature::{AttributeTemplate, template};
use rustc_hir::attrs::AttributeKind::{LinkName, LinkOrdinal, LinkSection};
use rustc_hir::attrs::{AttributeKind, Linkage};
use rustc_hir::{MethodKind, Target};
use rustc_span::{Span, Symbol, sym};

use crate::attributes::{
AttributeOrder, NoArgsAttributeParser, OnDuplicate, SingleAttributeParser,
};
use crate::context::MaybeWarn::Allow;
use crate::context::{ALL_TARGETS, AcceptContext, AllowedTargets, Stage, parse_single_integer};
use crate::parser::ArgParser;
use rustc_hir::attrs::Linkage;

use super::prelude::*;
use super::util::parse_single_integer;
use crate::session_diagnostics::{LinkOrdinalOutOfRange, NullOnLinkSection};

pub(crate) struct LinkNameParser;

impl<S: Stage> SingleAttributeParser<S> for LinkNameParser {
Expand Down
7 changes: 1 addition & 6 deletions compiler/rustc_attr_parsing/src/attributes/lint_helpers.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
use rustc_hir::attrs::AttributeKind;
use rustc_hir::{MethodKind, Target};
use rustc_span::{Span, Symbol, sym};
use super::prelude::*;

use crate::attributes::{NoArgsAttributeParser, OnDuplicate};
use crate::context::MaybeWarn::{Allow, Error};
use crate::context::{AllowedTargets, Stage};
pub(crate) struct AsPtrParser;
impl<S: Stage> NoArgsAttributeParser<S> for AsPtrParser {
const PATH: &[Symbol] = &[sym::rustc_as_ptr];
Expand Down
7 changes: 1 addition & 6 deletions compiler/rustc_attr_parsing/src/attributes/loop_match.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
use rustc_hir::Target;
use rustc_hir::attrs::AttributeKind;
use rustc_span::{Span, Symbol, sym};
use super::prelude::*;

use crate::attributes::{NoArgsAttributeParser, OnDuplicate};
use crate::context::MaybeWarn::Allow;
use crate::context::{AllowedTargets, Stage};
pub(crate) struct LoopMatchParser;
impl<S: Stage> NoArgsAttributeParser<S> for LoopMatchParser {
const PATH: &[Symbol] = &[sym::loop_match];
Expand Down
16 changes: 5 additions & 11 deletions compiler/rustc_attr_parsing/src/attributes/macro_attrs.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
use rustc_errors::DiagArgValue;
use rustc_feature::{AttributeTemplate, template};
use rustc_hir::Target;
use rustc_hir::attrs::{AttributeKind, MacroUseArgs};
use rustc_span::{Span, Symbol, sym};
use thin_vec::ThinVec;
use rustc_hir::attrs::MacroUseArgs;

use super::prelude::*;
use crate::session_diagnostics::IllFormedAttributeInputLint;

use crate::attributes::{AcceptMapping, AttributeParser, NoArgsAttributeParser, OnDuplicate};
use crate::context::MaybeWarn::{Allow, Error, Warn};
use crate::context::{AcceptContext, AllowedTargets, FinalizeContext, Stage};
use crate::parser::ArgParser;
use crate::session_diagnostics;
pub(crate) struct MacroEscapeParser;
impl<S: Stage> NoArgsAttributeParser<S> for MacroEscapeParser {
const PATH: &[Symbol] = &[sym::macro_escape];
Expand Down Expand Up @@ -108,7 +102,7 @@ impl<S: Stage> AttributeParser<S> for MacroUseParser {
}
ArgParser::NameValue(_) => {
let suggestions = MACRO_USE_TEMPLATE.suggestions(cx.attr_style, sym::macro_use);
cx.emit_err(session_diagnostics::IllFormedAttributeInputLint {
cx.emit_err(IllFormedAttributeInputLint {
num_suggestions: suggestions.len(),
suggestions: DiagArgValue::StrListSepByAnd(
suggestions.into_iter().map(|s| format!("`{s}`").into()).collect(),
Expand Down
10 changes: 7 additions & 3 deletions compiler/rustc_attr_parsing/src/attributes/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
//! Specifically, you might not care about managing the state of your [`AttributeParser`]
//! state machine yourself. In this case you can choose to implement:
//!
//! - [`SingleAttributeParser`]: makes it easy to implement an attribute which should error if it
//! - [`SingleAttributeParser`](crate::attributes::SingleAttributeParser): makes it easy to implement an attribute which should error if it
//! appears more than once in a list of attributes
//! - [`CombineAttributeParser`]: makes it easy to implement an attribute which should combine the
//! - [`CombineAttributeParser`](crate::attributes::CombineAttributeParser): makes it easy to implement an attribute which should combine the
//! contents of attributes, if an attribute appear multiple times in a list
//!
//! Attributes should be added to `crate::context::ATTRIBUTE_PARSERS` to be parsed.
Expand All @@ -21,9 +21,13 @@ use rustc_hir::attrs::AttributeKind;
use rustc_span::{Span, Symbol};
use thin_vec::ThinVec;

use crate::context::{AcceptContext, AllowedTargets, FinalizeContext, Stage};
use crate::context::{AcceptContext, FinalizeContext, Stage};
use crate::parser::ArgParser;
use crate::session_diagnostics::UnusedMultiple;
use crate::target_checking::AllowedTargets;

/// All the parsers require roughly the same imports, so this prelude has most of the often-needed ones.
mod prelude;

pub(crate) mod allow_unstable;
pub(crate) mod body;
Expand Down
14 changes: 4 additions & 10 deletions compiler/rustc_attr_parsing/src/attributes/must_use.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
use rustc_errors::DiagArgValue;
use rustc_feature::{AttributeTemplate, template};
use rustc_hir::attrs::AttributeKind;
use rustc_hir::{MethodKind, Target};
use rustc_span::{Symbol, sym};

use crate::attributes::{AttributeOrder, OnDuplicate, SingleAttributeParser};
use crate::context::MaybeWarn::{Allow, Error};
use crate::context::{AcceptContext, AllowedTargets, Stage};
use crate::parser::ArgParser;
use crate::session_diagnostics;
use super::prelude::*;
use crate::session_diagnostics::IllFormedAttributeInputLint;

pub(crate) struct MustUseParser;

impl<S: Stage> SingleAttributeParser<S> for MustUseParser {
Expand Down Expand Up @@ -53,7 +47,7 @@ impl<S: Stage> SingleAttributeParser<S> for MustUseParser {
ArgParser::List(_) => {
let suggestions = <Self as SingleAttributeParser<S>>::TEMPLATE
.suggestions(cx.attr_style, "must_use");
cx.emit_err(session_diagnostics::IllFormedAttributeInputLint {
cx.emit_err(IllFormedAttributeInputLint {
num_suggestions: suggestions.len(),
suggestions: DiagArgValue::StrListSepByAnd(
suggestions.into_iter().map(|s| format!("`{s}`").into()).collect(),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
use rustc_hir::Target;
use rustc_hir::attrs::AttributeKind;
use rustc_span::{Span, sym};
use super::prelude::*;

use crate::attributes::{NoArgsAttributeParser, OnDuplicate};
use crate::context::MaybeWarn::Allow;
use crate::context::{AllowedTargets, Stage};
pub(crate) struct NoImplicitPreludeParser;

impl<S: Stage> NoArgsAttributeParser<S> for NoImplicitPreludeParser {
Expand Down
6 changes: 4 additions & 2 deletions compiler/rustc_attr_parsing/src/attributes/non_exhaustive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ use rustc_hir::attrs::AttributeKind;
use rustc_span::{Span, Symbol, sym};

use crate::attributes::{NoArgsAttributeParser, OnDuplicate};
use crate::context::MaybeWarn::{Allow, Warn};
use crate::context::{AllowedTargets, Stage};
use crate::context::Stage;
use crate::target_checking::AllowedTargets;
use crate::target_checking::Policy::{Allow, Warn};

pub(crate) struct NonExhaustiveParser;

impl<S: Stage> NoArgsAttributeParser<S> for NonExhaustiveParser {
Expand Down
9 changes: 1 addition & 8 deletions compiler/rustc_attr_parsing/src/attributes/path.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
use rustc_feature::{AttributeTemplate, template};
use rustc_hir::Target;
use rustc_hir::attrs::AttributeKind;
use rustc_span::{Symbol, sym};
use super::prelude::*;

use crate::attributes::{AttributeOrder, OnDuplicate, SingleAttributeParser};
use crate::context::MaybeWarn::{Allow, Error};
use crate::context::{AcceptContext, AllowedTargets, Stage};
use crate::parser::ArgParser;
pub(crate) struct PathParser;

impl<S: Stage> SingleAttributeParser<S> for PathParser {
Expand Down
20 changes: 20 additions & 0 deletions compiler/rustc_attr_parsing/src/attributes/prelude.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// parsing
// templates
pub(super) use rustc_feature::{AttributeTemplate, template};
// data structures
pub(super) use rustc_hir::attrs::AttributeKind;
pub(super) use rustc_hir::lints::AttributeLintKind;
pub(super) use rustc_hir::{MethodKind, Target};
pub(super) use rustc_span::{DUMMY_SP, Ident, Span, Symbol, sym};
pub(super) use thin_vec::ThinVec;

pub(super) use crate::attributes::{
AcceptMapping, AttributeOrder, AttributeParser, CombineAttributeParser, ConvertFn,
NoArgsAttributeParser, OnDuplicate, SingleAttributeParser,
};
// contexts
pub(super) use crate::context::{AcceptContext, FinalizeContext, Stage};
pub(super) use crate::parser::*;
// target checking
pub(super) use crate::target_checking::Policy::{Allow, Error, Warn};
pub(super) use crate::target_checking::{ALL_TARGETS, AllowedTargets};
Loading
Loading