Skip to content

Commit f3f8f4c

Browse files
authored
Merge pull request #18728 from Veykril/push-ozqlrzmqklwt
internal: Split `serde` derive feature into `serde_derive` usage
2 parents 027daf1 + 5211972 commit f3f8f4c

File tree

19 files changed

+51
-49
lines changed

19 files changed

+51
-49
lines changed

Cargo.lock

Lines changed: 18 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,8 @@ pulldown-cmark = { version = "0.9.0", default-features = false }
138138
rayon = "1.8.0"
139139
rustc-hash = "2.0.0"
140140
semver = "1.0.14"
141-
serde = { version = "1.0.192", features = ["derive"] }
141+
serde = { version = "1.0.192" }
142+
serde_derive = { version = "1.0.192" }
142143
serde_json = "1.0.108"
143144
smallvec = { version = "1.10.0", features = [
144145
"const_new",
@@ -157,7 +158,7 @@ tracing-subscriber = { version = "0.3.18", default-features = false, features =
157158
"time",
158159
"tracing-log",
159160
] }
160-
triomphe = { version = "0.1.10", default-features = false, features = ["std"] }
161+
triomphe = { version = "0.1.14", default-features = false, features = ["std"] }
161162
url = "2.3.1"
162163
xshell = "0.2.5"
163164

crates/paths/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,9 @@ doctest = false
1414

1515
[dependencies]
1616
camino.workspace = true
17-
serde = { workspace = true, optional = true }
1817

1918
[features]
20-
serde1 = ["camino/serde1", "dep:serde"]
19+
serde1 = ["camino/serde1"]
2120

2221
[lints]
2322
workspace = true

crates/proc-macro-api/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ doctest = false
1414

1515
[dependencies]
1616
serde.workspace = true
17+
serde_derive.workspace = true
1718
serde_json = { workspace = true, features = ["unbounded_depth"] }
1819
tracing.workspace = true
1920
rustc-hash.workspace = true

crates/proc-macro-api/src/msg.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ pub(crate) mod flat;
44
use std::io::{self, BufRead, Write};
55

66
use paths::Utf8PathBuf;
7-
use serde::{de::DeserializeOwned, Deserialize, Serialize};
7+
use serde::de::DeserializeOwned;
8+
use serde_derive::{Deserialize, Serialize};
89

910
use crate::ProcMacroKind;
1011

@@ -123,7 +124,7 @@ impl ExpnGlobals {
123124
}
124125
}
125126

126-
pub trait Message: Serialize + DeserializeOwned {
127+
pub trait Message: serde::Serialize + DeserializeOwned {
127128
fn read<R: BufRead>(
128129
from_proto: ProtocolRead<R>,
129130
inp: &mut R,

crates/proc-macro-api/src/msg/flat.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ use std::collections::VecDeque;
3939

4040
use intern::Symbol;
4141
use rustc_hash::FxHashMap;
42-
use serde::{Deserialize, Serialize};
42+
use serde_derive::{Deserialize, Serialize};
4343
use span::{EditionedFileId, ErasedFileAstId, Span, SpanAnchor, SyntaxContextId, TextRange};
4444

4545
use crate::msg::EXTENDED_LEAF_DATA;

crates/project-model/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ rustc-hash.workspace = true
1919
semver.workspace = true
2020
serde_json.workspace = true
2121
serde.workspace = true
22+
serde_derive.workspace = true
2223
tracing.workspace = true
2324
triomphe.workspace = true
2425
la-arena.workspace = true

crates/project-model/src/build_dependencies.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use itertools::Itertools;
1515
use la_arena::ArenaMap;
1616
use paths::{AbsPath, AbsPathBuf, Utf8PathBuf};
1717
use rustc_hash::{FxHashMap, FxHashSet};
18-
use serde::Deserialize;
18+
use serde::Deserialize as _;
1919
use toolchain::Tool;
2020

2121
use crate::{

crates/project-model/src/cargo_workspace.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use cargo_metadata::{CargoOpt, MetadataCommand};
88
use la_arena::{Arena, Idx};
99
use paths::{AbsPath, AbsPathBuf, Utf8PathBuf};
1010
use rustc_hash::{FxHashMap, FxHashSet};
11-
use serde::Deserialize;
11+
use serde_derive::Deserialize;
1212
use serde_json::from_value;
1313
use span::Edition;
1414
use toolchain::Tool;

crates/ra-salsa/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ parking_lot = "0.12.1"
2020
rustc-hash = "2.0.0"
2121
smallvec = "1.0.0"
2222
oorandom = "11"
23-
triomphe = "0.1.11"
23+
triomphe.workspace = true
2424
itertools.workspace = true
2525

2626
ra-salsa-macros = { version = "0.0.0", path = "ra-salsa-macros", package = "salsa-macros" }

0 commit comments

Comments
 (0)