Skip to content

Make rustdoc not include self-by-value methods from Deref target #45645

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

Merged
merged 1 commit into from
Nov 20, 2017

Conversation

fhartwig
Copy link
Contributor

Fixes #39550

@rust-highfive
Copy link
Contributor

r? @frewsxcv

(rust_highfive has picked a reviewer for you, use r? to override)

@kennytm kennytm added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 31, 2017
@kennytm
Copy link
Member

kennytm commented Oct 31, 2017

Two rustdoc test cases need to be updated, removing the count_ones methods. Or maybe rustdoc should keep the self-by-value methods if the target is Copy (but that would get us into #33396).

[00:56:43] ---- [rustdoc] rustdoc/issue-19190-3.rs stdout ----
[00:56:43] 	
[00:56:43] error: htmldocck failed!
[00:56:43] status: exit code: 1
[00:56:43] command: "/usr/bin/python2.7" "/checkout/src/etc/htmldocck.py" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc/issue-19190-3.stage2-x86_64-unknown-linux-gnu" "/checkout/src/test/rustdoc/issue-19190-3.rs"
[00:56:43] stdout:
[00:56:43] ------------------------------------------
[00:56:43] 
[00:56:43] ------------------------------------------
[00:56:43] stderr:
[00:56:43] ------------------------------------------
[00:56:43] 20: @has check failed
[00:56:43] 	`XPATH PATTERN` did not match
[00:56:43] 	// @has - '//*[@id="method.count_ones"]' 'fn count_ones(self) -> u32'
[00:56:43] 
[00:56:43] Encountered 1 errors
[00:56:43] 
[00:56:43] ------------------------------------------
[00:56:43] 
[00:56:43] failures:
[00:56:43]     [rustdoc] rustdoc/issue-19190-2.rs
[00:56:43]     [rustdoc] rustdoc/issue-19190-3.rs

@bors
Copy link
Collaborator

bors commented Nov 1, 2017

☔ The latest upstream changes (presumably #45187) made this pull request unmergeable. Please resolve the merge conflicts.

@frewsxcv
Copy link
Member

frewsxcv commented Nov 5, 2017

r? @QuietMisdreavus

@QuietMisdreavus
Copy link
Member

What i would suggest to fix the tests, rather than trying to wrangle with Copy, is to instead change the Derefs in those tests to point to String instead, and use fn as_str(&self) -> &str and fn new() -> String instead. That way the test is still checking for the proper thing. Note that for issue-19190-3.rs the Deref impls are actually in src/test/rustdoc/auxiliary/issue-19190-3.rs - that test is checking for cross-crate imports.

@shepmaster shepmaster added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 11, 2017
@shepmaster
Copy link
Member

We haven't heard from you in a week or so, @fhartwig — will you have time to address the most recent feedback?

@fhartwig
Copy link
Contributor Author

@shepmaster Sorry for the silence, I've been pretty busy. I should be able to finish this in the next 2-3 days.

@fhartwig
Copy link
Contributor Author

I've rebased the changes and adapted the failing tests as @QuietMisdreavus suggested (thanks!).

Sorry for the delay.

@QuietMisdreavus
Copy link
Member

@bors r+

Thanks!

@bors
Copy link
Collaborator

bors commented Nov 20, 2017

📌 Commit 32af136 has been approved by QuietMisdreavus

@kennytm kennytm 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 20, 2017
@bors
Copy link
Collaborator

bors commented Nov 20, 2017

⌛ Testing commit 32af136 with merge e061383...

bors added a commit that referenced this pull request Nov 20, 2017
Make rustdoc not include self-by-value methods from Deref target

Fixes #39550
@bors
Copy link
Collaborator

bors commented Nov 20, 2017

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

@bors bors merged commit 32af136 into rust-lang:master Nov 20, 2017
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.

7 participants