Skip to content

Commit 9996697

Browse files
authored
Merge branch 'master' into taplo_integration
2 parents e1f8e3f + 58de0b1 commit 9996697

File tree

39 files changed

+280
-273
lines changed

39 files changed

+280
-273
lines changed

Cargo.lock

+121-143
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+19-3
Original file line numberDiff line numberDiff line change
@@ -90,18 +90,34 @@ la-arena = { version = "0.3.1" }
9090
lsp-server = { version = "0.7.4" }
9191

9292
# non-local crates
93+
anyhow = "1.0.75"
94+
bitflags = "2.4.1"
95+
cargo_metadata = "0.18.1"
96+
dissimilar = "1.0.7"
97+
either = "1.9.0"
98+
indexmap = "2.1.0"
99+
itertools = "0.12.0"
93100
smallvec = { version = "1.10.0", features = [
94101
"const_new",
95102
"union",
96103
"const_generics",
97104
] }
105+
tracing = "0.1.40"
106+
tracing-tree = "0.3.0"
107+
tracing-subscriber = { version = "0.3.18", default-features = false, features = [
108+
"registry",
109+
"fmt",
110+
"tracing-log",
111+
] }
98112
smol_str = "0.2.0"
99113
nohash-hasher = "0.2.0"
100-
text-size = "1.1.0"
101-
serde = { version = "1.0.156", features = ["derive"] }
102-
serde_json = "1.0.96"
114+
text-size = "1.1.1"
115+
rayon = "1.8.0"
116+
serde = { version = "1.0.192", features = ["derive"] }
117+
serde_json = "1.0.108"
103118
triomphe = { version = "0.1.8", default-features = false, features = ["std"] }
104119
# can't upgrade due to dashmap depending on 0.12.3 currently
105120
hashbrown = { version = "0.12.3", features = [
106121
"inline-more",
107122
], default-features = false }
123+
xshell = "0.2.5"

crates/cfg/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ oorandom = "11.1.3"
2323
# We depend on both individually instead of using `features = ["derive"]` to microoptimize the
2424
# build graph: if the feature was enabled, syn would be built early on in the graph if `smolstr`
2525
# supports `arbitrary`. This way, we avoid feature unification.
26-
arbitrary = "1.3.0"
27-
derive_arbitrary = "1.3.1"
26+
arbitrary = "1.3.2"
27+
derive_arbitrary = "1.3.2"
2828

2929
# local deps
3030
mbe.workspace = true

crates/flycheck/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ rust-version.workspace = true
1212
doctest = false
1313

1414
[dependencies]
15+
cargo_metadata.workspace = true
1516
crossbeam-channel = "0.5.8"
16-
tracing = "0.1.37"
17-
cargo_metadata = "0.15.4"
17+
tracing.workspace = true
1818
rustc-hash = "1.1.0"
1919
serde_json.workspace = true
2020
serde.workspace = true

crates/hir-def/Cargo.toml

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,19 @@ doctest = false
1313

1414
[dependencies]
1515
arrayvec = "0.7.2"
16-
bitflags = "2.1.0"
16+
bitflags.workspace = true
1717
cov-mark = "2.0.0-pre.1"
1818
# We need to freeze the version of the crate, as the raw-api feature is considered unstable
1919
dashmap = { version = "=5.4.0", features = ["raw-api"] }
2020
drop_bomb = "0.1.5"
21-
either = "1.7.0"
21+
either.workspace = true
2222
fst = { version = "0.4.7", default-features = false }
23-
indexmap = "2.0.0"
24-
itertools = "0.10.5"
23+
indexmap.workspace = true
24+
itertools.workspace = true
2525
la-arena.workspace = true
2626
once_cell = "1.17.0"
2727
rustc-hash = "1.1.0"
28-
tracing = "0.1.35"
28+
tracing.workspace = true
2929
smallvec.workspace = true
3030
hashbrown.workspace = true
3131
triomphe.workspace = true

crates/hir-def/src/macro_expansion_tests/builtin_fn_macro.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ fn main() { column!(); }
1717
#[rustc_builtin_macro]
1818
macro_rules! column {() => {}}
1919
20-
fn main() { 0 as u32; }
20+
fn main() { 0u32; }
2121
"#]],
2222
);
2323
}
@@ -74,7 +74,7 @@ fn main() { line!() }
7474
#[rustc_builtin_macro]
7575
macro_rules! line {() => {}}
7676
77-
fn main() { 0 as u32 }
77+
fn main() { 0u32 }
7878
"#]],
7979
);
8080
}

crates/hir-def/src/macro_expansion_tests/mbe/regression.rs

+34
Original file line numberDiff line numberDiff line change
@@ -970,3 +970,37 @@ builtin #format_args ("{}", &[0 2]);
970970
"##]],
971971
);
972972
}
973+
974+
#[test]
975+
fn eager_concat_line() {
976+
check(
977+
r#"
978+
#[rustc_builtin_macro]
979+
#[macro_export]
980+
macro_rules! concat {}
981+
982+
#[rustc_builtin_macro]
983+
#[macro_export]
984+
macro_rules! line {}
985+
986+
fn main() {
987+
concat!("event ", line!());
988+
}
989+
990+
"#,
991+
expect![[r##"
992+
#[rustc_builtin_macro]
993+
#[macro_export]
994+
macro_rules! concat {}
995+
996+
#[rustc_builtin_macro]
997+
#[macro_export]
998+
macro_rules! line {}
999+
1000+
fn main() {
1001+
"event 0u32";
1002+
}
1003+
1004+
"##]],
1005+
);
1006+
}

crates/hir-expand/Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ doctest = false
1313

1414
[dependencies]
1515
cov-mark = "2.0.0-pre.1"
16-
tracing = "0.1.35"
17-
either = "1.7.0"
16+
tracing.workspace = true
17+
either.workspace = true
1818
rustc-hash = "1.1.0"
1919
la-arena.workspace = true
20-
itertools = "0.10.5"
20+
itertools.workspace = true
2121
hashbrown.workspace = true
2222
smallvec.workspace = true
2323
triomphe.workspace = true

crates/hir-expand/src/builtin_fn_macro.rs

+8-19
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ pub fn find_builtin_macro(
7878

7979
register_builtin! {
8080
LAZY:
81-
(column, Column) => column_expand,
81+
(column, Column) => line_expand,
8282
(file, File) => file_expand,
8383
(line, Line) => line_expand,
8484
(module_path, ModulePath) => module_path_expand,
@@ -127,11 +127,13 @@ fn line_expand(
127127
_tt: &tt::Subtree,
128128
) -> ExpandResult<tt::Subtree> {
129129
// dummy implementation for type-checking purposes
130-
let expanded = quote! {
131-
0 as u32
132-
};
133-
134-
ExpandResult::ok(expanded)
130+
ExpandResult::ok(tt::Subtree {
131+
delimiter: tt::Delimiter::unspecified(),
132+
token_trees: vec![tt::TokenTree::Leaf(tt::Leaf::Literal(tt::Literal {
133+
text: "0u32".into(),
134+
span: tt::Span::UNSPECIFIED,
135+
}))],
136+
})
135137
}
136138

137139
fn log_syntax_expand(
@@ -164,19 +166,6 @@ fn stringify_expand(
164166
ExpandResult::ok(expanded)
165167
}
166168

167-
fn column_expand(
168-
_db: &dyn ExpandDatabase,
169-
_id: MacroCallId,
170-
_tt: &tt::Subtree,
171-
) -> ExpandResult<tt::Subtree> {
172-
// dummy implementation for type-checking purposes
173-
let expanded = quote! {
174-
0 as u32
175-
};
176-
177-
ExpandResult::ok(expanded)
178-
}
179-
180169
fn assert_expand(
181170
_db: &dyn ExpandDatabase,
182171
_id: MacroCallId,

crates/hir-ty/Cargo.toml

+11-13
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,20 @@ doctest = false
1313

1414
[dependencies]
1515
cov-mark = "2.0.0-pre.1"
16-
itertools = "0.10.5"
16+
itertools.workspace = true
1717
arrayvec = "0.7.2"
18-
bitflags = "2.1.0"
18+
bitflags.workspace = true
1919
smallvec.workspace = true
2020
ena = "0.14.0"
21-
either = "1.7.0"
21+
either.workspace = true
2222
oorandom = "11.1.3"
23-
tracing = "0.1.35"
23+
tracing.workspace = true
2424
rustc-hash = "1.1.0"
2525
scoped-tls = "1.0.0"
26-
chalk-solve = { version = "0.93.0", default-features = false }
27-
chalk-ir = "0.93.0"
28-
chalk-recursive = { version = "0.93.0", default-features = false }
29-
chalk-derive = "0.93.0"
26+
chalk-solve = { version = "0.94.0", default-features = false }
27+
chalk-ir = "0.94.0"
28+
chalk-recursive = { version = "0.94.0", default-features = false }
29+
chalk-derive = "0.94.0"
3030
la-arena.workspace = true
3131
once_cell = "1.17.0"
3232
triomphe.workspace = true
@@ -47,11 +47,9 @@ limit.workspace = true
4747

4848
[dev-dependencies]
4949
expect-test = "1.4.0"
50-
tracing = "0.1.35"
51-
tracing-subscriber = { version = "0.3.16", default-features = false, features = [
52-
"registry",
53-
] }
54-
tracing-tree = "0.2.1"
50+
tracing.workspace = true
51+
tracing-subscriber.workspace = true
52+
tracing-tree.workspace = true
5553
project-model = { path = "../project-model" }
5654

5755
# local deps

crates/hir-ty/src/tests/macros.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -684,8 +684,7 @@ fn infer_builtin_macros_line() {
684684
}
685685
"#,
686686
expect![[r#"
687-
!0..1 '0': i32
688-
!0..6 '0asu32': u32
687+
!0..4 '0u32': u32
689688
63..87 '{ ...!(); }': ()
690689
73..74 'x': u32
691690
"#]],
@@ -723,8 +722,7 @@ fn infer_builtin_macros_column() {
723722
}
724723
"#,
725724
expect![[r#"
726-
!0..1 '0': i32
727-
!0..6 '0asu32': u32
725+
!0..4 '0u32': u32
728726
65..91 '{ ...!(); }': ()
729727
75..76 'x': u32
730728
"#]],

crates/hir/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ doctest = false
1313

1414
[dependencies]
1515
rustc-hash = "1.1.0"
16-
either = "1.7.0"
16+
either.workspace = true
1717
arrayvec = "0.7.2"
18-
itertools = "0.10.5"
18+
itertools.workspace = true
1919
smallvec.workspace = true
2020
triomphe.workspace = true
2121
once_cell = "1.17.1"

crates/ide-assists/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ doctest = false
1414
[dependencies]
1515
cov-mark = "2.0.0-pre.1"
1616

17-
itertools = "0.10.5"
18-
either = "1.7.0"
17+
itertools.workspace = true
18+
either.workspace = true
1919
smallvec.workspace = true
2020

2121
# local deps

crates/ide-completion/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ doctest = false
1313

1414
[dependencies]
1515
cov-mark = "2.0.0-pre.1"
16-
itertools = "0.10.5"
16+
itertools.workspace = true
1717

1818
once_cell = "1.17.0"
1919
smallvec.workspace = true

crates/ide-db/Cargo.toml

+7-7
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@ doctest = false
1313

1414
[dependencies]
1515
cov-mark = "2.0.0-pre.1"
16-
tracing = "0.1.35"
17-
rayon = "1.6.1"
16+
tracing.workspace = true
17+
rayon.workspace = true
1818
fst = { version = "0.4.7", default-features = false }
1919
rustc-hash = "1.1.0"
2020
once_cell = "1.17.0"
21-
either = "1.7.0"
22-
itertools = "0.10.5"
21+
either.workspace = true
22+
itertools.workspace = true
2323
arrayvec = "0.7.2"
24-
indexmap = "2.0.0"
25-
memchr = "2.5.0"
24+
indexmap.workspace = true
25+
memchr = "2.6.4"
2626
triomphe.workspace = true
2727
nohash-hasher.workspace = true
2828

@@ -43,7 +43,7 @@ line-index.workspace = true
4343
[dev-dependencies]
4444
expect-test = "1.4.0"
4545
oorandom = "11.1.3"
46-
xshell = "0.2.2"
46+
xshell.workspace = true
4747

4848
# local deps
4949
test-utils.workspace = true

crates/ide-db/src/source_change.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,10 @@ impl SnippetEdit {
140140
.with_position()
141141
.map(|pos| {
142142
let (snippet, index) = match pos {
143-
itertools::Position::First(it) | itertools::Position::Middle(it) => it,
143+
(itertools::Position::First, it) | (itertools::Position::Middle, it) => it,
144144
// last/only snippet gets index 0
145-
itertools::Position::Last((snippet, _))
146-
| itertools::Position::Only((snippet, _)) => (snippet, 0),
145+
(itertools::Position::Last, (snippet, _))
146+
| (itertools::Position::Only, (snippet, _)) => (snippet, 0),
147147
};
148148

149149
let range = match snippet {

crates/ide-diagnostics/Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ doctest = false
1313

1414
[dependencies]
1515
cov-mark = "2.0.0-pre.1"
16-
either = "1.7.0"
17-
itertools = "0.10.5"
18-
serde_json = "1.0.86"
16+
either.workspace = true
17+
itertools.workspace = true
18+
serde_json.workspace = true
1919
once_cell = "1.17.0"
2020

2121
# local deps

crates/ide-ssr/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ doctest = false
1414

1515
[dependencies]
1616
cov-mark = "2.0.0-pre.1"
17-
itertools = "0.10.5"
17+
itertools.workspace = true
1818
triomphe.workspace = true
1919
nohash-hasher.workspace = true
2020

crates/ide/Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ doctest = false
1414
[dependencies]
1515
cov-mark = "2.0.0-pre.1"
1616
crossbeam-channel = "0.5.5"
17-
either = "1.7.0"
18-
itertools = "0.10.5"
19-
tracing = "0.1.35"
17+
either.workspace = true
18+
itertools.workspace = true
19+
tracing.workspace = true
2020
oorandom = "11.1.3"
2121
pulldown-cmark-to-cmark = "10.0.4"
2222
pulldown-cmark = { version = "0.9.1", default-features = false }

crates/load-cargo/Cargo.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ authors.workspace = true
1111
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1212

1313
[dependencies]
14-
anyhow = "1.0.62"
14+
anyhow.workspace = true
1515
crossbeam-channel = "0.5.5"
16-
itertools = "0.10.5"
17-
tracing = "0.1.35"
16+
itertools.workspace = true
17+
tracing.workspace = true
1818

1919
ide.workspace = true
20-
ide-db.workspace =true
20+
ide-db.workspace = true
2121
proc-macro-api.workspace = true
2222
project-model.workspace = true
2323
tt.workspace = true

0 commit comments

Comments
 (0)