@@ -18,69 +18,69 @@ public struct NoncopyableWrapper<T> {
18
18
class Inspector {
19
19
func inspect( _ hasIt: inout MO , _ mo: MO , _ hasItAgain: __owned MO) { }
20
20
// 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 }}
22
22
// 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 }}
24
24
}
25
25
26
26
// 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 }}
28
28
// 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 }}
30
30
func applier( _ f: ( MO ) -> ( ) ,
31
31
_ v: MO ) { }
32
32
// 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 }}
34
34
// 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 }}
36
36
37
37
func caller( ) {
38
38
let f = { ( _ mo1: MO , _ mo2: MO ) in ( ) }
39
39
// 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 }}
42
42
// expected-note@-4 {{add 'inout' for a mutable reference}}{{21-21=inout }}
43
43
// 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 }}
46
46
47
47
let g : ( MO , MO ) -> ( ) = f
48
48
// 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 }}
51
51
// expected-note@-4 {{add 'inout' for a mutable reference}}{{11-11=inout }}
52
52
// 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 }}
55
55
56
56
let partialG = { g ( $0, MO ( ) ) }
57
57
58
58
let _: Box < ( MO ) -> ( ) > = Box ( val: partialG)
59
59
// 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 }}
61
61
// 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 }}
63
63
64
64
let _: Box < ( inout MO ) -> ( ) > ? = nil
65
65
let _: Box < ( __shared MO) -> ( ) > ? = nil
66
66
67
67
let _: Box < ( MO ) -> ( ) > ? = nil
68
68
// 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 }}
70
70
// 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 }}
72
72
73
73
applier ( partialG, MO ( ) )
74
74
}
75
75
76
76
func takeGeneric< T> ( _ x: NoncopyableWrapper < T > ) { }
77
77
// 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 }}
79
79
// 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 }}
81
81
82
82
func takeInstantiated( _ x: NoncopyableWrapper < Int > ) { }
83
83
// 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 }}
85
85
// 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