Skip to content

Commit

Permalink
doc/go1.18: point to spec in same directory for release notes
Browse files Browse the repository at this point in the history
The release notes explicitly refer to sections updated
for generics in the spec but then point to the old spec
which is very confusing for beta users.

For golang#47694

Change-Id: I5b555db3543cc32f088a8b267ec3f1195a52a812
Reviewed-on: https://go-review.googlesource.com/c/go/+/373174
Trust: Robert Griesemer <[email protected]>
Reviewed-by: Ian Lance Taylor <[email protected]>
  • Loading branch information
griesemer authored and jproberts committed Jun 21, 2022
1 parent 360f0ec commit 18cf77f
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions doc/go1.18.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,42 +48,42 @@ <h3 id="generics">Generics</h3>
<p>
The following is a list of the most visible changes. For a more comprehensive overview, see the
<a href="https://go.googlesource.com/proposal/+/refs/heads/master/design/43651-type-parameters.md">proposal</a>.
For details see the <a href="https://golang.org/ref/spec">language spec</a>.
For details see the <a href="/ref/spec">language spec</a>.
</p>

<ul>
<li>
The syntax for
<a href="https://golang.org/ref/spec#Function_declarations">Function</a> and
<a href="https://golang.org/ref/spec#Type_declarations">type declarations</a>
<a href="/ref/spec#Function_declarations">function</a> and
<a href="/ref/spec#Type_declarations">type declarations</a>
now accepts
<a href="https://golang.org/ref/spec#Type_parameters">type parameters</a>.
<a href="/ref/spec#Type_parameters">type parameters</a>.
</li>
<li>
Parameterized functions and types can be instantiated by following them with a list of
type arguments in square brackets.
</li>
<li>
The new token <code>~</code> has been added to the set of
<a href="https://golang.org/ref/spec#Operators_and_punctuation">operators and punctuation</a>.
<a href="/ref/spec#Operators_and_punctuation">operators and punctuation</a>.
</li>
<li>
The syntax for
<a href="https://golang.org/ref/spec#Interface_types">Interface types</a>
<a href="/ref/spec#Interface_types">Interface types</a>
now permits the embedding of arbitrary types (not just type names of interfaces)
as well as union and <code>~T</code> type elements. Such interfaces may only be used
as type constraints.
An interface now defines a set of types as well as a set of methods.
</li>
<li>
The new
<a href="https://golang.org/ref/spec#Predeclared_identifiers">predeclared identifier</a>
<a href="/ref/spec#Predeclared_identifiers">predeclared identifier</a>
<code>any</code> is an alias for the empty interface. It may be used instead of
<code>interface{}</code>.
</li>
<li>
The new
<a href="https://golang.org/ref/spec#Predeclared_identifiers">predeclared identifier</a>
<a href="/ref/spec#Predeclared_identifiers">predeclared identifier</a>
<code>comparable</code> is an interface the denotes the set of all types which can be
compared using <code>==</code> or <code>!=</code>. It may only be used as (or embedded in)
a type constraint.
Expand Down

0 comments on commit 18cf77f

Please sign in to comment.