diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-02-06 22:45:40 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-06 22:45:40 +0100 |
| commit | ce32d4862b4b50fcf7d1717033336e952839888a (patch) | |
| tree | 09eeb3d12d1cd33279c934a01ca85dc8bcbdd71d /compiler/rustc_pattern_analysis/src/errors.rs | |
| parent | 3c52832375ddb2a4ef1001eead5e49e7a91f7e04 (diff) | |
| parent | f65fe3ba59286710324abb9860667f1ecf805df9 (diff) | |
| download | rust-ce32d4862b4b50fcf7d1717033336e952839888a.tar.gz rust-ce32d4862b4b50fcf7d1717033336e952839888a.zip | |
Rollup merge of #120331 - Nadrieril:no-arena, r=compiler-errors
pattern_analysis: use a plain `Vec` in `DeconstructedPat` The use of an arena-allocated slice in `DeconstructedPat` dates to when we needed the arena anyway for lifetime reasons. Now that we don't, I'm thinking that if `thir::Pat` can use plain old `Vec`s, maybe so can I. r? ```@ghost```
Diffstat (limited to 'compiler/rustc_pattern_analysis/src/errors.rs')
| -rw-r--r-- | compiler/rustc_pattern_analysis/src/errors.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/rustc_pattern_analysis/src/errors.rs b/compiler/rustc_pattern_analysis/src/errors.rs index 88770b0c43b..bdb6cf19eac 100644 --- a/compiler/rustc_pattern_analysis/src/errors.rs +++ b/compiler/rustc_pattern_analysis/src/errors.rs @@ -23,7 +23,10 @@ impl<'tcx> Uncovered<'tcx> { span: Span, cx: &RustcMatchCheckCtxt<'p, 'tcx>, witnesses: Vec<WitnessPat<'p, 'tcx>>, - ) -> Self { + ) -> Self + where + 'tcx: 'p, + { let witness_1 = cx.hoist_witness_pat(witnesses.get(0).unwrap()); Self { span, |
