@@ -754,20 +754,22 @@ ERROR(sil_moveonlychecker_value_used_after_consume, none,
754
754
" '%0' used after consume" , (StringRef))
755
755
ERROR(sil_moveonlychecker_guaranteed_value_consumed, none,
756
756
" '%0' is borrowed and cannot be consumed" , (StringRef))
757
+
758
+ // FIXME: this diagnostic shouldn't ever be emitted now. rdar://109742587 (closures may still try to consume captures, e.g., borrowed parameters)
757
759
ERROR(sil_moveonlychecker_guaranteed_value_captured_by_closure, none,
758
760
" '%0' is borrowed and cannot be consumed by closure capture" , (StringRef))
761
+
759
762
ERROR(sil_moveonlychecker_let_value_consumed_in_closure, none,
760
763
" captured '%0' cannot be consumed within a closure" , (StringRef))
761
764
ERROR(sil_moveonlychecker_inout_not_reinitialized_before_end_of_function, none,
762
- " '%0' consumed but not reinitialized before end of function" , (StringRef))
763
- ERROR(sil_moveonlychecker_inout_not_reinitialized_before_end_of_closure, none,
764
- " '%0' consumed in closure but not reinitialized before end of closure" , (StringRef))
765
+ " missing reinitialization of '$0' after consume" , (StringRef))
765
766
ERROR(sil_moveonlychecker_value_consumed_in_a_loop, none,
766
767
" '%0' consumed by a use in a loop" , (StringRef))
767
- ERROR(sil_moveonlychecker_exclusivity_violation, none,
768
- " '%0' has consuming use that cannot be eliminated due to a tight exclusivity scope" , (StringRef))
768
+
769
+ // FIXME: feels like the situations where these are emitted aren't suppose to be
770
+ // treated as a consume at all. Leaving the message mostly as-is for now.
769
771
ERROR(sil_moveonlychecker_moveonly_field_consumed, none,
770
- " '%0' has a move only field that was consumed before later uses" , (StringRef))
772
+ " '%0' has a noncopyable field that was consumed before later uses" , (StringRef))
771
773
772
774
ERROR(sil_moveonlychecker_notconsumable_but_assignable_was_consumed_classfield_let, none,
773
775
" '%0' was consumed but it is illegal to consume a noncopyable class let field. One can only read from it" ,
@@ -820,8 +822,12 @@ ERROR(sil_moveonlychecker_not_understand_consumable_and_assignable, none,
820
822
ERROR(sil_moveonlychecker_not_understand_moveonly, none,
821
823
" Usage of a move only type that the move checker does not know how to "
822
824
" check!" , ())
823
- ERROR(sil_moveonlychecker_missed_copy, none,
825
+
826
+ ERROR(sil_moveonlychecker_bug_missed_copy, none,
824
827
" copy of noncopyable typed value. This is a compiler bug. Please file a bug with a small example of the bug" , ())
828
+ ERROR(sil_moveonlychecker_bug_exclusivity_violation, none,
829
+ " '%0' has an unexpected exclusivity violation. This is a compiler bug. Please file a bug with a small example of the bug" , (StringRef))
830
+
825
831
826
832
// move kills copyable values checker diagnostics
827
833
ERROR(sil_movekillscopyablevalue_value_consumed_more_than_once, none,
0 commit comments