Skip to content

Commit

Permalink
Fix a couple of typos and clarify what bounds are global
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewjasper committed May 11, 2018
1 parent 2e33885 commit 00d5651
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/items/generics.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
Functions, type aliases, structs, enumerations, unions, traits and
implementations may be *parameterized* by types and lifetimes. These parameters
are listed in angle <span class="parenthetical">brackets (`<...>`)</span>,
usually immediattely after and before its definition the name of the item. For
usually immediately after and before its definition the name of the item. For
implementations, which don't have a name, they come directly after `impl`.
Lifetime parameters must be declared before type parameters. Some examples of
items with type and lifetime parameters:
Expand All @@ -36,7 +36,7 @@ struct Ref<'a, T> where T: 'a { r: &'a T }

[References], [raw pointers], [arrays], [slices][arrays], [tuples] and
[function pointers] have lifetime or type parameters as well, but are not
refered to with path syntax.
referred to with path syntax.

## Where clauses

Expand All @@ -61,8 +61,8 @@ refered to with path syntax.
parameters as well as a way to specify bounds on types that aren't type
parameters.

Bounds that don't use the item's parameters are checked when the item is
defined. It is an error for such a bound to be false.
Bounds that don't use the item's parameters or higher-ranked lifetimes are
checked when the item is defined. It is an error for such a bound to be false.

[`Copy`], [`Clone`] and [`Sized`] bounds are also checked for certain generic
types when defining the item. It is an error to have `Copy` or `Clone`as a
Expand Down

0 comments on commit 00d5651

Please sign in to comment.