Disable clippy for specific lines (#503)

This commit is contained in:
Marek Barvíř 2023-04-04 17:10:06 +02:00 committed by GitHub
parent cfc671d824
commit 1a36ce7fa8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 7 additions and 0 deletions

View File

@ -17,6 +17,7 @@ use crate::syntax::{SourceId, Span, SyntaxNode};
use crate::World;
/// An evaluatable function.
#[allow(clippy::derived_hash_with_manual_eq)]
#[derive(Clone, Hash)]
pub struct Func {
/// The internal representation.
@ -281,6 +282,7 @@ pub(super) struct Closure {
impl Closure {
/// Call the function in the context with the arguments.
#[allow(clippy::too_many_arguments)]
#[comemo::memoize]
fn call(
this: &Func,

View File

@ -65,6 +65,7 @@ pub struct LangItems {
/// A reference: `@target`, `@target[..]`.
pub reference: fn(target: Label, supplement: Option<Content>) -> Content,
/// The keys contained in the bibliography and short descriptions of them.
#[allow(clippy::type_complexity)]
pub bibliography_keys: fn(
world: Tracked<dyn World>,
introspector: Tracked<Introspector>,

View File

@ -7,6 +7,7 @@ use super::{Content, Scope, Value};
use crate::diag::StrResult;
/// An evaluated module, ready for importing or typesetting.
#[allow(clippy::derived_hash_with_manual_eq)]
#[derive(Clone, Hash)]
pub struct Module(Arc<Repr>);

View File

@ -241,6 +241,7 @@ impl Hash for Value {
}
/// A dynamic value.
#[allow(clippy::derived_hash_with_manual_eq)]
#[derive(Clone, Hash)]
pub struct Dynamic(Arc<dyn Bounds>);

View File

@ -16,6 +16,7 @@ use crate::syntax::Span;
use crate::util::pretty_array_like;
/// Composable representation of styled content.
#[allow(clippy::derived_hash_with_manual_eq)]
#[derive(Clone, Hash)]
pub struct Content {
func: ElemFunc,

View File

@ -36,6 +36,7 @@ fn try_reparse(
offset: usize,
) -> Option<Range<usize>> {
// The range of children which overlap with the edit.
#[allow(clippy::reversed_empty_ranges)]
let mut overlap = usize::MAX..0;
let mut cursor = offset;
let node_kind = node.kind();