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

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

Cargo.toml

Lines changed: 19 additions & 3 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 5 additions & 5 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 34 additions & 0 deletions
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

Lines changed: 3 additions & 3 deletions
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

Lines changed: 8 additions & 19 deletions
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

Lines changed: 11 additions & 13 deletions
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

0 commit comments

Comments
 (0)