From fe7b3de4733bbce731208b906cfd9441a3662504 Mon Sep 17 00:00:00 2001 From: Bill Wagner Date: Thu, 12 Jun 2025 11:38:53 -0400 Subject: [PATCH 1/4] Remove feature specs for merged standard The ECMA committee merged the feature PRs for "async streams" and "null-coalescing assignment" at the June 11 meeting. It's time to unpublish those feature specifications. --- docfx.json | 6 ++---- docs/csharp/specification/toc.yml | 4 ---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/docfx.json b/docfx.json index 55135a76a5f28..67f7271bc270f 100644 --- a/docfx.json +++ b/docfx.json @@ -81,6 +81,8 @@ "csharp-8.0/nullable-reference-types-specification.md", "csharp-8.0/nested-stackalloc.md", "csharp-8.0/readonly-instance-members.md", + "csharp-8.0/null-coalescing-assignment.md", + "csharp-8.0/async-streams.md", "csharp-9.0/nullable-reference-types-specification.md", "csharp-9.0/nullable-constructor-analysis.md", "csharp-9.0/nullable-parameter-default-value-analysis.md", @@ -618,10 +620,8 @@ "_csharpstandard/standard/Bibliography.md": "Bibliography", "_csharplang/proposals/csharp-8.0/patterns.md": "Recursive pattern matching", "_csharplang/proposals/csharp-8.0/default-interface-methods.md": "Default interface methods", - "_csharplang/proposals/csharp-8.0/async-streams.md": "Async streams", "_csharplang/proposals/csharp-8.0/ranges.md": "Ranges and indices", "_csharplang/proposals/csharp-8.0/using.md": "Pattern based using and using declarations", - "_csharplang/proposals/csharp-8.0/null-coalescing-assignment.md": "Null coalescing assignment", "_csharplang/proposals/csharp-9.0/covariant-returns.md": "Covariant return types", "_csharplang/proposals/csharp-9.0/extending-partial-methods.md": "Extending partial methods", "_csharplang/proposals/csharp-9.0/extension-getenumerator.md": "Extension GetEnumerator support in foreach", @@ -744,10 +744,8 @@ "_csharpstandard/standard/Bibliography.md": "This appendix lists external standards referenced in this specification.", "_csharplang/proposals/csharp-8.0/patterns.md": "This feature specification describes recursive pattern matching, where patterns can nest inside other patterns.", "_csharplang/proposals/csharp-8.0/default-interface-methods.md": "This feature specification describe the syntax updates necessary to support default interface methods. This includes declaring bodies in interface declarations, and supporting modifiers on declarations.", - "_csharplang/proposals/csharp-8.0/async-streams.md": "This feature specification describes async streams, which return streams of data asynchronously, typically as each element is produced or available.", "_csharplang/proposals/csharp-8.0/ranges.md": "This feature specification describes the syntax for ranges and indices, which support indexing individual elements of a sequence or a range of a sequence from the start or end of that sequence.", "_csharplang/proposals/csharp-8.0/using.md": "This feature specification supports pattern based using and using declarations to simplify resource cleanup.", - "_csharplang/proposals/csharp-8.0/null-coalescing-assignment.md": "This feature specification describes the syntax to support null coalescing assignment expressions using the '??=' operator.", "_csharplang/proposals/csharp-9.0/covariant-returns.md": "This feature specification describes covariant return types, where overriding member declarations can return a type derived from the overridden member declaration.", "_csharplang/proposals/csharp-9.0/extending-partial-methods.md": "This feature specification describes extensions to partial methods. These extensions enable source generators to create or call partial methods.", "_csharplang/proposals/csharp-9.0/extension-getenumerator.md": "This feature specification describes the necessary pattern for an extension method to provide the GetEnumerator support in a foreach loop.", diff --git a/docs/csharp/specification/toc.yml b/docs/csharp/specification/toc.yml index 3b5d5fba4fb42..07cf8f7ecb578 100644 --- a/docs/csharp/specification/toc.yml +++ b/docs/csharp/specification/toc.yml @@ -135,8 +135,6 @@ items: items: - name: Ranges href: ../../../_csharplang/proposals/csharp-8.0/ranges.md - - name: Null coalescing assignment - href: ../../../_csharplang/proposals/csharp-8.0/null-coalescing-assignment.md - name: Target-typed new expressions href: ../../../_csharplang/proposals/csharp-9.0/target-typed-new.md - name: Target-typed conditional expression @@ -187,8 +185,6 @@ items: href: ../../../_csharplang/proposals/csharp-9.0/local-function-attributes.md - name: Pattern based using and using declarations href: ../../../_csharplang/proposals/csharp-8.0/using.md - - name: Async streams - href: ../../../_csharplang/proposals/csharp-8.0/async-streams.md - name: Lock object semantics href: ../../../_csharplang/proposals/csharp-13.0/lock-object.md - name: Allow `ref` and `unsafe` From 1357f6a18ea74ed75e7d3f7c447c957e4993f700 Mon Sep 17 00:00:00 2001 From: Bill Wagner Date: Thu, 12 Jun 2025 11:56:40 -0400 Subject: [PATCH 2/4] add redirections --- .openpublishing.redirection.csharp.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.openpublishing.redirection.csharp.json b/.openpublishing.redirection.csharp.json index 93c2caf46fced..58d4498e7b703 100644 --- a/.openpublishing.redirection.csharp.json +++ b/.openpublishing.redirection.csharp.json @@ -120,6 +120,14 @@ "source_path_from_root": "/redirections/proposals/csharp-8.0/readonly-instance-members.md", "redirect_url": "/dotnet/csharp/language-reference/language-specification/structs#16411-properties" }, + { + "source_path_from_root": "/redirections/proposals/csharp-8.0/null-coalescing-assignment.md", + "redirect_url": "/dotnet/csharp/language-reference/language-specification/expressions#1221-assignment-operators" + }, + { + "source_path_from_root": "/redirections/proposals/csharp-8.0/async-streams.md", + "redirect_url": "/dotnet/csharp/language-reference/language-specification/statements.md#13953-await-foreach" + }, { "source_path_from_root": "/redirections/proposals/csharp-9.0/nullable-reference-types-specification.md", "redirect_url": "/dotnet/csharp/language-reference/language-specification/types.md#893-nullable-reference-types" From 030264f0158611db665edc919b687ccb7499fca0 Mon Sep 17 00:00:00 2001 From: Bill Wagner Date: Thu, 12 Jun 2025 12:53:29 -0400 Subject: [PATCH 3/4] fix renumbering warnings. --- docs/csharp/asynchronous-programming/async-return-types.md | 2 +- docs/csharp/programming-guide/concepts/iterators.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/csharp/asynchronous-programming/async-return-types.md b/docs/csharp/asynchronous-programming/async-return-types.md index 684e850ba6251..140ace1bed4d3 100644 --- a/docs/csharp/asynchronous-programming/async-return-types.md +++ b/docs/csharp/asynchronous-programming/async-return-types.md @@ -71,7 +71,7 @@ The following example shows the behavior of an async event handler. In the examp ## Generalized async return types and ValueTask\ -An async method can return any type that has an accessible `GetAwaiter` method that returns an instance of an *awaiter type*. In addition, the type returned from the `GetAwaiter` method must have the attribute. You can learn more in the article on [Attributes read by the compiler](../language-reference/attributes/general.md#asyncmethodbuilder-attribute) or the C# spec for the [Task type builder pattern](~/_csharpstandard/standard/classes.md#15152-task-type-builder-pattern). +An async method can return any type that has an accessible `GetAwaiter` method that returns an instance of an *awaiter type*. In addition, the type returned from the `GetAwaiter` method must have the attribute. You can learn more in the article on [Attributes read by the compiler](../language-reference/attributes/general.md#asyncmethodbuilder-attribute) or the C# spec for the [Task type builder pattern](~/_csharpstandard/standard/classes.md#15142-task-type-builder-pattern). This feature is the complement to [awaitable expressions](~/_csharpstandard/standard/expressions.md#12982-awaitable-expressions), which describes the requirements for the operand of `await`. Generalized async return types enable the compiler to generate `async` methods that return different types. Generalized async return types enabled performance improvements in the .NET libraries. Because and are reference types, memory allocation in performance-critical paths, particularly when allocations occur in tight loops, can adversely affect performance. Support for generalized return types means that you can return a lightweight value type instead of a reference type to avoid more memory allocations. diff --git a/docs/csharp/programming-guide/concepts/iterators.md b/docs/csharp/programming-guide/concepts/iterators.md index 9dd939d0a9821..b03ff01b93bba 100644 --- a/docs/csharp/programming-guide/concepts/iterators.md +++ b/docs/csharp/programming-guide/concepts/iterators.md @@ -337,7 +337,7 @@ On each successive iteration of the `foreach` loop (or the direct call to `IEnum Iterators don't support the method. To reiterate from the start, you must obtain a new iterator. Calling on the iterator returned by an iterator method throws a . -For additional information, see the [C# Language Specification](~/_csharpstandard/standard/classes.md#1514-iterators). +For additional information, see the [C# Language Specification](~/_csharpstandard/standard/classes.md#1515-iterators). ## Use of Iterators From 5ca33f928a6d95334940af1efb932ab7418d7509 Mon Sep 17 00:00:00 2001 From: Bill Wagner Date: Thu, 12 Jun 2025 14:24:32 -0400 Subject: [PATCH 4/4] build warning --- docs/csharp/programming-guide/concepts/iterators.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/csharp/programming-guide/concepts/iterators.md b/docs/csharp/programming-guide/concepts/iterators.md index b03ff01b93bba..c7dd488d31b59 100644 --- a/docs/csharp/programming-guide/concepts/iterators.md +++ b/docs/csharp/programming-guide/concepts/iterators.md @@ -337,7 +337,7 @@ On each successive iteration of the `foreach` loop (or the direct call to `IEnum Iterators don't support the method. To reiterate from the start, you must obtain a new iterator. Calling on the iterator returned by an iterator method throws a . -For additional information, see the [C# Language Specification](~/_csharpstandard/standard/classes.md#1515-iterators). +For additional information, see the [C# Language Specification](~/_csharpstandard/standard/classes.md#1515-synchronous-and-asynchronous-iterators). ## Use of Iterators