Skip to content

Commit d5fac9f

Browse files
committed
Tweak @abi @lifetime test
Remove a diagnostic that isn’t occurring anymore.
1 parent 7159111 commit d5fac9f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/attr/attr_abi.swift

+4-4
Original file line numberDiff line numberDiff line change
@@ -1997,9 +1997,9 @@ struct Lifetime: ~Escapable {
19971997
@lifetime(borrow i1) init(i1: UnsafeRawPointer) {}
19981998

19991999
@abi(@lifetime(borrow i2) init(i2: UnsafeRawPointer)) // expected-error {{extra 'lifetime' attribute in '@abi'}} {{8-28=}}
2000-
init(i2: UnsafeRawPointer) {} // expected-error {{cannot infer lifetime dependence, no parameters found that are either ~Escapable or Escapable with a borrowing ownership}}
2000+
init(i2: UnsafeRawPointer) {}
20012001

2002-
@abi(init(i3: UnsafeRawPointer)) // expected-error {{cannot infer lifetime dependence, no parameters found that are either ~Escapable or Escapable with a borrowing ownership}} expected-error {{missing 'lifetime' attribute in '@abi'}} {{8-8=@lifetime(borrow i3) }}
2002+
@abi(init(i3: UnsafeRawPointer)) // expected-error {{missing 'lifetime' attribute in '@abi'}} {{8-8=@lifetime(borrow i3) }}
20032003
@lifetime(borrow i3) init(i3: UnsafeRawPointer) {} // expected-note {{should match attribute here}}
20042004

20052005
@abi(@lifetime(borrow i4) init(i4: UnsafeRawPointer, i4a: UnsafeRawPointer)) // expected-error {{'lifetime' attribute in '@abi' should match '@lifetime(borrow i4a)'}} {{8-28=@lifetime(borrow i4a)}}
@@ -2013,9 +2013,9 @@ struct UnsafeNonescapableResult: ~Escapable {
20132013
@_unsafeNonescapableResult init(i1: UnsafeRawPointer) {}
20142014

20152015
@abi(@_unsafeNonescapableResult init(i2: UnsafeRawPointer)) // expected-error {{extra '_unsafeNonescapableResult' attribute in '@abi'}} {{8-34=}}
2016-
init(i2: UnsafeRawPointer) {} // expected-error {{cannot infer lifetime dependence, no parameters found that are either ~Escapable or Escapable with a borrowing ownership}}
2016+
init(i2: UnsafeRawPointer) {}
20172017

2018-
@abi(init(i3: UnsafeRawPointer)) // expected-error {{cannot infer lifetime dependence, no parameters found that are either ~Escapable or Escapable with a borrowing ownership}} expected-error {{missing '_unsafeNonescapableResult' attribute in '@abi'}} {{8-8=@_unsafeNonescapableResult }}
2018+
@abi(init(i3: UnsafeRawPointer)) // expected-error {{missing '_unsafeNonescapableResult' attribute in '@abi'}} {{8-8=@_unsafeNonescapableResult }}
20192019
@_unsafeNonescapableResult init(i3: UnsafeRawPointer) {} // expected-note {{should match attribute here}}
20202020
}
20212021

0 commit comments

Comments
 (0)