about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorTakayuki Maeda <takoyaki0316@gmail.com>2023-11-17 12:56:30 +0900
committerGitHub <noreply@github.com>2023-11-17 12:56:30 +0900
commit2b2dd2514ec80786910d3d562b8dc6629fcb1251 (patch)
treed0562ec4bad9162231391214bc064958aae68fb0 /src
parentf2f526cafab777343b0e24f08d0f5084ac937b8f (diff)
parentdededd2f8b1785f0393c376065be0bdd999475ac (diff)
downloadrust-2b2dd2514ec80786910d3d562b8dc6629fcb1251.tar.gz
rust-2b2dd2514ec80786910d3d562b8dc6629fcb1251.zip
Rollup merge of #117649 - nnethercote:mv-lint_store, r=cjgillot
Move `lint_store`

Some nice cleanups enabled by the removal of compiler plugins.

r? `@cjgillot`
Diffstat (limited to 'src')
-rw-r--r--src/librustdoc/lib.rs9
-rw-r--r--src/tools/clippy/tests/ui/macro_use_imports.stderr12
2 files changed, 7 insertions, 14 deletions
diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs
index a43ea5582b7..5144bbdaf5e 100644
--- a/src/librustdoc/lib.rs
+++ b/src/librustdoc/lib.rs
@@ -797,14 +797,7 @@ fn main_args(
         let sess = compiler.session();
 
         if sess.opts.describe_lints {
-            let mut lint_store = rustc_lint::new_lint_store(sess.enable_internal_lints());
-            let registered_lints = if let Some(register_lints) = compiler.register_lints() {
-                register_lints(sess, &mut lint_store);
-                true
-            } else {
-                false
-            };
-            rustc_driver::describe_lints(sess, &lint_store, registered_lints);
+            rustc_driver::describe_lints(sess);
             return Ok(());
         }
 
diff --git a/src/tools/clippy/tests/ui/macro_use_imports.stderr b/src/tools/clippy/tests/ui/macro_use_imports.stderr
index 6de869699ec..bafe8cfddb4 100644
--- a/src/tools/clippy/tests/ui/macro_use_imports.stderr
+++ b/src/tools/clippy/tests/ui/macro_use_imports.stderr
@@ -1,23 +1,23 @@
 error: `macro_use` attributes are no longer needed in the Rust 2018 edition
-  --> $DIR/macro_use_imports.rs:25:5
+  --> $DIR/macro_use_imports.rs:23:5
    |
 LL |     #[macro_use]
-   |     ^^^^^^^^^^^^ help: remove the attribute and import the macro directly, try: `use mac::inner::nested::string_add;`
+   |     ^^^^^^^^^^^^ help: remove the attribute and import the macro directly, try: `use mac::{inner::mut_mut, inner::try_err};`
    |
    = note: `-D clippy::macro-use-imports` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::macro_use_imports)]`
 
 error: `macro_use` attributes are no longer needed in the Rust 2018 edition
-  --> $DIR/macro_use_imports.rs:23:5
+  --> $DIR/macro_use_imports.rs:21:5
    |
 LL |     #[macro_use]
-   |     ^^^^^^^^^^^^ help: remove the attribute and import the macro directly, try: `use mac::{inner::mut_mut, inner::try_err};`
+   |     ^^^^^^^^^^^^ help: remove the attribute and import the macro directly, try: `use mini_mac::ClippyMiniMacroTest;`
 
 error: `macro_use` attributes are no longer needed in the Rust 2018 edition
-  --> $DIR/macro_use_imports.rs:21:5
+  --> $DIR/macro_use_imports.rs:25:5
    |
 LL |     #[macro_use]
-   |     ^^^^^^^^^^^^ help: remove the attribute and import the macro directly, try: `use mini_mac::ClippyMiniMacroTest;`
+   |     ^^^^^^^^^^^^ help: remove the attribute and import the macro directly, try: `use mac::inner::nested::string_add;`
 
 error: `macro_use` attributes are no longer needed in the Rust 2018 edition
   --> $DIR/macro_use_imports.rs:19:5