Tweak error code for sized checks of const/static

This commit is contained in:
Michael Goulet 2025-02-18 17:11:12 +00:00
parent e16a049adb
commit c566318a78
12 changed files with 26 additions and 7 deletions

View file

@ -3126,8 +3126,8 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
Applicability::MachineApplicable,
);
}
ObligationCauseCode::ConstSized => {
err.note("constant expressions must have a statically known size");
ObligationCauseCode::SizedConstOrStatic => {
err.note("statics and constants must have a statically known size");
}
ObligationCauseCode::InlineAsmSized => {
err.note("all inline asm arguments must have a statically known size");