@@ -18,69 +18,69 @@ public struct NoncopyableWrapper<T> {
1818class Inspector {
1919 func inspect( _ hasIt: inout MO , _ mo: MO , _ hasItAgain: __owned MO) { }
2020 // expected-error@-1 {{noncopyable parameter must specify its ownership}}
21- // expected-note@-2 {{add '__shared ' for an immutable reference}}{{41-41=__shared }}
21+ // expected-note@-2 {{add 'borrowing ' for an immutable reference}}{{41-41=borrowing }}
2222 // expected-note@-3 {{add 'inout' for a mutable reference}}{{41-41=inout }}
23- // expected-note@-4 {{add '__owned ' to take the value from callers }}{{41-41=__owned }}
23+ // expected-note@-4 {{add 'consuming ' to take the value from the caller }}{{41-41=consuming }}
2424}
2525
2626// expected-error@+4 {{noncopyable parameter must specify its ownership}}
27- // expected-note@+3 {{add '__shared ' for an immutable reference}}{{20-20=__shared }}
27+ // expected-note@+3 {{add 'borrowing ' for an immutable reference}}{{20-20=borrowing }}
2828// expected-note@+2 {{add 'inout' for a mutable reference}}{{20-20=inout }}
29- // expected-note@+1 {{add '__owned ' to take the value from callers }}{{20-20=__owned }}
29+ // expected-note@+1 {{add 'consuming ' to take the value from the caller }}{{20-20=consuming }}
3030func applier( _ f: ( MO ) -> ( ) ,
3131 _ v: MO ) { }
3232// expected-error@-1 {{noncopyable parameter must specify its ownership}}
33- // expected-note@-2 {{add '__shared ' for an immutable reference}}{{19-19=__shared }}
33+ // expected-note@-2 {{add 'borrowing ' for an immutable reference}}{{19-19=borrowing }}
3434// expected-note@-3 {{add 'inout' for a mutable reference}}{{19-19=inout }}
35- // expected-note@-4 {{add '__owned ' to take the value from callers }}{{19-19=__owned }}
35+ // expected-note@-4 {{add 'consuming ' to take the value from the caller }}{{19-19=consuming }}
3636
3737func caller( ) {
3838 let f = { ( _ mo1: MO , _ mo2: MO ) in ( ) }
3939 // expected-error@-1 2{{noncopyable parameter must specify its ownership}}
40- // expected-note@-2 {{add '__shared ' for an immutable reference}}{{21-21=__shared }}
41- // expected-note@-3 {{add '__shared ' for an immutable reference}}{{32-32=__shared }}
40+ // expected-note@-2 {{add 'borrowing ' for an immutable reference}}{{21-21=borrowing }}
41+ // expected-note@-3 {{add 'borrowing ' for an immutable reference}}{{32-32=borrowing }}
4242 // expected-note@-4 {{add 'inout' for a mutable reference}}{{21-21=inout }}
4343 // expected-note@-5 {{add 'inout' for a mutable reference}}{{32-32=inout }}
44- // expected-note@-6 {{add '__owned ' to take the value from callers }}{{21-21=__owned }}
45- // expected-note@-7 {{add '__owned ' to take the value from callers }}{{32-32=__owned }}
44+ // expected-note@-6 {{add 'consuming ' to take the value from the caller }}{{21-21=consuming }}
45+ // expected-note@-7 {{add 'consuming ' to take the value from the caller }}{{32-32=consuming }}
4646
4747 let g : ( MO , MO ) -> ( ) = f
4848 // expected-error@-1 2{{noncopyable parameter must specify its ownership}}
49- // expected-note@-2 {{add '__shared ' for an immutable reference}}{{11-11=__shared }}
50- // expected-note@-3 {{add '__shared ' for an immutable reference}}{{15-15=__shared }}
49+ // expected-note@-2 {{add 'borrowing ' for an immutable reference}}{{11-11=borrowing }}
50+ // expected-note@-3 {{add 'borrowing ' for an immutable reference}}{{15-15=borrowing }}
5151 // expected-note@-4 {{add 'inout' for a mutable reference}}{{11-11=inout }}
5252 // expected-note@-5 {{add 'inout' for a mutable reference}}{{15-15=inout }}
53- // expected-note@-6 {{add '__owned ' to take the value from callers }}{{11-11=__owned }}
54- // expected-note@-7 {{add '__owned ' to take the value from callers }}{{15-15=__owned }}
53+ // expected-note@-6 {{add 'consuming ' to take the value from the caller }}{{11-11=consuming }}
54+ // expected-note@-7 {{add 'consuming ' to take the value from the caller }}{{15-15=consuming }}
5555
5656 let partialG = { g ( $0, MO ( ) ) }
5757
5858 let _: Box < ( MO ) -> ( ) > = Box ( val: partialG)
5959 // expected-error@-1 {{noncopyable parameter must specify its ownership}}
60- // expected-note@-2 {{add '__shared ' for an immutable reference}}{{15-15=__shared }}
60+ // expected-note@-2 {{add 'borrowing ' for an immutable reference}}{{15-15=borrowing }}
6161 // expected-note@-3 {{add 'inout' for a mutable reference}}{{15-15=inout }}
62- // expected-note@-4 {{add '__owned ' to take the value from callers }}{{15-15=__owned }}
62+ // expected-note@-4 {{add 'consuming ' to take the value from the caller }}{{15-15=consuming }}
6363
6464 let _: Box < ( inout MO ) -> ( ) > ? = nil
6565 let _: Box < ( __shared MO) -> ( ) > ? = nil
6666
6767 let _: Box < ( MO ) -> ( ) > ? = nil
6868 // expected-error@-1 {{noncopyable parameter must specify its ownership}}
69- // expected-note@-2 {{add '__shared ' for an immutable reference}}{{15-15=__shared }}
69+ // expected-note@-2 {{add 'borrowing ' for an immutable reference}}{{15-15=borrowing }}
7070 // expected-note@-3 {{add 'inout' for a mutable reference}}{{15-15=inout }}
71- // expected-note@-4 {{add '__owned ' to take the value from callers }}{{15-15=__owned }}
71+ // expected-note@-4 {{add 'consuming ' to take the value from the caller }}{{15-15=consuming }}
7272
7373 applier ( partialG, MO ( ) )
7474}
7575
7676func takeGeneric< T> ( _ x: NoncopyableWrapper < T > ) { }
7777// expected-error@-1 {{noncopyable parameter must specify its ownership}}
78- // expected-note@-2 {{add '__shared ' for an immutable reference}}{{26-26=__shared }}
78+ // expected-note@-2 {{add 'borrowing ' for an immutable reference}}{{26-26=borrowing }}
7979// expected-note@-3 {{add 'inout' for a mutable reference}}{{26-26=inout }}
80- // expected-note@-4 {{add '__owned ' to take the value from callers }}{{26-26=__owned }}
80+ // expected-note@-4 {{add 'consuming ' to take the value from the caller }}{{26-26=consuming }}
8181
8282func takeInstantiated( _ x: NoncopyableWrapper < Int > ) { }
8383// expected-error@-1 {{noncopyable parameter must specify its ownership}}
84- // expected-note@-2 {{add '__shared ' for an immutable reference}}{{28-28=__shared }}
84+ // expected-note@-2 {{add 'borrowing ' for an immutable reference}}{{28-28=borrowing }}
8585// expected-note@-3 {{add 'inout' for a mutable reference}}{{28-28=inout }}
86- // expected-note@-4 {{add '__owned ' to take the value from callers }}{{28-28=__owned }}
86+ // expected-note@-4 {{add 'consuming ' to take the value from the caller }}{{28-28=consuming }}
0 commit comments