Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Fix some warnings/issues uncovered by the new cfg checking (#12310)

Jakob Hellermanna1e5b122e7d8
diff --git a/Cargo.toml b/Cargo.toml
index 92cddee4b94..49845c5eff3 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -492,5 +492,10 @@ non_canonical_partial_ord_impl = "allow"
reversed_empty_ranges = "allow"
type_complexity = "allow"
+[workspace.lints.rust]
+unexpected_cfgs = { level = "warn", check-cfg = [
+ 'cfg(gles)' # used in gpui
+] }
+
[workspace.metadata.cargo-machete]
ignored = ["bindgen", "cbindgen", "prost_build", "serde"]
diff --git a/crates/collab/src/db/queries/channels.rs b/crates/collab/src/db/queries/channels.rs
index 502fcd59c56..966e52811ab 100644
--- a/crates/collab/src/db/queries/channels.rs
+++ b/crates/collab/src/db/queries/channels.rs
@@ -713,7 +713,7 @@ impl Database {
.find_also_related(user::Entity)
.filter(channel_member::Column::ChannelId.eq(channel.root_id()));
- if cfg!(any(test, sqlite)) && self.pool.get_database_backend() == DbBackend::Sqlite {
+ if cfg!(any(test, feature = "sqlite")) && self.pool.get_database_backend() == DbBackend::Sqlite {
query = query.filter(Expr::cust_with_values(
"UPPER(github_login) LIKE ?",
[Self::fuzzy_like_string(&filter.to_uppercase())],
diff --git a/crates/languages/Cargo.toml b/crates/languages/Cargo.toml
index 1661586c997..96df7ef410f 100644
--- a/crates/languages/Cargo.toml
+++ b/crates/languages/Cargo.toml
@@ -8,6 +8,9 @@ license = "GPL-3.0-or-later"
[lints]
workspace = true
+[features]
+test-support = []
+
[dependencies]
anyhow.workspace = true
async-compression.workspace = true
diff --git a/crates/markdown/src/parser.rs b/crates/markdown/src/parser.rs
index 131a614ef80..3626b5e2a45 100644
--- a/crates/markdown/src/parser.rs
+++ b/crates/markdown/src/parser.rs
@@ -144,7 +144,6 @@ pub enum MarkdownTag {
/// A footnote definition. The value contained is the footnote's label by which it can
/// be referred to.
- #[cfg_attr(feature = "serde", serde(borrow))]
FootnoteDefinition(SharedString),
/// A table. Contains a vector describing the text-alignment for each of its columns.