Skip to content

Commit 845a027

Browse files
committedSep 24, 2023
Add comment about RTN feature gating
1 parent 073feb5 commit 845a027

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed
 

‎compiler/rustc_ast_passes/src/feature_gate.rs

+3
Original file line numberDiff line numberDiff line change
@@ -592,6 +592,9 @@ pub fn check_crate(krate: &ast::Crate, sess: &Session, features: &Features) {
592592

593593
gate_all_legacy_dont_use!(trait_alias, "trait aliases are experimental");
594594
gate_all_legacy_dont_use!(associated_type_bounds, "associated type bounds are unstable");
595+
// Despite being a new feature, `where T: Trait<Assoc(): Sized>`, which is RTN syntax now,
596+
// used to be gated under associated_type_bounds, which are right above, so RTN needs to
597+
// be too.
595598
gate_all_legacy_dont_use!(return_type_notation, "return type notation is experimental");
596599
gate_all_legacy_dont_use!(decl_macro, "`macro` is experimental");
597600
gate_all_legacy_dont_use!(box_patterns, "box pattern syntax is experimental");

0 commit comments

Comments
 (0)
Please sign in to comment.