diff options
| author | Kivooeo <Kivooeo123@gmail.com> | 2025-07-09 15:24:28 +0500 |
|---|---|---|
| committer | Kivooeo <Kivooeo123@gmail.com> | 2025-07-10 15:44:36 +0500 |
| commit | 81a6f189408b71b452a9804818f2cd50d2ed9108 (patch) | |
| tree | 57df4f6ba73ca6fd5ca1663185d000c024796f7f /compiler/rustc_lint/src/lints.rs | |
| parent | f838cbc06de60819faff3413f374706b74824ca2 (diff) | |
| download | rust-81a6f189408b71b452a9804818f2cd50d2ed9108.tar.gz rust-81a6f189408b71b452a9804818f2cd50d2ed9108.zip | |
added error for invalid char cast
Diffstat (limited to 'compiler/rustc_lint/src/lints.rs')
| -rw-r--r-- | compiler/rustc_lint/src/lints.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/compiler/rustc_lint/src/lints.rs b/compiler/rustc_lint/src/lints.rs index 21148833eaf..19989cbcce6 100644 --- a/compiler/rustc_lint/src/lints.rs +++ b/compiler/rustc_lint/src/lints.rs @@ -1747,6 +1747,20 @@ pub(crate) struct OverflowingLiteral<'a> { } #[derive(LintDiagnostic)] +#[diag(lint_surrogate_char_cast)] +#[note] +pub(crate) struct SurrogateCharCast { + pub literal: u128, +} + +#[derive(LintDiagnostic)] +#[diag(lint_too_large_char_cast)] +#[note] +pub(crate) struct TooLargeCharCast { + pub literal: u128, +} + +#[derive(LintDiagnostic)] #[diag(lint_uses_power_alignment)] pub(crate) struct UsesPowerAlignment; |
