1
Fork 0

Consistently use 'supertrait'.

A subset of places referred to 'super-trait', so this changes them
to all use 'supertrait'. This matches 'supertype' and some other
usages. An exception is 'auto-trait' which is consistently used
in that manner.
This commit is contained in:
Bruce Mitchener 2021-10-02 07:21:01 +07:00
parent c02371c442
commit 058a21d5cf
25 changed files with 88 additions and 88 deletions

View file

@ -16,9 +16,9 @@ pub trait BoxCar : Box + Vehicle {}
fn dent_object<COLOR>(c: dyn BoxCar<Color=COLOR>) {} // Invalid constraint
```
In this example, `BoxCar` has two super-traits: `Vehicle` and `Box`. Both of
In this example, `BoxCar` has two supertraits: `Vehicle` and `Box`. Both of
these traits define an associated type `Color`. `BoxCar` inherits two types
with that name from both super-traits. Because of this, we need to use the
with that name from both supertraits. Because of this, we need to use the
fully qualified path syntax to refer to the appropriate `Color` associated
type, either `<BoxCar as Vehicle>::Color` or `<BoxCar as Box>::Color`, but this
syntax is not allowed to be used in a function signature.