diff options
| author | Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> | 2023-09-24 10:47:31 +0200 |
|---|---|---|
| committer | Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> | 2023-09-24 10:47:57 +0200 |
| commit | 845a027ddb3750bb841d0676b7eb460b7c1a2f9d (patch) | |
| tree | f3cb68b5ba8e21362964c8433adc3f55ed4a6541 | |
| parent | 073feb5e69c762bffc53e615d2fde844e0d08a92 (diff) | |
| download | rust-845a027ddb3750bb841d0676b7eb460b7c1a2f9d.tar.gz rust-845a027ddb3750bb841d0676b7eb460b7c1a2f9d.zip | |
Add comment about RTN feature gating
| -rw-r--r-- | compiler/rustc_ast_passes/src/feature_gate.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rustc_ast_passes/src/feature_gate.rs b/compiler/rustc_ast_passes/src/feature_gate.rs index 3b80751698b..62dc7ae58a2 100644 --- a/compiler/rustc_ast_passes/src/feature_gate.rs +++ b/compiler/rustc_ast_passes/src/feature_gate.rs @@ -592,6 +592,9 @@ pub fn check_crate(krate: &ast::Crate, sess: &Session, features: &Features) { gate_all_legacy_dont_use!(trait_alias, "trait aliases are experimental"); gate_all_legacy_dont_use!(associated_type_bounds, "associated type bounds are unstable"); + // Despite being a new feature, `where T: Trait<Assoc(): Sized>`, which is RTN syntax now, + // used to be gated under associated_type_bounds, which are right above, so RTN needs to + // be too. gate_all_legacy_dont_use!(return_type_notation, "return type notation is experimental"); gate_all_legacy_dont_use!(decl_macro, "`macro` is experimental"); gate_all_legacy_dont_use!(box_patterns, "box pattern syntax is experimental"); |
