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
|
where
|
||||||
F: Files<'a, FileId = FileSource>,
|
F: Files<'a, FileId = FileSource>,
|
||||||
{
|
{
|
||||||
|
#[allow(single_use_lifetimes)]
|
||||||
fn eprint<'f: 'a>(&self, files: &'f F, config: &Config) {
|
fn eprint<'f: 'a>(&self, files: &'f F, config: &Config) {
|
||||||
match self {
|
match self {
|
||||||
Self::Eval(e) => e.eprint(files, config),
|
Self::Eval(e) => e.eprint(files, config),
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ use codespan_reporting::term::{self, Config};
|
||||||
use termcolor::StandardStream;
|
use termcolor::StandardStream;
|
||||||
|
|
||||||
pub trait Eprint<'a, F: Files<'a>> {
|
pub trait Eprint<'a, F: Files<'a>> {
|
||||||
|
#[allow(single_use_lifetimes)]
|
||||||
fn eprint_diagnostic<'f: 'a>(
|
fn eprint_diagnostic<'f: 'a>(
|
||||||
files: &'f F,
|
files: &'f F,
|
||||||
config: &Config,
|
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);
|
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)
|
pub fn eprint_error<'a, 'f: 'a, F, E>(files: &'f F, e: &E)
|
||||||
where
|
where
|
||||||
F: Files<'a>,
|
F: Files<'a>,
|
||||||
|
|
|
||||||
|
|
@ -88,6 +88,7 @@ impl<S> Error<S> {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, F: Files<'a>> Eprint<'a, F> for Error<F::FileId> {
|
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) {
|
fn eprint<'f: 'a>(&self, files: &'f F, config: &Config) {
|
||||||
let diagnostic = match self {
|
let diagnostic = match self {
|
||||||
Error::DeltaInvalidStep {
|
Error::DeltaInvalidStep {
|
||||||
|
|
|
||||||
|
|
@ -69,6 +69,7 @@ impl<'a, F> Eprint<'a, F> for ParseError<F::FileId>
|
||||||
where
|
where
|
||||||
F: codespan_reporting::files::Files<'a>,
|
F: codespan_reporting::files::Files<'a>,
|
||||||
{
|
{
|
||||||
|
#[allow(single_use_lifetimes)]
|
||||||
fn eprint<'f: 'a>(&self, files: &'f F, config: &Config) {
|
fn eprint<'f: 'a>(&self, files: &'f F, config: &Config) {
|
||||||
let range = match self.error.location {
|
let range = match self.error.location {
|
||||||
InputLocation::Pos(at) => at..at,
|
InputLocation::Pos(at) => at..at,
|
||||||
|
|
@ -132,6 +133,7 @@ pub enum Error {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Eprint<'a, Files> for Error {
|
impl<'a> Eprint<'a, Files> for Error {
|
||||||
|
#[allow(single_use_lifetimes)]
|
||||||
fn eprint<'f: 'a>(&self, files: &'f Files, config: &Config) {
|
fn eprint<'f: 'a>(&self, files: &'f Files, config: &Config) {
|
||||||
match self {
|
match self {
|
||||||
Self::ResolvePath { path, error } => {
|
Self::ResolvePath { path, error } => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue