Skip to content

Commit a632079

Browse files
Merge pull request #421 from mark-i-m/anon_params_ref
Add note about anon params
2 parents 5e296d2 + 9d70cc6 commit a632079

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/introduction.md

+6
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,12 @@ information. These conventions are documented here.
7979

8080
An *example term* is an example of a term being defined.
8181

82+
* Differences in the language by which edition the crate is compiled under are
83+
in a blockquote that start with the words "Edition Differences:" in **bold**.
84+
85+
> **Edition Differences**: In the 2015 edition, this syntax is valid that is
86+
> disallowed as of the 2018 edition.
87+
8288
* Notes that contain useful information about the state of the book or point out
8389
useful, but mostly out of scope, information are in blockquotes that start
8490
with the word "Note:" in **bold**.

src/items/associated-items.md

+4
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,10 @@ let circle_shape = Circle::new();
134134
let bounding_box = circle_shape.bounding_box();
135135
```
136136

137+
> **Edition Differences**: In the 2015 edition, it is possible to declare trait
138+
> methods with anonymous parameters (e.g. `fn foo(u8)`). This is deprecated and
139+
> an error as of the 2018 edition. All parameters must have an argument name.
140+
137141
## Associated Types
138142

139143
*Associated types* are [type aliases] associated with another type. Associated

0 commit comments

Comments
 (0)