@@ -180,14 +180,12 @@ struct Outer {
180180 get { _innerObject }
181181 }
182182
183- /* TODO: rdar://137608270 Add Builtin.addressof() support for @addressable arguments
184- @addressableSelf
185- var innerAddress: Inner {
183+ var innerAddress : InnerTrivial {
184+ @_addressableSelf
186185 unsafeAddress {
187- Builtin.addressof(inner )
186+ UnsafePointer < InnerTrivial > ( Builtin . addressOfBorrow ( _innerTrivial ) )
188187 }
189188 }
190- */
191189}
192190
193191func parse( _ span: Span < Int > ) { }
@@ -577,26 +575,22 @@ func dependsOnAddressHelper(arg: @_addressable Holder) -> Span<Int> {
577575 arg. span ( )
578576}
579577
580- /* TODO: requires -enable-address-dependencies
581-
582578// Non-addressable error returning a Span.
583579@lifetime ( borrow arg)
584580func testTrivialNonAddressable( arg: TrivialHolder ) -> Span < Int > {
585581 dependsOnTrivialAddressHelper ( arg: arg)
586- // todo -error @-1{{lifetime-dependent value escapes its scope}
587- // todo -note @-3{{it depends on the lifetime of variable 'arg'}}
588- } // todo -note {{this use causes the lifetime-dependent value to escape}}
582+ // expected -error @-1{{lifetime-dependent value escapes its scope} }
583+ // expected -note @-3{{it depends on the lifetime of argument 'arg'}}
584+ } // expected -note {{this use causes the lifetime-dependent value to escape}}
589585
590586// Non-addressable error returning a Span.
591587@lifetime ( borrow arg)
592588func testNonAddressable( arg: Holder ) -> Span < Int > {
593589 dependsOnAddressHelper ( arg: arg)
594- // todo-error @-1{{lifetime-dependent value escapes its scope}
595- // todo-note @-3{{it depends on the lifetime of variable 'arg'}}
596- } // todo-note {{this use causes the lifetime-dependent value to escape}}
597- */
590+ // expected-error @-1{{lifetime-dependent value escapes its scope}}
591+ // expected-note @-3{{it depends on the lifetime of argument 'arg'}}
592+ } // expected-note {{this use causes the lifetime-dependent value to escape}}
598593
599- /* TODO: rdar://145872854 (SILGen: @addressable inout arguments are copied)
600594@lifetime ( borrow arg)
601595func test( arg: inout AddressableInt ) -> Span < Int > {
602596 arg. span ( )
@@ -614,8 +608,6 @@ func testBorrowedAddressableInt(arg: Holder) -> Int {
614608@lifetime ( borrow arg)
615609func testBorrowedAddressableIntReturn( arg: Holder ) -> Span < Int > {
616610 arg. addressableInt. span ( )
617- // todo-error @-1{{lifetime-dependent value escapes its scope}
618- // todo-note @-2{{it depends on the lifetime of this parent value}}
619- } // todo-note {{this use causes the lifetime-dependent value to escape}}
620-
621- */
611+ // expected-error @-1{{lifetime-dependent value escapes its scope}}
612+ // expected-note @-3{{it depends on the lifetime of argument 'arg'}}
613+ } // expected-note {{this use causes the lifetime-dependent value to escape}}
0 commit comments