Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
baed55c
Remove unreachable unsized arg handling in `store_fn_arg/store_arg` i…
zachs18 Sep 12, 2025
619a696
clean up issue-2284 (core marker trait name shadowing)
omskscream Sep 13, 2025
05a5c7d
clean up issue-19479 (assoc type from another trait)
omskscream Sep 13, 2025
8ee3a08
clean up issue-18088 (operator from supertrait)
omskscream Sep 13, 2025
22aecd3
clean up issue-21950 (dyn trait cast without assoc type at the cast)
omskscream Sep 13, 2025
1991779
Make llvm_enzyme a regular cargo feature
bjorn3 Sep 15, 2025
929c933
Add parallel-frontend-threads to bootstrap.toml and enable multi-thre…
Hayden602 Sep 9, 2025
b79a4bf
Do not use `git -C dir`
samueltardieu Sep 16, 2025
b2b43b2
Add space after brace in `Box<[T]>::new_uninit_slice` example
XrXr Sep 17, 2025
205189c
port `#[rustc_coherence_is_core]` to the new attribute parsing infras…
jdonszelmann Aug 24, 2025
0a2be63
Rollup merge of #146458 - Hayden602:bootstrap, r=Kobzol
jdonszelmann Sep 17, 2025
802343f
Rollup merge of #146485 - zachs18:store_fn_arg-no-unsized, r=davidtwco
jdonszelmann Sep 17, 2025
1c1d5c7
Rollup merge of #146536 - omskscream:#133895/clean-ui-tests, r=davidtwco
jdonszelmann Sep 17, 2025
9303a92
Rollup merge of #146598 - bjorn3:feature_llvm_enzyme, r=davidtwco
jdonszelmann Sep 17, 2025
be8c29c
Rollup merge of #146647 - jdonszelmann:move-coherence-is-core, r=urgau
jdonszelmann Sep 17, 2025
b8a80e4
Rollup merge of #146654 - samueltardieu:issue142534, r=Kobzol
jdonszelmann Sep 17, 2025
c6ed4c0
Rollup merge of #146681 - XrXr:patch-1, r=joboet
jdonszelmann Sep 17, 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
Prev Previous commit
Next Next commit
port #[rustc_coherence_is_core] to the new attribute parsing infras…
…tructure
  • Loading branch information
jdonszelmann committed Sep 17, 2025
commit 205189c8c767b3910a630f79b156417b82b3558b
9 changes: 9 additions & 0 deletions compiler/rustc_attr_parsing/src/attributes/crate_level.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,3 +174,12 @@ impl<S: Stage> NoArgsAttributeParser<S> for NoStdParser {
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::CrateLevel;
const CREATE: fn(Span) -> AttributeKind = AttributeKind::NoStd;
}

pub(crate) struct RustcCoherenceIsCoreParser;

impl<S: Stage> NoArgsAttributeParser<S> for RustcCoherenceIsCoreParser {
const PATH: &[Symbol] = &[sym::rustc_coherence_is_core];
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error;
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::CrateLevel;
const CREATE: fn(Span) -> AttributeKind = AttributeKind::RustcCoherenceIsCore;
}
8 changes: 0 additions & 8 deletions compiler/rustc_attr_parsing/src/attributes/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,14 +149,6 @@ impl<S: Stage> NoArgsAttributeParser<S> for AllowIncoherentImplParser {
const CREATE: fn(Span) -> AttributeKind = AttributeKind::AllowIncoherentImpl;
}

pub(crate) struct CoherenceIsCoreParser;
impl<S: Stage> NoArgsAttributeParser<S> for CoherenceIsCoreParser {
const PATH: &[Symbol] = &[sym::rustc_coherence_is_core];
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error;
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::CrateLevel;
const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::CoherenceIsCore;
}

pub(crate) struct FundamentalParser;
impl<S: Stage> NoArgsAttributeParser<S> for FundamentalParser {
const PATH: &[Symbol] = &[sym::fundamental];
Expand Down
12 changes: 6 additions & 6 deletions compiler/rustc_attr_parsing/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ use crate::attributes::codegen_attrs::{
use crate::attributes::confusables::ConfusablesParser;
use crate::attributes::crate_level::{
CrateNameParser, MoveSizeLimitParser, NoCoreParser, NoStdParser, PatternComplexityLimitParser,
RecursionLimitParser, TypeLengthLimitParser,
RecursionLimitParser, RustcCoherenceIsCoreParser, TypeLengthLimitParser,
};
use crate::attributes::deprecation::DeprecationParser;
use crate::attributes::dummy::DummyParser;
Expand Down Expand Up @@ -61,10 +61,10 @@ use crate::attributes::stability::{
};
use crate::attributes::test_attrs::{IgnoreParser, ShouldPanicParser};
use crate::attributes::traits::{
AllowIncoherentImplParser, CoherenceIsCoreParser, CoinductiveParser, ConstTraitParser,
DenyExplicitImplParser, DoNotImplementViaObjectParser, FundamentalParser, MarkerParser,
ParenSugarParser, PointeeParser, SkipDuringMethodDispatchParser, SpecializationTraitParser,
TypeConstParser, UnsafeSpecializationMarkerParser,
AllowIncoherentImplParser, CoinductiveParser, ConstTraitParser, DenyExplicitImplParser,
DoNotImplementViaObjectParser, FundamentalParser, MarkerParser, ParenSugarParser,
PointeeParser, SkipDuringMethodDispatchParser, SpecializationTraitParser, TypeConstParser,
UnsafeSpecializationMarkerParser,
};
use crate::attributes::transparency::TransparencyParser;
use crate::attributes::{AttributeParser as _, Combine, Single, WithoutArgs};
Expand Down Expand Up @@ -206,7 +206,6 @@ attribute_parsers!(
Single<WithoutArgs<AllowInternalUnsafeParser>>,
Single<WithoutArgs<AsPtrParser>>,
Single<WithoutArgs<AutomaticallyDerivedParser>>,
Single<WithoutArgs<CoherenceIsCoreParser>>,
Single<WithoutArgs<CoinductiveParser>>,
Single<WithoutArgs<ColdParser>>,
Single<WithoutArgs<ConstContinueParser>>,
Expand Down Expand Up @@ -234,6 +233,7 @@ attribute_parsers!(
Single<WithoutArgs<ProcMacroAttributeParser>>,
Single<WithoutArgs<ProcMacroParser>>,
Single<WithoutArgs<PubTransparentParser>>,
Single<WithoutArgs<RustcCoherenceIsCoreParser>>,
Single<WithoutArgs<SpecializationTraitParser>>,
Single<WithoutArgs<StdInternalSymbolParser>>,
Single<WithoutArgs<TrackCallerParser>>,
Expand Down
6 changes: 3 additions & 3 deletions compiler/rustc_hir/src/attrs/data_structures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -444,9 +444,6 @@ pub enum AttributeKind {
span: Span,
},

/// Represents `#[rustc_coherence_is_core]`.
CoherenceIsCore,

/// Represents `#[rustc_coinductive]`.
Coinductive(Span),

Expand Down Expand Up @@ -639,6 +636,9 @@ pub enum AttributeKind {
/// Represents `#[rustc_builtin_macro]`.
RustcBuiltinMacro { builtin_name: Option<Symbol>, helper_attrs: ThinVec<Symbol>, span: Span },

/// Represents `#[rustc_coherence_is_core]`
RustcCoherenceIsCore(Span),

/// Represents `#[rustc_layout_scalar_valid_range_end]`.
RustcLayoutScalarValidRangeEnd(Box<u128>, Span),

Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_hir/src/attrs/encode_cross_crate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ impl AttributeKind {
AsPtr(..) => Yes,
AutomaticallyDerived(..) => Yes,
BodyStability { .. } => No,
CoherenceIsCore => No,
Coinductive(..) => No,
Cold(..) => No,
Confusables { .. } => Yes,
Expand Down Expand Up @@ -84,6 +83,7 @@ impl AttributeKind {
RecursionLimit { .. } => No,
Repr { .. } => No,
RustcBuiltinMacro { .. } => Yes,
RustcCoherenceIsCore(..) => No,
RustcLayoutScalarValidRangeEnd(..) => Yes,
RustcLayoutScalarValidRangeStart(..) => Yes,
RustcObjectLifetimeDefault => No,
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_middle/src/hir/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ impl<'tcx> TyCtxt<'tcx> {
}

pub fn hir_rustc_coherence_is_core(self) -> bool {
find_attr!(self.hir_krate_attrs(), AttributeKind::CoherenceIsCore)
find_attr!(self.hir_krate_attrs(), AttributeKind::RustcCoherenceIsCore(..))
}

pub fn hir_get_module(self, module: LocalModDefId) -> (&'tcx Mod<'tcx>, Span, HirId) {
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_passes/src/check_attr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,6 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
| AttributeKind::Repr { .. }
| AttributeKind::Cold(..)
| AttributeKind::ExportName { .. }
| AttributeKind::CoherenceIsCore
| AttributeKind::Fundamental
| AttributeKind::Optimize(..)
| AttributeKind::LinkSection { .. }
Expand Down Expand Up @@ -278,6 +277,7 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
| AttributeKind::NoStd { .. }
| AttributeKind::ObjcClass { .. }
| AttributeKind::ObjcSelector { .. }
| AttributeKind::RustcCoherenceIsCore(..)
) => { /* do nothing */ }
Attribute::Unparsed(attr_item) => {
style = Some(attr_item.style);
Expand Down
Loading