diff options
| author | Michael Goulet <michael@errs.io> | 2023-12-22 21:41:05 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-22 21:41:05 -0500 |
| commit | 8c50e3eaeef34470a80f099feb2cbbdba2e7d61f (patch) | |
| tree | ad0c5d00194aa5bb53375d28a77f3a3077aaa980 /compiler/rustc_pattern_analysis/src/lints.rs | |
| parent | eef023c806dfdc85a8fbd0cad5b48a787cfb7683 (diff) | |
| parent | 5fccaee59c290b85612d4adb120b3e745d3f16dd (diff) | |
| download | rust-8c50e3eaeef34470a80f099feb2cbbdba2e7d61f.tar.gz rust-8c50e3eaeef34470a80f099feb2cbbdba2e7d61f.zip | |
Rollup merge of #119230 - Nadrieril:librarify-even-further, r=compiler-errors
Exhaustiveness: clean up after librarification This cleans up some things that weren't done nicely by https://github.com/rust-lang/rust/pull/118842. r? `@compiler-errors`
Diffstat (limited to 'compiler/rustc_pattern_analysis/src/lints.rs')
| -rw-r--r-- | compiler/rustc_pattern_analysis/src/lints.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_pattern_analysis/src/lints.rs b/compiler/rustc_pattern_analysis/src/lints.rs index 450a5cb0a10..2be6e8e3db3 100644 --- a/compiler/rustc_pattern_analysis/src/lints.rs +++ b/compiler/rustc_pattern_analysis/src/lints.rs @@ -203,7 +203,7 @@ pub(crate) fn lint_nonexhaustive_missing_variants<'a, 'p, 'tcx>( }; use rustc_errors::DecorateLint; - let mut err = rcx.tcx.sess.struct_span_warn(*arm.pat.data(), ""); + let mut err = rcx.tcx.sess.struct_span_warn(*arm.pat.data().unwrap(), ""); err.set_primary_message(decorator.msg()); decorator.decorate_lint(&mut err); err.emit(); @@ -253,8 +253,8 @@ pub(crate) fn lint_overlapping_range_endpoints<'a, 'p, 'tcx>( let mut suffixes: SmallVec<[_; 1]> = Default::default(); // Iterate on patterns that contained `overlap`. for pat in column.iter() { - let this_span = *pat.data(); let Constructor::IntRange(this_range) = pat.ctor() else { continue }; + let this_span = *pat.data().unwrap(); if this_range.is_singleton() { // Don't lint when one of the ranges is a singleton. continue; |
