Skip to content

Commit 2c6c680

Browse files
committed
Run section renumber tool
1 parent d56fe61 commit 2c6c680

20 files changed

Lines changed: 595 additions & 438 deletions

standard/README.md

Lines changed: 110 additions & 79 deletions
Large diffs are not rendered by default.

standard/arrays.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ When an array type `S[]` implements `IList<T>`, some of the members of the imple
102102
103103
## 17.3 Array creation
104104
105-
Array instances are created by *array_creation_expression*s ([§12.8.17.4](expressions.md#128174-array-creation-expressions)) or by field or local variable declarations that include an *array_initializer* ([§17.7](arrays.md#177-array-initializers)). Array instances can also be created implicitly as part of evaluating an argument list involving a parameter array ([§15.6.2.4](classes.md#15624-parameter-arrays)).
105+
Array instances are created by *array_creation_expression*s ([§12.8.17.5](expressions.md#128175-array-creation-expressions)) or by field or local variable declarations that include an *array_initializer* ([§17.7](arrays.md#177-array-initializers)). Array instances can also be created implicitly as part of evaluating an argument list involving a parameter array ([§15.6.2.4](classes.md#15624-parameter-arrays)).
106106
107107
When an array instance is created, the rank and length of each dimension are established and then remain constant for the entire lifetime of the instance. In other words, it is not possible to change the rank of an existing array instance, nor is it possible to resize its dimensions.
108108
@@ -126,7 +126,7 @@ Every array type inherits the members declared by the `System.Array` type.
126126
127127
For any two *reference_type*s `A` and `B`, if an implicit reference conversion ([§10.2.8](conversions.md#1028-implicit-reference-conversions)) or explicit reference conversion ([§10.3.5](conversions.md#1035-explicit-reference-conversions)) exists from `A` to `B`, then the same reference conversion also exists from the array type `A[R]` to the array type `B[R]`, where `R` is any given *rank_specifier* (but the same for both array types). This relationship is known as ***array covariance***. Array covariance, in particular, means that a value of an array type `A[R]` might actually be a reference to an instance of an array type `B[R]`, provided an implicit reference conversion exists from `B` to `A`.
128128
129-
Because of array covariance, assignments to elements of reference type arrays include a run-time check which ensures that the value being assigned to the array element is actually of a permitted type ([§12.23.2](expressions.md#12232-simple-assignment)).
129+
Because of array covariance, assignments to elements of reference type arrays include a run-time check which ensures that the value being assigned to the array element is actually of a permitted type ([§12.24.2](expressions.md#12242-simple-assignment)).
130130
131131
> *Example*:
132132
>
@@ -160,7 +160,7 @@ Array covariance specifically does not extend to arrays of *value_type*s. For ex
160160
161161
## 17.7 Array initializers
162162
163-
Array initializers may be specified in field declarations ([§15.5](classes.md#155-fields)), local variable declarations ([§13.6.2](statements.md#1362-local-variable-declarations)), and array creation expressions ([§12.8.17.4](expressions.md#128174-array-creation-expressions)):
163+
Array initializers may be specified in field declarations ([§15.5](classes.md#155-fields)), local variable declarations ([§13.6.2](statements.md#1362-local-variable-declarations)), and array creation expressions ([§12.8.17.5](expressions.md#128175-array-creation-expressions)):
164164
165165
```ANTLR
166166
array_initializer

standard/attributes.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ A number of attributes affect the language in some way. These attributes include
496496
- `System.Runtime.CompilerServices.AsyncMethodBuilderAttribute` ([§23.5.5](attributes.md#2355-the-asyncmethodbuilder-attribute)), which is used to establish a task builder for an async method.
497497
- `System.Runtime.CompilerServices.CallerLineNumberAttribute` ([§23.5.6.2](attributes.md#23562-the-callerlinenumber-attribute)), `System.Runtime.CompilerServices.CallerFilePathAttribute` ([§23.5.6.3](attributes.md#23563-the-callerfilepath-attribute)), and `System.Runtime.CompilerServices.CallerMemberNameAttribute` ([§23.5.6.4](attributes.md#23564-the-callermembername-attribute)), which are used to supply information about the calling context to optional parameters.
498498
- `System.Runtime.CompilerServices.EnumeratorCancellationAttribute` ([§23.5.8](attributes.md#2358-the-enumeratorcancellation-attribute)), which is used to specify parameter for the cancellation token in an asynchronous iterator.
499-
- `System.Runtime.CompilerServices.ModuleInitializer` (§module-init-attr), which is used to mark a method as a module initializer.
499+
- `System.Runtime.CompilerServices.ModuleInitializer` ([§23.5.9](attributes.md#2359-the-moduleinitializer-attribute)), which is used to mark a method as a module initializer.
500500
501501
The Nullable static analysis attributes ([§23.5.7](attributes.md#2357-code-analysis-attributes)) can improve the correctness of warnings generated for nullabilities and null states ([§8.9.5](types.md#895-nullabilities-and-null-states)).
502502
@@ -668,13 +668,13 @@ The use of conditional methods in an inheritance chain can be confusing. Calls m
668668
>
669669
> *end example*
670670
671-
#### §conditional-local-function Conditional local functions
671+
#### 23.5.3.3 Conditional local functions
672672
673673
A local function may be made conditional in the same sense as a conditional method ([§23.5.3.2](attributes.md#23532-conditional-methods)).
674674
675675
A conditional local function shall have the modifier `static`.
676676
677-
#### 23.5.3.3 Conditional attribute classes
677+
#### 23.5.3.4 Conditional attribute classes
678678
679679
An attribute class ([§23.2](attributes.md#232-attribute-classes)) decorated with one or more `Conditional` attributes is a conditional attribute class. A conditional attribute class is thus associated with the conditional compilation symbols declared in its `Conditional` attributes.
680680
@@ -829,7 +829,7 @@ The file path may be affected by `#line` directives ([§6.5.8](lexical-structure
829829
830830
The attribute `System.Runtime.CompilerServices.CallerMemberNameAttribute` is allowed on optional parameters when there is a standard implicit conversion ([§10.4.2](conversions.md#1042-standard-implicit-conversions)) from `string` to the parameter’s type.
831831
832-
If a function invocation from a location within the body of a function member or within an attribute applied to the function member itself or its return type, parameters or type parameters in source code omits an optional parameter with the `CallerMemberNameAttribute`, then a string literal representing the name of that member is used as an argument to the invocation instead of the default parameter value. (In the case of a function invocation from a top-level statement (§top-level-statements), the member name is that generated by the implementation.)
832+
If a function invocation from a location within the body of a function member or within an attribute applied to the function member itself or its return type, parameters or type parameters in source code omits an optional parameter with the `CallerMemberNameAttribute`, then a string literal representing the name of that member is used as an argument to the invocation instead of the default parameter value. (In the case of a function invocation from a top-level statement ([§7.1.3](basic-concepts.md#713-using-top-level-statements)), the member name is that generated by the implementation.)
833833
834834
For invocations that occur within generic methods, only the method name itself is used, without the type parameter list.
835835
@@ -858,12 +858,12 @@ The code-analysis attributes are declared in namespace `System.Diagnostics.CodeA
858858
`AllowNull` ([§23.5.7.2](attributes.md#23572-the-allownull-attribute)) | A non-nullable argument may be null.
859859
`DisallowNull` ([§23.5.7.3](attributes.md#23573-the-disallownull-attribute)) | A nullable argument should never be null.
860860
`MaybeNull` ([§23.5.7.6](attributes.md#23576-the-maybenull-attribute)) | A non-nullable return value may be null.
861-
`NotNull` ([§23.5.7.8](attributes.md#23578-the-notnull-attribute)) | A nullable return value will never be null.
861+
`NotNull` ([§23.5.7.10](attributes.md#235710-the-notnull-attribute)) | A nullable return value will never be null.
862862
`MaybeNullWhen` ([§23.5.7.7](attributes.md#23577-the-maybenullwhen-attribute)) | A non-nullable argument may be null when the method returns the specified `bool` value.
863-
`NotNullWhen` ([§23.5.7.10](attributes.md#235710-the-notnullwhen-attribute)) | A nullable argument won't be null when the method returns the specified `bool` value.
864-
`NotNullIfNotNull` ([§23.5.7.9](attributes.md#23579-the-notnullifnotnull-attribute)) | A return value isn't null if the argument for the specified parameter isn't null.
865-
`MemberNotNull` (§membernotnull-attribute) | The listed member won't be null when the method returns.
866-
`MemberNotNullWhen` (§membernotnullwhen-attribute) | The listed member won't be null when the method returns the specified `bool` value.
863+
`NotNullWhen` ([§23.5.7.12](attributes.md#235712-the-notnullwhen-attribute)) | A nullable argument won't be null when the method returns the specified `bool` value.
864+
`NotNullIfNotNull` ([§23.5.7.11](attributes.md#235711-the-notnullifnotnull-attribute)) | A return value isn't null if the argument for the specified parameter isn't null.
865+
`MemberNotNull` ([§23.5.7.8](attributes.md#23578-the-membernotnull-attribute)) | The listed member won't be null when the method returns.
866+
`MemberNotNullWhen` ([§23.5.7.9](attributes.md#23579-the-membernotnullwhen-attribute)) | The listed member won't be null when the method returns the specified `bool` value.
867867
`DoesNotReturn` ([§23.5.7.4](attributes.md#23574-the-doesnotreturn-attribute)) | This method never returns.
868868
`DoesNotReturnIf` ([§23.5.7.5](attributes.md#23575-the-doesnotreturnif-attribute)) | This method never returns if the associated `bool` parameter has the specified value.
869869
@@ -1010,7 +1010,7 @@ Specifies that a non-nullable return value may be null.
10101010
10111011
Specifies that a non-nullable argument may be `null` when the method returns the specified `bool` value. This is similar to the `MaybeNull` attribute ([§23.5.7.6](attributes.md#23576-the-maybenull-attribute)), but includes a parameter for the specified return value.
10121012
1013-
#### §membernotnull-attribute The MemberNotNull attribute
1013+
#### 23.5.7.8 The MemberNotNull attribute
10141014
10151015
Specifies that the given member won't be ``null`` when the method returns.
10161016
@@ -1045,13 +1045,13 @@ Specifies that the given member won't be ``null`` when the method returns.
10451045
>
10461046
> Multiple field names may be given as arguments to the attribute's constructor. *end example*
10471047
1048-
#### §membernotnullwhen-attribute The MemberNotNullWhen attribute
1048+
#### 23.5.7.9 The MemberNotNullWhen attribute
10491049
10501050
Specifies that the listed member won't be ``null`` when the method returns the specified ``bool`` value.
10511051
1052-
> *Example*: This attribute is like `MemberNotNull` (§membernotnull-attribute) except that `MemberNotNullWhen` takes a `bool` argument. `MemberNotNullWhen` is intended for use in situations in which a helper method returns a `bool` indicating whether it initialized fields. *end example*
1052+
> *Example*: This attribute is like `MemberNotNull` (23.5.7.8](attributes.md#23578-the-membernotnull-attribute)) except that `MemberNotNullWhen` takes a `bool` argument. `MemberNotNullWhen` is intended for use in situations in which a helper method returns a `bool` indicating whether it initialized fields. *end example*
10531053
1054-
#### 23.5.7.8 The NotNull attribute
1054+
#### 23.5.7.10 The NotNull attribute
10551055
10561056
Specifies that a nullable value will never be `null` if the method returns (rather than throwing).
10571057
@@ -1073,7 +1073,7 @@ Specifies that a nullable value will never be `null` if the method returns (rath
10731073
>
10741074
> When nullable reference types are enabled, method `ThrowWhenNull` compiles without warnings. When that method returns, the `value` argument is guaranteed to be not `null`. However, its acceptable to call `ThrowWhenNull` with a null reference. *end example*
10751075
1076-
#### 23.5.7.9 The NotNullIfNotNull attribute
1076+
#### 23.5.7.11 The NotNullIfNotNull attribute
10771077
10781078
Specifies that a return value isnt `null` if the argument for the specified parameter isnt `null`.
10791079
@@ -1096,7 +1096,7 @@ Specifies that a return value isn’t `null` if the argument for the specified p
10961096
>
10971097
> *end example*
10981098
1099-
#### 23.5.7.10 The NotNullWhen attribute
1099+
#### 23.5.7.12 The NotNullWhen attribute
11001100
11011101
Specifies that a nullable argument wont be `null` when the method returns the specified `bool` value.
11021102
@@ -1157,7 +1157,7 @@ The iterator won’t have access to the `CancellationToken` argument for `GetAsy
11571157
>
11581158
> *end example*
11591159
1160-
### §module-init-attr The ModuleInitializer attribute
1160+
### 23.5.9 The ModuleInitializer attribute
11611161
11621162
The attribute `ModuleInitializer` is used to mark a method as a ***module initializer***. Such a method is called during initialization of the containing module. A module may have multiple initializers, which are called in an implementation-defined order.
11631163

0 commit comments

Comments
 (0)