@@ -40,7 +40,7 @@ struct NonEscapableSelf: ~Escapable {
4040 @_lifetime ( copy self) // OK
4141 mutating func mutatingMethodNoParamCopy( ) -> NonEscapableSelf { self }
4242
43- @_lifetime ( borrow self) // OK
43+ @_lifetime ( & self ) // OK
4444 mutating func mutatingMethodNoParamBorrow( ) -> NonEscapableSelf { self }
4545
4646 func methodOneParam( _: Int ) -> NonEscapableSelf { self } // expected-error{{a method with a ~Escapable result requires '@_lifetime(...)'}}
@@ -63,7 +63,7 @@ struct NonEscapableSelf: ~Escapable {
6363 @_lifetime ( copy self) // OK
6464 mutating func mutatingMethodOneParamCopy( _: Int ) -> NonEscapableSelf { self }
6565
66- @_lifetime ( borrow self) // OK
66+ @_lifetime ( & self ) // OK
6767 mutating func mutatingMethodOneParamBorrow( _: Int ) -> NonEscapableSelf { self }
6868}
6969
@@ -87,7 +87,7 @@ struct EscapableTrivialSelf {
8787 @_lifetime ( copy self) // expected-error{{cannot copy the lifetime of an Escapable type, use '@_lifetime(&self)' instead}}
8888 mutating func mutatingMethodNoParamCopy( ) -> NEImmortal { NEImmortal ( ) }
8989
90- @_lifetime ( borrow self)
90+ @_lifetime ( & self )
9191 mutating func mutatingMethodNoParamBorrow( ) -> NEImmortal { NEImmortal ( ) }
9292
9393 func methodOneParam( _: Int ) -> NEImmortal { NEImmortal ( ) } // expected-error{{a method with a ~Escapable result requires '@_lifetime(...)'}}
@@ -109,7 +109,7 @@ struct EscapableTrivialSelf {
109109 @_lifetime ( copy self) // expected-error{{cannot copy the lifetime of an Escapable type, use '@_lifetime(&self)' instead}}
110110 mutating func mutatingMethodOneParamCopy( _: Int ) -> NEImmortal { NEImmortal ( ) }
111111
112- @_lifetime ( borrow self)
112+ @_lifetime ( & self )
113113 mutating func mutatingMethodOneParamBorrow( _: Int ) -> NEImmortal { NEImmortal ( ) }
114114}
115115
@@ -341,7 +341,7 @@ struct NonescapableSelfAccessors: ~Escapable {
341341 yield ne
342342 }
343343
344- @_lifetime ( borrow self)
344+ @_lifetime ( & self )
345345 _modify {
346346 yield & ne
347347 }
@@ -401,7 +401,7 @@ struct NonescapableSelfAccessors: ~Escapable {
401401 ne
402402 }
403403
404- @_lifetime ( borrow self)
404+ @_lifetime ( & self )
405405 set {
406406 ne = newValue
407407 }
@@ -413,7 +413,7 @@ struct NonescapableSelfAccessors: ~Escapable {
413413 yield ne
414414 }
415415
416- @_lifetime ( borrow self)
416+ @_lifetime ( & self )
417417 _modify {
418418 yield & ne
419419 }
@@ -533,7 +533,7 @@ struct NonEscapableMutableSelf: ~Escapable {
533533 @_lifetime ( self : copy self ) // OK
534534 mutating func mutatingMethodNoParamCopy( ) { }
535535
536- @_lifetime ( self : borrow self ) // expected-error{{invalid use of borrow dependence on the same inout parameter}}
536+ @_lifetime ( self : & self ) // expected-error{{invalid use of borrow dependence on the same inout parameter}}
537537 mutating func mutatingMethodNoParamBorrow( ) { }
538538
539539 mutating func mutatingMethodOneParam( _: NE ) { } // expected-error{{a mutating method with a ~Escapable 'self' requires '@_lifetime(self: ...)'}}
@@ -544,6 +544,6 @@ struct NonEscapableMutableSelf: ~Escapable {
544544 @_lifetime ( copy self) // OK
545545 mutating func mutatingMethodOneParamCopy( _: NE ) { }
546546
547- @_lifetime ( borrow self)
547+ @_lifetime ( & self )
548548 mutating func mutatingMethodOneParamBorrow( _: NE ) { }
549549}
0 commit comments