From 91f0301aa521e057ab180d8d0c6b2ca98796f095 Mon Sep 17 00:00:00 2001 From: Alisdair Owens Date: Sat, 18 Jul 2015 20:34:12 +0100 Subject: [PATCH] Fix to 80 char width, change to single space after period --- src/librustc_typeck/diagnostics.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/librustc_typeck/diagnostics.rs b/src/librustc_typeck/diagnostics.rs index d13b8e80f02aa..a002ed311e8c5 100644 --- a/src/librustc_typeck/diagnostics.rs +++ b/src/librustc_typeck/diagnostics.rs @@ -2139,9 +2139,9 @@ enum Foo { } ``` -This error may also commonly be found when working with unsafe code. For +This error may also commonly be found when working with unsafe code. For example, when using raw pointers one may wish to specify the lifetime for -which the pointed-at data is valid. An initial attempt (below) causes this +which the pointed-at data is valid. An initial attempt (below) causes this error: ``` @@ -2151,8 +2151,8 @@ struct Foo<'a, T> { ``` We want to express the constraint that Foo should not outlive `'a`, because -the data pointed to by `T` is only valid for that lifetime. The problem is -that there are no actual uses of `'a`. It's possible to work around this +the data pointed to by `T` is only valid for that lifetime. The problem is +that there are no actual uses of `'a`. It's possible to work around this by adding a PhantomData type to the struct, using it to tell the compiler to act as if the struct contained a borrowed reference `&'a T`: @@ -2165,8 +2165,8 @@ struct Foo<'a, T: 'a> { } ``` -PhantomData can also be used to express information about unused type parameters. -You can read more about it in the API documentation: +PhantomData can also be used to express information about unused type +parameters. You can read more about it in the API documentation: https://doc.rust-lang.org/std/marker/struct.PhantomData.html "##