about summary refs log tree commit diff
path: root/src/librustdoc/lib.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2023-11-06 16:52:38 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2023-11-17 10:39:18 +1100
commita3b4961d5f4ddbb0e86d323ebaeccc391f04d8a7 (patch)
tree11983c79f565787193e08fe0b7d86ae771934046 /src/librustdoc/lib.rs
parent73c1fc5bc0632b16705756fc91174c3c3a44e52d (diff)
downloadrust-a3b4961d5f4ddbb0e86d323ebaeccc391f04d8a7.tar.gz
rust-a3b4961d5f4ddbb0e86d323ebaeccc391f04d8a7.zip
Move `lint_store` from `GlobalCtxt` to `Session`.
This was made possible by the removal of plugin support, which
simplified lint store creation.

This simplifies the places in rustc and rustdoc that call
`describe_lints`, which are early on. The lint store is now built before
those places, so they don't have to create their own lint store for
temporary use, they can just use the main one.
Diffstat (limited to 'src/librustdoc/lib.rs')
-rw-r--r--src/librustdoc/lib.rs9
1 files changed, 1 insertions, 8 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(());
         }