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

Reach the body of functions returning impl Trait but don't treat it as public #52348

Merged
merged 1 commit into from
Jul 15, 2018

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Jul 13, 2018

fixes #52128

r? @pnkfelix

cc @eddyb

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 13, 2018
@oli-obk oli-obk added beta-nominated Nominated for backporting to the compiler in the beta channel. and removed beta-nominated Nominated for backporting to the compiler in the beta channel. labels Jul 13, 2018
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-5.0 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.

[00:04:01] travis_fold:start:tidy
travis_time:start:tidy
tidy check
[00:04:01] tidy error: /checkout/src/test/run-pass/impl-trait/xcrate-issue-50865.rs: missing trailing newline
[00:04:01] tidy error: /checkout/src/test/run-pass/impl-trait/auxiliary/xcrate.rs: missing trailing newline
[00:04:01] tidy error: /checkout/src/test/ui/impl-trait/issue-52128.rs: missing trailing newline
[00:04:02] some tidy checks failed
[00:04:02] 
[00:04:02] 
[00:04:02] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/tidy" "/checkout/src" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "--no-vendor" "--quiet"
[00:04:02] 
[00:04:02] 
[00:04:02] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
[00:04:02] Build completed unsuccessfully in 0:00:49
[00:04:02] Build completed unsuccessfully in 0:00:49
[00:04:02] Makefile:79: recipe for target 'tidy' failed
[00:04:02] make: *** [tidy] Error 1

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:06479a06
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
---
travis_time:end:031cb24c:start=1531492702666551123,finish=1531492702675265237,duration=8714114
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:02958537
$ head -30 ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
head: cannot open ‘./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers’ for reading: No such file or directory
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:03bc514f
$ dmesg | grep -i kill

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 @TimNN. (Feature Requests)

if let ty::TyAnon(..) = t.sty {
self.0 = true;
}
t.super_visit_with(self)
Copy link
Member

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.

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) {
Copy link
Member

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.

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();
Copy link
Member

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() {}
Copy link
Member

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.

@eddyb
Copy link
Member

eddyb commented Jul 13, 2018

r? @petrochenkov

@oli-obk
Copy link
Contributor Author

oli-obk commented Jul 13, 2018

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.

@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Jul 14, 2018

📌 Commit 61414fd has been approved by petrochenkov

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 14, 2018
@bors
Copy link
Contributor

bors commented Jul 15, 2018

⌛ Testing commit 61414fd with merge cc903c6...

bors added a commit that referenced this pull request Jul 15, 2018
Reach the body of functions returning `impl Trait` but don't treat it as public

fixes #52128

r? @pnkfelix

cc @eddyb
@bors
Copy link
Contributor

bors commented Jul 15, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: petrochenkov
Pushing cc903c6 to master...

@bors bors merged commit 61414fd into rust-lang:master Jul 15, 2018
@oli-obk oli-obk deleted the bugfix branch June 15, 2020 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Private in public lint wrong in presence of impl trait
6 participants