-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Reach the body of functions returning impl Trait
but don't treat it as public
#52348
Conversation
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
src/librustc/middle/reachable.rs
Outdated
if let ty::TyAnon(..) = t.sty { | ||
self.0 = true; | ||
} | ||
t.super_visit_with(self) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use the flags machinery in rustc::ty
instead. There might already be a flag and method for it there.
src/librustc/middle/reachable.rs
Outdated
if self.def_id_represents_local_inlined_item(def_id) { | ||
self.worklist.push(node_id); | ||
} else { | ||
if let Some(node_id) = self.tcx.hir.as_local_node_id(def_id) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like botched formatting.
src/librustc_privacy/lib.rs
Outdated
if item_level.is_some() { | ||
// Reach the (potentially private) type and the API being exposed | ||
self.reach(item.id).ty().predicates(); | ||
self.reach(item.id).predicates(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment wasn't updated. Is the intention here that the "type" part doesn't need to be exported, unlike the "predicates", and the reachability pass should handle this instead?
|
||
} | ||
|
||
fn main() {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing newline at the end of a few files.
Nevermind. The fix is just using the correct variable -.- All the other stuff is for a different issue that I'll open a separate PR for. |
@bors r+ |
📌 Commit 61414fd has been approved by |
☀️ Test successful - status-appveyor, status-travis |
fixes #52128
r? @pnkfelix
cc @eddyb