Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/syntax/src/lib.rs')
-rw-r--r--crates/syntax/src/lib.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/crates/syntax/src/lib.rs b/crates/syntax/src/lib.rs
index 7346b93192..9e3083066c 100644
--- a/crates/syntax/src/lib.rs
+++ b/crates/syntax/src/lib.rs
@@ -19,6 +19,11 @@
//! [RFC]: <https://github.com/rust-lang/rfcs/pull/2256>
//! [Swift]: <https://github.com/apple/swift/blob/13d593df6f359d0cb2fc81cfaac273297c539455/lib/Syntax/README.md>
+#![cfg_attr(feature = "in-rust-tree", feature(rustc_private))]
+
+#[cfg(feature = "in-rust-tree")]
+extern crate rustc_driver as _;
+
mod parsing;
mod ptr;
mod syntax_error;
@@ -282,7 +287,7 @@ fn api_walkthrough() {
assert!(parse.errors().is_empty());
// The `tree` method returns an owned syntax node of type `SourceFile`.
- // Owned nodes are cheap: inside, they are `Rc` handles to the underling data.
+ // Owned nodes are cheap: inside, they are `Rc` handles to the underlying data.
let file: SourceFile = parse.tree();
// `SourceFile` is the root of the syntax tree. We can iterate file's items.