about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--Cargo.toml32
-rw-r--r--config_proc_macro/src/lib.rs2
-rw-r--r--rust-toolchain4
-rw-r--r--src/attr.rs2
-rw-r--r--src/lib.rs11
5 files changed, 16 insertions, 35 deletions
diff --git a/Cargo.toml b/Cargo.toml
index f02d205c049..184c553db1d 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -64,34 +64,4 @@ thiserror = "1.0"
 # for more information.
 rustc-workspace-hack = "1.0.0"
 
-[dependencies.rustc_ast]
-package = "rustc-ap-rustc_ast"
-version = "712.0.0"
-
-[dependencies.rustc_ast_pretty]
-package = "rustc-ap-rustc_ast_pretty"
-version = "712.0.0"
-
-[dependencies.rustc_data_structures]
-package = "rustc-ap-rustc_data_structures"
-version = "712.0.0"
-
-[dependencies.rustc_errors]
-package = "rustc-ap-rustc_errors"
-version = "712.0.0"
-
-[dependencies.rustc_expand]
-package = "rustc-ap-rustc_expand"
-version = "712.0.0"
-
-[dependencies.rustc_parse]
-package = "rustc-ap-rustc_parse"
-version = "712.0.0"
-
-[dependencies.rustc_session]
-package = "rustc-ap-rustc_session"
-version = "712.0.0"
-
-[dependencies.rustc_span]
-package = "rustc-ap-rustc_span"
-version = "712.0.0"
+# Rustc dependencies are loaded from the sysroot, Cargo doesn't know about them.
diff --git a/config_proc_macro/src/lib.rs b/config_proc_macro/src/lib.rs
index 66cfd3c727d..78e7e098ed9 100644
--- a/config_proc_macro/src/lib.rs
+++ b/config_proc_macro/src/lib.rs
@@ -2,8 +2,6 @@
 
 #![recursion_limit = "256"]
 
-extern crate proc_macro;
-
 mod attrs;
 mod config_type;
 mod item_enum;
diff --git a/rust-toolchain b/rust-toolchain
index 0cb2de6a3fb..c06f7353dfb 100644
--- a/rust-toolchain
+++ b/rust-toolchain
@@ -1 +1,3 @@
-nightly-2021-03-26
+[toolchain]
+channel = "nightly-2021-03-26"
+components = ["rustc-dev"]
diff --git a/src/attr.rs b/src/attr.rs
index 015e9f9b252..0e8b3072017 100644
--- a/src/attr.rs
+++ b/src/attr.rs
@@ -376,7 +376,7 @@ impl Rewrite for ast::Attribute {
     }
 }
 
-impl<'a> Rewrite for [ast::Attribute] {
+impl Rewrite for [ast::Attribute] {
     fn rewrite(&self, context: &RewriteContext<'_>, shape: Shape) -> Option<String> {
         if self.is_empty() {
             return Some(String::new());
diff --git a/src/lib.rs b/src/lib.rs
index db48b52f440..8a798777e0e 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,3 +1,4 @@
+#![feature(rustc_private)]
 #![deny(rust_2018_idioms)]
 #![warn(unreachable_pub)]
 
@@ -9,6 +10,16 @@ extern crate lazy_static;
 #[macro_use]
 extern crate log;
 
+// N.B. these crates are loaded from the sysroot, so they need extern crate.
+extern crate rustc_ast;
+extern crate rustc_ast_pretty;
+extern crate rustc_data_structures;
+extern crate rustc_errors;
+extern crate rustc_expand;
+extern crate rustc_parse;
+extern crate rustc_session;
+extern crate rustc_span;
+
 use std::cell::RefCell;
 use std::collections::HashMap;
 use std::fmt;