@@ -42,8 +42,6 @@ NOTE(opaque_return_type_declared_here,none,
42
42
" opaque return type declared here" , ())
43
43
NOTE(default_value_declared_here,none,
44
44
" default value declared here" , ())
45
- NOTE(protocol_requirement_declared_here,none,
46
- " requirement %0 declared here" , (const ValueDecl *))
47
45
48
46
// ------------------------------------------------------------------------------
49
47
// MARK: Constraint solver diagnostics
@@ -2743,8 +2741,6 @@ WARNING(add_predates_concurrency_import,none,
2743
2741
GROUPED_WARNING(remove_predates_concurrency_import,PreconcurrencyImport,
2744
2742
DefaultIgnore,
2745
2743
" '@preconcurrency' attribute on module %0 has no effect" , (Identifier))
2746
- NOTE(add_preconcurrency_to_conformance,none,
2747
- " add '@preconcurrency' to the %0 conformance to defer isolation checking to run time" , (DeclName))
2748
2744
WARNING(remove_public_import,none,
2749
2745
" public import of %0 was not used in public declarations or inlinable code" ,
2750
2746
(Identifier))
@@ -5444,15 +5440,7 @@ ERROR(async_in_nonasync_function,none,
5444
5440
(unsigned , bool ))
5445
5441
NOTE(note_add_async_to_function,none,
5446
5442
" add 'async' to function %0 to make it asynchronous" , (const ValueDecl *))
5447
- NOTE(note_add_nonisolated_to_decl,none,
5448
- " add 'nonisolated' to %0 to make this %kindonly0 not isolated to the actor" ,
5449
- (const ValueDecl *))
5450
- NOTE(note_add_async_and_throws_to_decl,none,
5451
- " mark the protocol requirement %0 '%select{|async|throws|async throws}1' "
5452
- " to allow actor-isolated conformances" ,
5453
- (const ValueDecl *, unsigned ))
5454
- NOTE(note_add_distributed_to_decl,none,
5455
- " add 'distributed' to %0 to make this %kindonly0 satisfy the protocol requirement" ,
5443
+ NOTE(note_non_distributed,none, " non-distributed %kind0" ,
5456
5444
(const ValueDecl *))
5457
5445
ERROR(invalid_isolated_calls_in_body,none,
5458
5446
" calls to '@%0'-isolated' code in %kind1" ,
@@ -5684,6 +5672,11 @@ ERROR(distributed_actor_func_unsupported_specifier, none,
5684
5672
ERROR(distributed_actor_func_variadic, none,
5685
5673
" cannot declare variadic argument %0 in %kind1" ,
5686
5674
(DeclName, const ValueDecl *))
5675
+ ERROR(conformance_missing_distributed,none,
5676
+ " conformance of %0 to distributed %kind1 uses non-distributed operations" ,
5677
+ (Type, const ValueDecl *))
5678
+ NOTE(note_add_distributed_multi,none,
5679
+ " mark all declarations used in the conformance 'distributed'" , ())
5687
5680
NOTE(actor_mutable_state,none,
5688
5681
" mutation of this %0 is only permitted within the actor" ,
5689
5682
(DescriptiveDeclKind))
@@ -5702,16 +5695,26 @@ NOTE(shared_state_make_immutable,none,
5702
5695
(const ValueDecl *))
5703
5696
NOTE(shared_state_nonisolated_unsafe,none,
5704
5697
" disable concurrency-safety checks if accesses are protected by an external synchronization mechanism" , (const ValueDecl *))
5705
- ERROR(actor_isolated_witness,none,
5706
- " %select{|distributed }0%1 %kind2 cannot be used to satisfy %3 "
5707
- " requirement from protocol %base4" ,
5708
- (bool , ActorIsolation, const ValueDecl *, ActorIsolation,
5709
- const ValueDecl *))
5698
+ NOTE(note_actor_isolated_witness,none,
5699
+ " %0 %kind1 cannot satisfy %2 requirement" ,
5700
+ (ActorIsolation, const ValueDecl *, ActorIsolation))
5710
5701
ERROR(actor_cannot_conform_to_global_actor_protocol,none,
5711
5702
" actor %0 cannot conform to global actor isolated protocol %1" ,
5712
5703
(Type, Type))
5713
5704
NOTE(protocol_isolated_to_global_actor_here,none,
5714
5705
" %0 is isolated to global actor %1 here" , (Type, Type))
5706
+ ERROR(conformance_mismatched_isolation,none,
5707
+ " conformance of %0 to %kind1 involves isolation mismatches "
5708
+ " and can cause data races" ,
5709
+ (Type, const ValueDecl *))
5710
+ ERROR(conformance_mismatched_isolation_common,none,
5711
+ " conformance of %0 to %kind1 crosses into %2 code and can cause "
5712
+ " data races" , (Type, const ValueDecl *, ActorIsolation))
5713
+ NOTE(note_make_conformance_preconcurrency,none,
5714
+ " turn data races into runtime errors with '@preconcurrency'" ,
5715
+ ())
5716
+ NOTE(note_make_witnesses_nonisolated,none,
5717
+ " mark all declarations used in the conformance 'nonisolated'" , ())
5715
5718
5716
5719
ERROR(isolated_parameter_not_actor,none,
5717
5720
" 'isolated' parameter type %0 does not conform to 'Actor' "
@@ -8369,21 +8372,21 @@ ERROR(attr_abi_incompatible_with_silgen_name,none,
8369
8372
ERROR(isolated_conformance_experimental_feature,none,
8370
8373
" isolated conformances require experimental feature "
8371
8374
" 'IsolatedConformances'" , ())
8375
+ NOTE(note_isolate_conformance_to_global_actor,none,
8376
+ " isolate this conformance to the %select{global actor %0|main actor}1 "
8377
+ " with '@%2'" , (Type, bool , StringRef))
8378
+ NOTE(note_depends_on_isolated_conformance,none,
8379
+ " conformance depends on %0 conformance of %1 to %kind2" ,
8380
+ (ActorIsolation, Type, const ValueDecl *))
8372
8381
ERROR(nonisolated_conformance_depends_on_isolated_conformance,none,
8373
8382
" conformance of %0 to %1 depends on %2 conformance of %3 to %4; mark it as '%5'" ,
8374
8383
(Type, DeclName, ActorIsolation, Type, DeclName, StringRef))
8375
- ERROR(isolated_conformance_mismatch_with_associated_isolation,none,
8376
- " %0 conformance of %1 to %2 cannot depend on %3 conformance of %4 to %5" ,
8377
- (ActorIsolation, Type, DeclName, ActorIsolation, Type, DeclName))
8378
- NOTE(add_isolated_to_conformance,none,
8379
- " add '%0' to the %1 conformance to restrict it to %2 code" ,
8380
- (StringRef, DeclName, ActorIsolation))
8381
8384
ERROR(isolated_conformance_with_sendable,none,
8382
- " %4 conformance of %0 to %1 cannot be used to satisfy conformance "
8385
+ " %4 conformance of %0 to %1 cannot satisfy conformance "
8383
8386
" requirement for a %select{`Sendable`|`SendableMetatype`}2 type "
8384
8387
" parameter %3" , (Type, DeclName, bool , Type, ActorIsolation))
8385
8388
ERROR(isolated_conformance_with_sendable_simple,none,
8386
- " %2 conformance of %0 to %1 cannot be used to satisfy "
8389
+ " %2 conformance of %0 to %1 cannot satisfy "
8387
8390
" conformance requirement for a `Sendable` type parameter " ,
8388
8391
(Type, DeclName, ActorIsolation))
8389
8392
ERROR(isolated_conformance_wrong_domain,none,
0 commit comments