Skip to content

Commit 55d9a53

Browse files
committed
Auto merge of rust-lang#17114 - lnicola:hir-expand-in-tree, r=Veykril
minor: Add in-rust-tree feature to hir-expand CC rust-lang#124199 (comment)
2 parents c83d8cf + 4c94e69 commit 55d9a53

File tree

7 files changed

+11
-4
lines changed

7 files changed

+11
-4
lines changed

crates/hir-def/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ test-utils.workspace = true
5454
test-fixture.workspace = true
5555

5656
[features]
57-
in-rust-tree = []
57+
in-rust-tree = ["hir-expand/in-rust-tree"]
5858

5959
[lints]
6060
workspace = true

crates/hir-expand/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,8 @@ parser.workspace = true
3737
[dev-dependencies]
3838
expect-test = "1.4.0"
3939

40+
[features]
41+
in-rust-tree = ["syntax/in-rust-tree"]
42+
4043
[lints]
4144
workspace = true

crates/hir-expand/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//! Specifically, it implements a concept of `MacroFile` -- a file whose syntax
44
//! tree originates not from the text of some `FileId`, but from some macro
55
//! expansion.
6-
6+
#![cfg_attr(feature = "in-rust-tree", feature(rustc_private))]
77
#![warn(rust_2018_idioms, unused_lifetimes)]
88

99
pub mod attrs;

crates/hir-ty/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ test-utils.workspace = true
6161
test-fixture.workspace = true
6262

6363
[features]
64-
in-rust-tree = []
64+
in-rust-tree = ["hir-expand/in-rust-tree"]
6565

6666
[lints]
6767
workspace = true

crates/hir/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ tt.workspace = true
3333
span.workspace = true
3434

3535
[features]
36-
in-rust-tree = []
36+
in-rust-tree = ["hir-expand/in-rust-tree"]
3737

3838
[lints]
3939
workspace = true

crates/load-cargo/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,8 @@ tt.workspace = true
2828
vfs-notify.workspace = true
2929
vfs.workspace = true
3030

31+
[features]
32+
in-rust-tree = ["hir-expand/in-rust-tree"]
33+
3134
[lints]
3235
workspace = true

crates/rust-analyzer/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ in-rust-tree = [
9494
"hir/in-rust-tree",
9595
"hir-def/in-rust-tree",
9696
"hir-ty/in-rust-tree",
97+
"load-cargo/in-rust-tree",
9798
]
9899

99100
[lints]

0 commit comments

Comments
 (0)