mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
77134bd3e2
interpret: go back to regular string interpolation for error messages Using the translatable diagnostic infrastructure adds a whole lot of boilerplate which isn't actually useful for const-eval errors, so let's get rid of it. This effectively reverts https://github.com/rust-lang/rust/pull/111677. That PR effectively added 1000 lines and this PR only removes around 600 -- the difference is caused by (a) keeping some of the types around for validation, where we can use them to share error strings and to trigger the extra help for pointer byte shenanigans during CTFE, and (b) this not being a full revert of rust-lang/rust#111677; I am not touching diagnostics outside the interpreter such as all the const-checking code which also got converted to fluent in the same PR. The last commit does something similar for `LayoutError`, which also helps deduplicate a bunch of error strings. I can make that into a separate PR if you prefer. r? @oli-obk Fixes https://github.com/rust-lang/rust/issues/113117 Fixes https://github.com/rust-lang/rust/issues/116764 Fixes https://github.com/rust-lang/rust/issues/112618