@@ -4470,14 +4470,11 @@ NOTE(note_add_nonisolated_to_decl,none,
4470
4470
(DeclName, DescriptiveDeclKind))
4471
4471
NOTE(note_add_async_and_throws_to_decl,none,
4472
4472
" mark the protocol requirement %0 '%select{|async|throws|async throws}1' "
4473
- " in order witness it with 'distributed' function declared in distributed actor %2 " ,
4474
- (DeclName, unsigned , DeclName ))
4473
+ " to allow actor-isolated conformances " ,
4474
+ (DeclName, unsigned ))
4475
4475
NOTE(note_add_distributed_to_decl,none,
4476
- " add 'distributed' to %0 to make this %1 witness the protocol requirement" ,
4476
+ " add 'distributed' to %0 to make this %1 satisfy the protocol requirement" ,
4477
4477
(DeclName, DescriptiveDeclKind))
4478
- NOTE(note_distributed_requirement_defined_here,none,
4479
- " distributed instance method requirement %0 declared here" ,
4480
- (DeclName))
4481
4478
NOTE(note_add_globalactor_to_function,none,
4482
4479
" add '@%0' to make %1 %2 part of global actor %3" ,
4483
4480
(StringRef, DescriptiveDeclKind, DeclName, Type))
@@ -4558,13 +4555,16 @@ ERROR(override_implicit_unowned_executor,none,
4558
4555
" cannot override an actor's 'unownedExecutor' property that wasn't "
4559
4556
" explicitly defined" , ())
4560
4557
ERROR(actor_isolated_non_self_reference,none,
4561
- " actor-isolated %0 %1 can not be "
4558
+ " %5 %0 %1 can not be "
4562
4559
" %select{referenced|mutated|used 'inout'}2 "
4563
- " %select{on a non-isolated actor instance|"
4560
+ " %select{from outside the actor|on a different actor instance|"
4561
+ " on a non-isolated actor instance|"
4564
4562
" from a Sendable function|from a Sendable closure|"
4565
4563
" from an 'async let' initializer|from global actor %4|"
4566
- " from the main actor|from a non-isolated context|from a non-isolated autoclosure}3" ,
4567
- (DescriptiveDeclKind, DeclName, unsigned , unsigned , Type))
4564
+ " from the main actor|from a non-isolated context|"
4565
+ " from a non-isolated autoclosure}3" ,
4566
+ (DescriptiveDeclKind, DeclName, unsigned , unsigned , Type,
4567
+ ActorIsolation))
4568
4568
ERROR(distributed_actor_isolated_non_self_reference,none,
4569
4569
" distributed actor-isolated %0 %1 can not be accessed from a "
4570
4570
" non-isolated context" ,
@@ -4579,18 +4579,6 @@ ERROR(actor_isolated_inout_state,none,
4579
4579
ERROR(actor_isolated_mutating_func,none,
4580
4580
" cannot call mutating async function %0 on actor-isolated %1 %2" ,
4581
4581
(DeclName, DescriptiveDeclKind, DeclName))
4582
- ERROR(global_actor_from_instance_actor_context,none,
4583
- " %0 %1 isolated to global actor %2 can not be %select{referenced|mutated|used 'inout'}4"
4584
- " from actor %3 %select{|in a synchronous context}5" ,
4585
- (DescriptiveDeclKind, DeclName, Type, DeclName, unsigned , bool ))
4586
- ERROR(global_actor_from_other_global_actor_context,none,
4587
- " %0 %1 isolated to global actor %2 can not be %select{referenced|mutated|used 'inout'}4"
4588
- " from different global actor %3 %select{|in a synchronous context}5" ,
4589
- (DescriptiveDeclKind, DeclName, Type, Type, unsigned , bool ))
4590
- ERROR(global_actor_from_nonactor_context,none,
4591
- " %0 %1 isolated to global actor %2 can not be %select{referenced|mutated|used 'inout'}4"
4592
- " from %select{this|a non-isolated}3%select{| synchronous}5 context" ,
4593
- (DescriptiveDeclKind, DeclName, Type, bool , unsigned , bool ))
4594
4582
ERROR(actor_isolated_call,none,
4595
4583
" call to %0 function in a synchronous %1 context" ,
4596
4584
(ActorIsolation, ActorIsolation))
@@ -4684,19 +4672,9 @@ WARNING(shared_mutable_state_access,none,
4684
4672
" reference to %0 %1 is not concurrency-safe because it involves "
4685
4673
" shared mutable state" , (DescriptiveDeclKind, DeclName))
4686
4674
ERROR(actor_isolated_witness,none,
4687
- " actor-isolated %0 %1 cannot be used to satisfy a protocol requirement" ,
4688
- (DescriptiveDeclKind, DeclName))
4689
- ERROR(distributed_actor_isolated_witness,none,
4690
- " distributed actor-isolated %0 %1 cannot be used to satisfy a protocol requirement" ,
4691
- (DescriptiveDeclKind, DeclName))
4692
- ERROR(global_actor_isolated_witness,none,
4693
- " %0 %1 isolated to global actor %2 can not satisfy corresponding "
4694
- " requirement from protocol %3" ,
4695
- (DescriptiveDeclKind, DeclName, Type, Identifier))
4696
- ERROR(global_actor_isolated_requirement_witness_conflict,none,
4697
- " %0 %1 isolated to global actor %2 can not satisfy corresponding "
4698
- " requirement from protocol %3 isolated to global actor %4" ,
4699
- (DescriptiveDeclKind, DeclName, Type, Identifier, Type))
4675
+ " %select{|distributed }0%1 %2 %3 cannot be used to satisfy %4 protocol "
4676
+ " requirement" ,
4677
+ (bool , ActorIsolation, DescriptiveDeclKind, DeclName, ActorIsolation))
4700
4678
ERROR(actor_cannot_conform_to_global_actor_protocol,none,
4701
4679
" actor %0 cannot conform to global actor isolated protocol %1" ,
4702
4680
(Type, Type))
@@ -4708,9 +4686,10 @@ ERROR(isolated_parameter_not_actor,none,
4708
4686
4709
4687
WARNING(non_sendable_param_type,none,
4710
4688
" non-sendable type %0 %select{passed in call to %4 %2 %3|"
4689
+ " exiting %4 context in call to non-isolated %2 %3|"
4711
4690
" passed in implicitly asynchronous call to %4 %2 %3|"
4712
- " in parameter of %4 %2 %3 satisfying non-isolated protocol "
4713
- " requirement |"
4691
+ " in parameter of %4 %2 %3 satisfying protocol requirement| "
4692
+ " in parameter of %4 overriding %2 %3 |"
4714
4693
" in parameter of %4 '@objc' %2 %3}1 cannot cross actor boundary" ,
4715
4694
(Type, unsigned , DescriptiveDeclKind, DeclName, ActorIsolation))
4716
4695
WARNING(non_sendable_call_param_type,none,
@@ -4719,8 +4698,10 @@ WARNING(non_sendable_call_param_type,none,
4719
4698
(Type, bool , ActorIsolation))
4720
4699
WARNING(non_sendable_result_type,none,
4721
4700
" non-sendable type %0 returned by %select{call to %4 %2 %3|"
4701
+ " call from %4 context to non-isolated %2 %3|"
4722
4702
" implicitly asynchronous call to %4 %2 %3|"
4723
- " %4 %2 %3 satisfying non-isolated protocol requirement|"
4703
+ " %4 %2 %3 satisfying protocol requirement|"
4704
+ " %4 overriding %2 %3|"
4724
4705
" %4 '@objc' %2 %3}1 cannot cross actor boundary" ,
4725
4706
(Type, unsigned , DescriptiveDeclKind, DeclName, ActorIsolation))
4726
4707
WARNING(non_sendable_call_result_type,none,
@@ -4730,8 +4711,10 @@ WARNING(non_sendable_call_result_type,none,
4730
4711
WARNING(non_sendable_property_type,none,
4731
4712
" non-sendable type %0 in %select{"
4732
4713
" %select{asynchronous access to %5 %1 %2|"
4714
+ " asynchronous access from %5 context to non-isolated %1 %2|"
4733
4715
" implicitly asynchronous access to %5 %1 %2|"
4734
- " conformance of %5 %1 %2 to non-isolated protocol requirement|"
4716
+ " conformance of %5 %1 %2 to protocol requirement|"
4717
+ " %5 overriding %1 %2|"
4735
4718
" %5 '@objc' %1 %2}4|captured local %1 %2}3 cannot "
4736
4719
" cross %select{actor|task}3 boundary" ,
4737
4720
(Type, DescriptiveDeclKind, DeclName, bool , unsigned , ActorIsolation))
0 commit comments