summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarek Barvíř <barvirm@gmail.com>2023-04-04 17:10:06 +0200
committerGitHub <noreply@github.com>2023-04-04 17:10:06 +0200
commit1a36ce7fa8a26b498fe22958f50f1fb2880bebc4 (patch)
treed6b708e43da29d74ee62de55318671c40f29567c /src
parentcfc671d82482f8e021fa966a01359abba0f53bd2 (diff)
Disable clippy for specific lines (#503)
Diffstat (limited to 'src')
-rw-r--r--src/eval/func.rs2
-rw-r--r--src/eval/library.rs1
-rw-r--r--src/eval/module.rs1
-rw-r--r--src/eval/value.rs1
-rw-r--r--src/model/content.rs1
-rw-r--r--src/syntax/reparser.rs1
6 files changed, 7 insertions, 0 deletions
diff --git a/src/eval/func.rs b/src/eval/func.rs
index e1472cca..e6402e87 100644
--- a/src/eval/func.rs
+++ b/src/eval/func.rs
@@ -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,
diff --git a/src/eval/library.rs b/src/eval/library.rs
index 5b0ff8e6..b93aa0dd 100644
--- a/src/eval/library.rs
+++ b/src/eval/library.rs
@@ -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>,
diff --git a/src/eval/module.rs b/src/eval/module.rs
index feb5a14b..35025270 100644
--- a/src/eval/module.rs
+++ b/src/eval/module.rs
@@ -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>);
diff --git a/src/eval/value.rs b/src/eval/value.rs
index 517cadc5..b8a51c70 100644
--- a/src/eval/value.rs
+++ b/src/eval/value.rs
@@ -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>);
diff --git a/src/model/content.rs b/src/model/content.rs
index cd4efa77..f95ce104 100644
--- a/src/model/content.rs
+++ b/src/model/content.rs
@@ -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,
diff --git a/src/syntax/reparser.rs b/src/syntax/reparser.rs
index 18960941..f1c606e0 100644
--- a/src/syntax/reparser.rs
+++ b/src/syntax/reparser.rs
@@ -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();