diff options
| author | bors <bors@rust-lang.org> | 2023-01-11 23:05:58 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-01-11 23:05:58 +0000 |
| commit | 56ee65aeb6d1fad67d903d5ee1359abcf7b94231 (patch) | |
| tree | 2ddda23b3e396ddddfa76f9f282647e3233e0898 /compiler/rustc_mir_build/src/errors.rs | |
| parent | 1e4f90061cc4bc566f99ab21b1f101182b10cf0c (diff) | |
| parent | 106df9ec98012c6fbeb0ffe636f5f566333cfaa1 (diff) | |
| download | rust-56ee65aeb6d1fad67d903d5ee1359abcf7b94231.tar.gz rust-56ee65aeb6d1fad67d903d5ee1359abcf7b94231.zip | |
Auto merge of #106743 - matthiaskrgr:rollup-q5dpxms, r=matthiaskrgr
Rollup of 6 pull requests Successful merges: - #106620 (Detect struct literal needing parentheses) - #106622 (Detect out of bounds range pattern value) - #106703 (Note predicate span on `ImplDerivedObligation`) - #106705 (Report fulfillment errors in new trait solver) - #106726 (Fix some typos in code comments.) - #106734 (Deny having src/test exisiting in tidy) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_mir_build/src/errors.rs')
| -rw-r--r-- | compiler/rustc_mir_build/src/errors.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/compiler/rustc_mir_build/src/errors.rs b/compiler/rustc_mir_build/src/errors.rs index 68179001b91..233eecbd5b4 100644 --- a/compiler/rustc_mir_build/src/errors.rs +++ b/compiler/rustc_mir_build/src/errors.rs @@ -494,6 +494,16 @@ pub struct LowerRangeBoundMustBeLessThanOrEqualToUpper { } #[derive(Diagnostic)] +#[diag(mir_build_literal_in_range_out_of_bounds)] +pub struct LiteralOutOfRange<'tcx> { + #[primary_span] + #[label] + pub span: Span, + pub ty: Ty<'tcx>, + pub max: u128, +} + +#[derive(Diagnostic)] #[diag(mir_build_lower_range_bound_must_be_less_than_upper, code = "E0579")] pub struct LowerRangeBoundMustBeLessThanUpper { #[primary_span] |
