diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-03-24 17:08:16 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-24 17:08:16 +0100 |
| commit | 19d3827efe2f4d78f806f9a2736116d48d615234 (patch) | |
| tree | cd509cacc1bf3c821f7bfd7f5c9e340df4546800 /compiler/rustc_codegen_gcc | |
| parent | 702261dce66c6376beba8727563bc2e0b631c9be (diff) | |
| parent | ab92699f4a4bce54675012112693e9919ab19f54 (diff) | |
| download | rust-19d3827efe2f4d78f806f9a2736116d48d615234.tar.gz rust-19d3827efe2f4d78f806f9a2736116d48d615234.zip | |
Rollup merge of #122937 - Zalathar:unbox, r=oli-obk
Unbox and unwrap the contents of `StatementKind::Coverage` The payload of coverage statements was historically a structure with several fields, so it was boxed to avoid bloating `StatementKind`. Now that the payload is a single relatively-small enum, we can replace `Box<Coverage>` with just `CoverageKind`. This patch also adds a size assertion for `StatementKind`, to avoid accidentally bloating it in the future. ``@rustbot`` label +A-code-coverage
Diffstat (limited to 'compiler/rustc_codegen_gcc')
| -rw-r--r-- | compiler/rustc_codegen_gcc/src/coverageinfo.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_gcc/src/coverageinfo.rs b/compiler/rustc_codegen_gcc/src/coverageinfo.rs index 849e9886ef3..4e44f78f23c 100644 --- a/compiler/rustc_codegen_gcc/src/coverageinfo.rs +++ b/compiler/rustc_codegen_gcc/src/coverageinfo.rs @@ -1,11 +1,11 @@ use rustc_codegen_ssa::traits::CoverageInfoBuilderMethods; -use rustc_middle::mir::Coverage; +use rustc_middle::mir::coverage::CoverageKind; use rustc_middle::ty::Instance; use crate::builder::Builder; impl<'a, 'gcc, 'tcx> CoverageInfoBuilderMethods<'tcx> for Builder<'a, 'gcc, 'tcx> { - fn add_coverage(&mut self, _instance: Instance<'tcx>, _coverage: &Coverage) { + fn add_coverage(&mut self, _instance: Instance<'tcx>, _kind: &CoverageKind) { // TODO(antoyo) } } |
