Skip to content

Commit 582bbcc

Browse files
committed
librustc_privacy => 2018
1 parent 2efa31b commit 582bbcc

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};
@@ -1541,7 +1538,7 @@ impl<'a, 'tcx: 'a> SearchInterfaceForPrivateItemsVisitor<'a, 'tcx> {
15411538
let ret = self.required_visibility == ty::Visibility::Public &&
15421539
self.private_crates.contains(&item_id.krate);
15431540

1544-
debug!("leaks_private_dep(item_id={:?})={}", item_id, ret);
1541+
log::debug!("leaks_private_dep(item_id={:?})={}", item_id, ret);
15451542
return ret;
15461543
}
15471544
}
@@ -1705,7 +1702,7 @@ impl<'a, 'tcx> Visitor<'tcx> for PrivateItemsInPublicInterfacesVisitor<'a, 'tcx>
17051702
}
17061703
}
17071704

1708-
pub fn provide(providers: &mut Providers) {
1705+
pub fn provide(providers: &mut Providers<'_>) {
17091706
*providers = Providers {
17101707
privacy_access_levels,
17111708
check_mod_privacy,

0 commit comments

Comments
 (0)