Skip to content

Commit ea6fb0f

Browse files
committed
log statements to investigate issue no. 47816
Obviously, this commit is not meant to be merged anywhere
1 parent 75af9df commit ea6fb0f

File tree

4 files changed

+7
-0
lines changed

4 files changed

+7
-0
lines changed

src/Cargo.lock

+1
Original file line numberDiff line numberDiff line change
@@ -2324,6 +2324,7 @@ dependencies = [
23242324
name = "rustc_privacy"
23252325
version = "0.0.0"
23262326
dependencies = [
2327+
"log 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
23272328
"rustc 0.0.0",
23282329
"rustc_data_structures 0.0.0",
23292330
"rustc_typeck 0.0.0",

src/librustc_lint/builtin.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1405,6 +1405,7 @@ impl UnreachablePub {
14051405
fn perform_lint(&self, cx: &LateContext, what: &str, id: ast::NodeId,
14061406
vis: &hir::Visibility, span: Span, exportable: bool) {
14071407
let mut applicability = Applicability::MachineApplicable;
1408+
info!("ZMD debug access levels map is {:?}", cx.access_levels.map);
14081409
match vis.node {
14091410
hir::VisibilityKind::Public if !cx.access_levels.is_reachable(id) => {
14101411
if span.ctxt().outer().expn_info().is_some() {
@@ -1436,6 +1437,7 @@ impl UnreachablePub {
14361437

14371438
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnreachablePub {
14381439
fn check_item(&mut self, cx: &LateContext, item: &hir::Item) {
1440+
info!("ZMD checking item {:?} with id {:?}", item.node, item.id);
14391441
self.perform_lint(cx, "item", item.id, &item.vis, item.span, true);
14401442
}
14411443

src/librustc_privacy/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ path = "lib.rs"
99
crate-type = ["dylib"]
1010

1111
[dependencies]
12+
log = "0.4"
1213
rustc = { path = "../librustc" }
1314
rustc_typeck = { path = "../librustc_typeck" }
1415
syntax = { path = "../libsyntax" }

src/librustc_privacy/lib.rs

+3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
#![recursion_limit="256"]
1818

19+
#[macro_use] extern crate log;
20+
1921
#[macro_use] extern crate rustc;
2022
#[macro_use] extern crate syntax;
2123
extern crate rustc_typeck;
@@ -348,6 +350,7 @@ impl<'a, 'tcx> Visitor<'tcx> for EmbargoVisitor<'a, 'tcx> {
348350
if self.prev_level.is_some() {
349351
let def_id = self.tcx.hir.local_def_id(id);
350352
if let Some(exports) = self.tcx.module_exports(def_id) {
353+
info!("ZMD exports in module {:?} are {:?}", m, exports);
351354
for export in exports.iter() {
352355
if let Some(node_id) = self.tcx.hir.as_local_node_id(export.def.def_id()) {
353356
if export.vis == ty::Visibility::Public {

0 commit comments

Comments
 (0)