@@ -498,6 +498,10 @@ Because captures are often by reference, the following general rules arise:
498498
499499## Trait objects  
500500
501+ >  ** <sup >Syntax</sup >**   
502+ >  _ TraitObjectType_  :  
503+ >    ;  ;  [ _ Path_ ]  ( ` + `  [ _ Path_ ]  )<sup >\* </sup > ` + ` <sup >?</sup >
504+ 
501505A * trait object*  is an opaque value of another type that implements a set of
502506traits. The set of traits is made up of an [ object safe]  * base trait*  plus any
503507number of [ auto traits] .
@@ -506,10 +510,10 @@ Trait objects implement the base trait, its auto traits, and any super traits
506510of the base trait.
507511
508512Trait objects are written as the path to the base trait followed by the list
509- of auto traits followed optionally by a lifetime bound all separated by ` + ` . For 
510- example, given a trait  ` Trait ` , the following are all  trait objects:  ` Trait ` ,
511- ` Trait + Send ` , ` Trait + Send + Sync  ` , ` Trait + 'static  ` ,
512- ` Trait + Send + 'static ` .
513+ of auto traits followed optionally by a lifetime bound all separated by and 
514+ optionally terminated by   ` + ` . For example, given a  trait ` Trait ` , the following 
515+ are all trait objects:  ` Trait ` , ` Trait + Send ` , ` Trait + Send + Sync  ` ,
516+ ` Trait + 'static  ` ,  ` Trait +  Send + 'static` ,  ` Trait + ` .
513517
514518Two trait object types alias each other if the base traits alias each other and
515519if the sets of auto traits are the same and the lifetime bounds are the same.
@@ -701,3 +705,4 @@ impl Printable for String {
701705[ object safe ] : items/traits.html#object-safety 
702706[ issue 47010 ] : https://github.com/rust-lang/rust/issues/47010 
703707[ issue 33140 ] : https://github.com/rust-lang/rust/issues/33140 
708+ [ _PATH_ ] : paths.html 
0 commit comments