Skip to content

Commit

Permalink
Fixes for code review.
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixMcFelix committed Aug 21, 2018
1 parent 81684bf commit 54b096a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/librustc/middle/privacy.rs
Expand Up @@ -42,7 +42,6 @@ pub struct AccessLevels<Id = NodeId> {

impl<Id: Hash + Eq> AccessLevels<Id> {
pub fn is_reachable(&self, id: Id) -> bool {
// self.map.contains_key(&id)
self.map.get(&id) >= Some(&AccessLevel::Reachable)
}
pub fn is_exported(&self, id: Id) -> bool {
Expand Down
@@ -1,4 +1,4 @@
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
Expand Down
9 changes: 7 additions & 2 deletions src/test/run-pass/issue-50865-private-impl-trait/main.rs
@@ -1,4 +1,4 @@
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
Expand All @@ -11,7 +11,12 @@
// aux-build:lib.rs

// Regression test for #50865.
// FIXME: explain.
// When using generics or specifying the type directly, this example
// codegens `foo` internally. However, when using a private `impl Trait`
// function which references another private item, `foo` (in this case)
// wouldn't be codegenned until main.rs used `bar`, as with impl Trait
// it is not cast to `fn()` automatically to satisfy e.g.
// `fn foo() -> fn() { ... }`.

extern crate lib;

Expand Down

0 comments on commit 54b096a

Please sign in to comment.