]> git.lizzy.rs Git - rust.git/blobdiff - src/doc/unstable-book/src/language-features/plugin.md
Deprecate using rustc_plugin without the rustc_driver dylib.
[rust.git] / src / doc / unstable-book / src / language-features / plugin.md
index 8be4d16998276f91e4cc63e065304780fd3ef071..53e8393ec52e462a8a7d1bbcae839dbd91b4d3c1 100644 (file)
@@ -18,7 +18,7 @@ extend the compiler's behavior with new syntax extensions, lint checks, etc.
 A plugin is a dynamic library crate with a designated *registrar* function that
 registers extensions with `rustc`. Other crates can load these extensions using
 the crate attribute `#![plugin(...)]`.  See the
-`rustc_plugin` documentation for more about the
+`rustc_driver::plugin` documentation for more about the
 mechanics of defining and loading a plugin.
 
 If present, arguments passed as `#![plugin(foo(... args ...))]` are not
@@ -54,13 +54,13 @@ that implements Roman numeral integer literals.
 extern crate syntax;
 extern crate syntax_pos;
 extern crate rustc;
-extern crate rustc_plugin;
+extern crate rustc_driver;
 
 use syntax::parse::token::{self, Token};
 use syntax::tokenstream::TokenTree;
 use syntax::ext::base::{ExtCtxt, MacResult, DummyResult, MacEager};
 use syntax_pos::Span;
-use rustc_plugin::Registry;
+use rustc_driver::plugin::Registry;
 
 fn expand_rn(cx: &mut ExtCtxt, sp: Span, args: &[TokenTree])
         -> Box<dyn MacResult + 'static> {
@@ -180,11 +180,11 @@ extern crate syntax;
 // Load rustc as a plugin to get macros
 #[macro_use]
 extern crate rustc;
-extern crate rustc_plugin;
+extern crate rustc_driver;
 
 use rustc::lint::{EarlyContext, LintContext, LintPass, EarlyLintPass,
                   EarlyLintPassObject, LintArray};
-use rustc_plugin::Registry;
+use rustc_driver::plugin::Registry;
 use syntax::ast;
 
 declare_lint!(TEST_LINT, Warn, "Warn about items named 'lintme'");