Auto merge of #17114 - lnicola:hir-expand-in-tree, r=Veykril

minor: Add in-rust-tree feature to hir-expand

CC https://github.com/rust-lang/rust/pull/124199#issuecomment-2067701168
This commit is contained in:
bors 2024-04-20 16:02:57 +00:00
commit 55d9a533b3
7 changed files with 11 additions and 4 deletions

View file

@ -54,7 +54,7 @@ test-utils.workspace = true
test-fixture.workspace = true test-fixture.workspace = true
[features] [features]
in-rust-tree = [] in-rust-tree = ["hir-expand/in-rust-tree"]
[lints] [lints]
workspace = true workspace = true

View file

@ -37,5 +37,8 @@ parser.workspace = true
[dev-dependencies] [dev-dependencies]
expect-test = "1.4.0" expect-test = "1.4.0"
[features]
in-rust-tree = ["syntax/in-rust-tree"]
[lints] [lints]
workspace = true workspace = true

View file

@ -3,7 +3,7 @@
//! Specifically, it implements a concept of `MacroFile` -- a file whose syntax //! Specifically, it implements a concept of `MacroFile` -- a file whose syntax
//! tree originates not from the text of some `FileId`, but from some macro //! tree originates not from the text of some `FileId`, but from some macro
//! expansion. //! expansion.
#![cfg_attr(feature = "in-rust-tree", feature(rustc_private))]
#![warn(rust_2018_idioms, unused_lifetimes)] #![warn(rust_2018_idioms, unused_lifetimes)]
pub mod attrs; pub mod attrs;

View file

@ -61,7 +61,7 @@ test-utils.workspace = true
test-fixture.workspace = true test-fixture.workspace = true
[features] [features]
in-rust-tree = [] in-rust-tree = ["hir-expand/in-rust-tree"]
[lints] [lints]
workspace = true workspace = true

View file

@ -33,7 +33,7 @@ tt.workspace = true
span.workspace = true span.workspace = true
[features] [features]
in-rust-tree = [] in-rust-tree = ["hir-expand/in-rust-tree"]
[lints] [lints]
workspace = true workspace = true

View file

@ -28,5 +28,8 @@ tt.workspace = true
vfs-notify.workspace = true vfs-notify.workspace = true
vfs.workspace = true vfs.workspace = true
[features]
in-rust-tree = ["hir-expand/in-rust-tree"]
[lints] [lints]
workspace = true workspace = true

View file

@ -94,6 +94,7 @@ in-rust-tree = [
"hir/in-rust-tree", "hir/in-rust-tree",
"hir-def/in-rust-tree", "hir-def/in-rust-tree",
"hir-ty/in-rust-tree", "hir-ty/in-rust-tree",
"load-cargo/in-rust-tree",
] ]
[lints] [lints]