Rollup merge of #65292 - JohnTitor:add-backticks, r=varkor,Centril

Print lifetimes with backticks

Fixes #65287

r? @varkor
This commit is contained in:
Mazdak Farrokhzad 2019-10-14 07:36:54 +02:00 committed by GitHub
commit c2ae4ded4d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
115 changed files with 260 additions and 260 deletions

View file

@ -12,7 +12,7 @@ LL | drop::<Box<dyn for<'z> FnMut(&'z isize) -> &'z isize>>(Box::new(|z| {
LL | | x
LL | | }));
| |_____^
note: ...but the borrowed content is only valid for the lifetime 'x as defined on the function body at 1:9
note: ...but the borrowed content is only valid for the lifetime `'x` as defined on the function body at 1:9
--> $DIR/issue-10291.rs:1:9
|
LL | fn test<'x>(x: &'x isize) {

View file

@ -16,7 +16,7 @@ note: ...so that reference does not outlive borrowed content
|
LL | self.a();
| ^^^^
note: but, the lifetime must be valid for the lifetime 'a as defined on the trait at 1:9...
note: but, the lifetime must be valid for the lifetime `'a` as defined on the trait at 1:9...
--> $DIR/issue-16683.rs:1:9
|
LL | trait T<'a> {

View file

@ -17,7 +17,7 @@ LL | |
LL | |
LL | | }
| |_____^
note: ...does not necessarily outlive the lifetime 'a as defined on the impl at 5:7
note: ...does not necessarily outlive the lifetime `'a` as defined on the impl at 5:7
--> $DIR/issue-17740.rs:5:7
|
LL | impl <'a> Foo<'a>{
@ -31,7 +31,7 @@ LL | fn bar(self: &mut Foo) {
|
= note: expected type `Foo<'a>`
found type `Foo<'_>`
note: the lifetime 'a as defined on the impl at 5:7...
note: the lifetime `'a` as defined on the impl at 5:7...
--> $DIR/issue-17740.rs:5:7
|
LL | impl <'a> Foo<'a>{

View file

@ -17,7 +17,7 @@ note: ...so that reference does not outlive borrowed content
|
LL | self.foo();
| ^^^^
note: but, the lifetime must be valid for the lifetime 'a as defined on the trait at 4:11...
note: but, the lifetime must be valid for the lifetime `'a` as defined on the trait at 4:11...
--> $DIR/issue-17758.rs:4:11
|
LL | trait Foo<'a> {

View file

@ -15,7 +15,7 @@ LL | |
LL | | println!("{:?}", self);
LL | | }
| |_____^
note: ...does not necessarily outlive the lifetime '_ as defined on the impl at 5:5
note: ...does not necessarily outlive the lifetime `'_` as defined on the impl at 5:5
--> $DIR/issue-17905-2.rs:5:5
|
LL | &str,
@ -29,7 +29,7 @@ LL | fn say(self: &Pair<&str, isize>) {
|
= note: expected type `Pair<&str, _>`
found type `Pair<&str, _>`
note: the lifetime '_ as defined on the impl at 5:5...
note: the lifetime `'_` as defined on the impl at 5:5...
--> $DIR/issue-17905-2.rs:5:5
|
LL | &str,

View file

@ -23,7 +23,7 @@ LL | |
LL | | self.sub = t;
LL | | }
| |_____^
note: ...does not necessarily outlive the lifetime 'a as defined on the impl at 26:6
note: ...does not necessarily outlive the lifetime `'a` as defined on the impl at 26:6
--> $DIR/issue-20831-debruijn.rs:26:6
|
LL | impl<'a> Publisher<'a> for MyStruct<'a> {
@ -43,7 +43,7 @@ LL | | }
|
= note: expected type `'a`
found type `'_`
note: the lifetime 'a as defined on the impl at 26:6...
note: the lifetime `'a` as defined on the impl at 26:6...
--> $DIR/issue-20831-debruijn.rs:26:6
|
LL | impl<'a> Publisher<'a> for MyStruct<'a> {
@ -83,7 +83,7 @@ LL | |
LL | | self.sub = t;
LL | | }
| |_____^
note: ...but the lifetime must also be valid for the lifetime 'a as defined on the impl at 26:6...
note: ...but the lifetime must also be valid for the lifetime `'a` as defined on the impl at 26:6...
--> $DIR/issue-20831-debruijn.rs:26:6
|
LL | impl<'a> Publisher<'a> for MyStruct<'a> {

View file

@ -11,7 +11,7 @@ note: the anonymous lifetime #1 defined on the method body at 5:5...
|
LL | fn select(&self) -> BufferViewHandle<R>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...does not necessarily outlive the lifetime 'a as defined on the trait at 3:18
note: ...does not necessarily outlive the lifetime `'a` as defined on the trait at 3:18
--> $DIR/issue-27942.rs:3:18
|
LL | pub trait Buffer<'a, R: Resources<'a>> {
@ -25,7 +25,7 @@ LL | fn select(&self) -> BufferViewHandle<R>;
|
= note: expected type `Resources<'_>`
found type `Resources<'a>`
note: the lifetime 'a as defined on the trait at 3:18...
note: the lifetime `'a` as defined on the trait at 3:18...
--> $DIR/issue-27942.rs:3:18
|
LL | pub trait Buffer<'a, R: Resources<'a>> {

View file

@ -4,12 +4,12 @@ error[E0478]: lifetime bound not satisfied
LL | Foo::<'a, 'b>::xmute(u)
| ^^^^^^^^^^^^^^^^^^^^
|
note: lifetime parameter instantiated with the lifetime 'b as defined on the function body at 9:16
note: lifetime parameter instantiated with the lifetime `'b` as defined on the function body at 9:16
--> $DIR/issue-28848.rs:9:16
|
LL | pub fn foo<'a, 'b>(u: &'b ()) -> &'a () {
| ^^
note: but lifetime parameter must outlive the lifetime 'a as defined on the function body at 9:12
note: but lifetime parameter must outlive the lifetime `'a` as defined on the function body at 9:12
--> $DIR/issue-28848.rs:9:12
|
LL | pub fn foo<'a, 'b>(u: &'b ()) -> &'a () {

View file

@ -21,7 +21,7 @@ LL | | {
LL | | Some(&mut self.0)
LL | | }
| |_____^
note: ...does not necessarily outlive the lifetime 'a as defined on the impl at 3:6
note: ...does not necessarily outlive the lifetime `'a` as defined on the impl at 3:6
--> $DIR/issue-37884.rs:3:6
|
LL | impl<'a, T: 'a> Iterator for RepeatMut<'a, T> {

View file

@ -4,7 +4,7 @@ error[E0495]: cannot infer an appropriate lifetime due to conflicting requiremen
LL | match (&t,) {
| ^^^^^
|
note: first, the lifetime cannot outlive the lifetime 'a as defined on the function body at 1:23...
note: first, the lifetime cannot outlive the lifetime `'a` as defined on the function body at 1:23...
--> $DIR/issue-52213.rs:1:23
|
LL | fn transmute_lifetime<'a, 'b, T>(t: &'a (T,)) -> &'b T {
@ -12,7 +12,7 @@ LL | fn transmute_lifetime<'a, 'b, T>(t: &'a (T,)) -> &'b T {
= note: ...so that the types are compatible:
expected (&&(T,),)
found (&&'a (T,),)
note: but, the lifetime must be valid for the lifetime 'b as defined on the function body at 1:27...
note: but, the lifetime must be valid for the lifetime `'b` as defined on the function body at 1:27...
--> $DIR/issue-52213.rs:1:27
|
LL | fn transmute_lifetime<'a, 'b, T>(t: &'a (T,)) -> &'b T {

View file

@ -4,7 +4,7 @@ error[E0495]: cannot infer an appropriate lifetime due to conflicting requiremen
LL | Box::new(self.out_edges(u).map(|e| e.target()))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: first, the lifetime cannot outlive the lifetime 'a as defined on the trait at 5:17...
note: first, the lifetime cannot outlive the lifetime `'a` as defined on the trait at 5:17...
--> $DIR/issue-55796.rs:5:17
|
LL | pub trait Graph<'a> {
@ -25,7 +25,7 @@ error[E0495]: cannot infer an appropriate lifetime due to conflicting requiremen
LL | Box::new(self.in_edges(u).map(|e| e.target()))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: first, the lifetime cannot outlive the lifetime 'a as defined on the trait at 5:17...
note: first, the lifetime cannot outlive the lifetime `'a` as defined on the trait at 5:17...
--> $DIR/issue-55796.rs:5:17
|
LL | pub trait Graph<'a> {