Skip to content

Commit 49509a5

Browse files
authored
Rollup merge of rust-lang#58109 - Centril:librustc_privacy-2018, r=oli-obk
librustc_privacy => 2018 Transitions `librustc_privacy` to Rust 2018; cc rust-lang#58099 r? @oli-obk
2 parents 18e5c7a + 582bbcc commit 49509a5

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

src/librustc_privacy/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
authors = ["The Rust Project Developers"]
33
name = "rustc_privacy"
44
version = "0.0.0"
5+
edition = "2018"
56

67
[lib]
78
name = "rustc_privacy"

src/librustc_privacy/lib.rs

+5-8
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,15 @@
22
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
33
html_root_url = "https://doc.rust-lang.org/nightly/")]
44

5-
#![feature(nll)]
5+
#![deny(rust_2018_idioms)]
6+
67
#![feature(rustc_diagnostic_macros)]
78

89
#![recursion_limit="256"]
910

10-
#[macro_use] extern crate rustc;
1111
#[macro_use] extern crate syntax;
12-
#[macro_use] extern crate log;
13-
extern crate rustc_typeck;
14-
extern crate syntax_pos;
15-
extern crate rustc_data_structures;
1612

13+
use rustc::bug;
1714
use rustc::hir::{self, Node, PatKind, AssociatedItemKind};
1815
use rustc::hir::def::Def;
1916
use rustc::hir::def_id::{CRATE_DEF_INDEX, LOCAL_CRATE, CrateNum, DefId};
@@ -1584,7 +1581,7 @@ impl<'a, 'tcx: 'a> SearchInterfaceForPrivateItemsVisitor<'a, 'tcx> {
15841581
let ret = self.required_visibility == ty::Visibility::Public &&
15851582
self.private_crates.contains(&item_id.krate);
15861583

1587-
debug!("leaks_private_dep(item_id={:?})={}", item_id, ret);
1584+
log::debug!("leaks_private_dep(item_id={:?})={}", item_id, ret);
15881585
return ret;
15891586
}
15901587
}
@@ -1748,7 +1745,7 @@ impl<'a, 'tcx> Visitor<'tcx> for PrivateItemsInPublicInterfacesVisitor<'a, 'tcx>
17481745
}
17491746
}
17501747

1751-
pub fn provide(providers: &mut Providers) {
1748+
pub fn provide(providers: &mut Providers<'_>) {
17521749
*providers = Providers {
17531750
privacy_access_levels,
17541751
check_mod_privacy,

0 commit comments

Comments
 (0)