Ignore some false positives
This commit is contained in:
parent
c5a2e5dccb
commit
f01c3818c0
4 changed files with 7 additions and 0 deletions
|
|
@ -40,6 +40,7 @@ impl<'a, F> Eprint<'a, F> for Error
|
|||
where
|
||||
F: Files<'a, FileId = FileSource>,
|
||||
{
|
||||
#[allow(single_use_lifetimes)]
|
||||
fn eprint<'f: 'a>(&self, files: &'f F, config: &Config) {
|
||||
match self {
|
||||
Self::Eval(e) => e.eprint(files, config),
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ use codespan_reporting::term::{self, Config};
|
|||
use termcolor::StandardStream;
|
||||
|
||||
pub trait Eprint<'a, F: Files<'a>> {
|
||||
#[allow(single_use_lifetimes)]
|
||||
fn eprint_diagnostic<'f: 'a>(
|
||||
files: &'f F,
|
||||
config: &Config,
|
||||
|
|
@ -15,9 +16,11 @@ pub trait Eprint<'a, F: Files<'a>> {
|
|||
}
|
||||
}
|
||||
|
||||
#[allow(single_use_lifetimes)]
|
||||
fn eprint<'f: 'a>(&self, files: &'f F, config: &Config);
|
||||
}
|
||||
|
||||
#[allow(single_use_lifetimes)]
|
||||
pub fn eprint_error<'a, 'f: 'a, F, E>(files: &'f F, e: &E)
|
||||
where
|
||||
F: Files<'a>,
|
||||
|
|
|
|||
|
|
@ -88,6 +88,7 @@ impl<S> Error<S> {
|
|||
}
|
||||
|
||||
impl<'a, F: Files<'a>> Eprint<'a, F> for Error<F::FileId> {
|
||||
#[allow(single_use_lifetimes)]
|
||||
fn eprint<'f: 'a>(&self, files: &'f F, config: &Config) {
|
||||
let diagnostic = match self {
|
||||
Error::DeltaInvalidStep {
|
||||
|
|
|
|||
|
|
@ -69,6 +69,7 @@ impl<'a, F> Eprint<'a, F> for ParseError<F::FileId>
|
|||
where
|
||||
F: codespan_reporting::files::Files<'a>,
|
||||
{
|
||||
#[allow(single_use_lifetimes)]
|
||||
fn eprint<'f: 'a>(&self, files: &'f F, config: &Config) {
|
||||
let range = match self.error.location {
|
||||
InputLocation::Pos(at) => at..at,
|
||||
|
|
@ -132,6 +133,7 @@ pub enum Error {
|
|||
}
|
||||
|
||||
impl<'a> Eprint<'a, Files> for Error {
|
||||
#[allow(single_use_lifetimes)]
|
||||
fn eprint<'f: 'a>(&self, files: &'f Files, config: &Config) {
|
||||
match self {
|
||||
Self::ResolvePath { path, error } => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue