Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 54e4711

Browse files
committedApr 30, 2025·
Implement RFC 3503: frontmatters
Supercedes #137193
1 parent d2eadb7 commit 54e4711

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+958
-22
lines changed
 

‎compiler/rustc_ast_passes/src/feature_gate.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,7 @@ pub fn check_crate(krate: &ast::Crate, sess: &Session, features: &Features) {
514514
gate_all!(contracts_internals, "contract internal machinery is for internal use only");
515515
gate_all!(where_clause_attrs, "attributes in `where` clause are unstable");
516516
gate_all!(super_let, "`super let` is experimental");
517+
gate_all!(frontmatter, "frontmatters are experimental");
517518

518519
if !visitor.features.never_patterns() {
519520
if let Some(spans) = spans.get(&sym::never_patterns) {

‎compiler/rustc_feature/src/unstable.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,8 @@ declare_features! (
506506
(incomplete, fn_delegation, "1.76.0", Some(118212)),
507507
/// Allows impls for the Freeze trait.
508508
(internal, freeze_impls, "1.78.0", Some(121675)),
509+
/// Frontmatter `---` blocks for use by external tools.
510+
(unstable, frontmatter, "CURRENT_RUSTC_VERSION", Some(136889)),
509511
/// Allows defining gen blocks and `gen fn`.
510512
(unstable, gen_blocks, "1.75.0", Some(117078)),
511513
/// Infer generic args for both consts and types.

0 commit comments

Comments
 (0)
Please sign in to comment.