Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

librustc_privacy => 2018 #58109

Merged
merged 1 commit into from
Feb 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/librustc_privacy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
authors = ["The Rust Project Developers"]
name = "rustc_privacy"
version = "0.0.0"
edition = "2018"

[lib]
name = "rustc_privacy"
Expand Down
13 changes: 5 additions & 8 deletions src/librustc_privacy/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,15 @@
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
html_root_url = "https://doc.rust-lang.org/nightly/")]

#![feature(nll)]
#![deny(rust_2018_idioms)]

#![feature(rustc_diagnostic_macros)]

#![recursion_limit="256"]

#[macro_use] extern crate rustc;
#[macro_use] extern crate syntax;
#[macro_use] extern crate log;
extern crate rustc_typeck;
extern crate syntax_pos;
extern crate rustc_data_structures;

use rustc::bug;
use rustc::hir::{self, Node, PatKind, AssociatedItemKind};
use rustc::hir::def::Def;
use rustc::hir::def_id::{CRATE_DEF_INDEX, LOCAL_CRATE, CrateNum, DefId};
Expand Down Expand Up @@ -1541,7 +1538,7 @@ impl<'a, 'tcx: 'a> SearchInterfaceForPrivateItemsVisitor<'a, 'tcx> {
let ret = self.required_visibility == ty::Visibility::Public &&
self.private_crates.contains(&item_id.krate);

debug!("leaks_private_dep(item_id={:?})={}", item_id, ret);
log::debug!("leaks_private_dep(item_id={:?})={}", item_id, ret);
return ret;
}
}
Expand Down Expand Up @@ -1705,7 +1702,7 @@ impl<'a, 'tcx> Visitor<'tcx> for PrivateItemsInPublicInterfacesVisitor<'a, 'tcx>
}
}

pub fn provide(providers: &mut Providers) {
pub fn provide(providers: &mut Providers<'_>) {
*providers = Providers {
privacy_access_levels,
check_mod_privacy,
Expand Down