Skip to content

Commit 634366f

Browse files
committed
squelch final warnings
1 parent 949828d commit 634366f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

examples/calc/ir.rs

+2
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ pub struct Span<'db> {
9797

9898
// ANCHOR: diagnostic
9999
#[salsa::accumulator]
100+
#[allow(dead_code)] // Debug impl uses them
100101
#[derive(new)]
101102
pub struct Diagnostic {
102103
pub start: usize,
@@ -106,6 +107,7 @@ pub struct Diagnostic {
106107
// ANCHOR_END: diagnostic
107108

108109
impl Diagnostic {
110+
#[cfg(test)]
109111
pub fn render(&self, db: &dyn crate::Db, src: SourceProgram) -> String {
110112
use annotate_snippets::*;
111113
let line_start = src.text(db)[..self.start].lines().count() + 1;

0 commit comments

Comments
 (0)