mirror of
https://github.com/salsa-rs/salsa.git
synced 2025-01-13 00:40:22 +00:00
squelch final warnings
This commit is contained in:
parent
949828d942
commit
634366f5fa
1 changed files with 2 additions and 0 deletions
|
@ -97,6 +97,7 @@ pub struct Span<'db> {
|
|||
|
||||
// ANCHOR: diagnostic
|
||||
#[salsa::accumulator]
|
||||
#[allow(dead_code)] // Debug impl uses them
|
||||
#[derive(new)]
|
||||
pub struct Diagnostic {
|
||||
pub start: usize,
|
||||
|
@ -106,6 +107,7 @@ pub struct Diagnostic {
|
|||
// ANCHOR_END: diagnostic
|
||||
|
||||
impl Diagnostic {
|
||||
#[cfg(test)]
|
||||
pub fn render(&self, db: &dyn crate::Db, src: SourceProgram) -> String {
|
||||
use annotate_snippets::*;
|
||||
let line_start = src.text(db)[..self.start].lines().count() + 1;
|
||||
|
|
Loading…
Reference in a new issue