Skip to content

Commit

Permalink
Fix #502
Browse files Browse the repository at this point in the history
  • Loading branch information
smoelius committed Dec 21, 2022
1 parent 2e0ad81 commit 6235e99
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions driver/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ extern crate rustc_driver;
extern crate rustc_interface;
extern crate rustc_lint;
extern crate rustc_session;
extern crate rustc_span;

use anyhow::{bail, ensure, Result};
use dylint_internal::{env, parse_path_filename, rustup::is_rustc};
Expand Down Expand Up @@ -159,6 +160,12 @@ impl rustc_driver::Callbacks for Callbacks {
});
}
for loaded_lib in &loaded_libs {
if let Some(path) = loaded_lib.path.to_str() {
sess.parse_sess
.file_depinfo
.lock()
.insert(rustc_span::Symbol::intern(path));
}
loaded_lib.register_lints(sess, lint_store);
}
if list_enabled() {
Expand Down

0 comments on commit 6235e99

Please sign in to comment.