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

fixes rust-lang#56766 #59041

Merged

Conversation

saleemjaffer
Copy link
Contributor

@saleemjaffer saleemjaffer commented Mar 9, 2019

fixes #56766

@rust-highfive
Copy link
Collaborator

r? @eddyb

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

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 9, 2019
@saleemjaffer
Copy link
Contributor Author

r? @estebank

@rust-highfive rust-highfive assigned estebank and unassigned eddyb Mar 9, 2019
Copy link
Contributor

@estebank estebank left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a test to src/test/ui/parser/doc-inside-trait-item.rs:

trait User{
    fn test();
    /// empty doc
    //~^ ERROR found a documentation comment that doesn't document anything
}
fn main() {}

and run ./x.py test src/test/ui --bless and add the new test and its corresponding generated .stderr file?

err.help("doc comments must come before what they document, maybe a \
comment was intended with `//`?",
);
err.emit();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For everything between 6636 and 6644 you can replace it with self.span_fatal_err(self.prev_span, Error::UselessDocComment).emit();, like in

s.span_fatal_err(s.prev_span, Error::UselessDocComment).emit();

Copy link
Contributor Author

@saleemjaffer saleemjaffer Mar 10, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#57333 (comment)

@estebank This is the reason I used struct_span_err_with_code. Do we not need that now?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(indeed, this does not seem like it needs to be a fatal error; I concur with @saleemjaffer's choice to use a non-fatal error here.)

@estebank estebank 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 Mar 9, 2019
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.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.
travis_time:end:0f0ddda7:start=1552451371479680683,finish=1552451448956299056,duration=77476618373
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
$ export GCP_CACHE_BUCKET=rust-lang-ci-cache
Setting environment variables from .travis.yml
---

[00:03:21] travis_fold:start:tidy
travis_time:start:tidy
tidy check
[00:03:21] tidy error: /checkout/src/test/ui/parser/doc-inside-trait-item.rs: missing trailing newline
[00:03:22] some tidy checks failed
[00:03:22] 
[00:03:22] 
[00:03:22] 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:03:22] 
[00:03:22] 
[00:03:22] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
[00:03:22] Build completed unsuccessfully in 0:00:47
[00:03:22] Build completed unsuccessfully in 0:00:47
[00:03:22] Makefile:68: recipe for target 'tidy' failed
[00:03:22] make: *** [tidy] Error 1
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:003e61d1
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Wed Mar 13 04:34:20 UTC 2019
---
travis_time:end:064afad9:start=1552451661684368928,finish=1552451661689762848,duration=5393920
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:11965edf
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb --batch -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:1dcf7220
travis_time:start:1dcf7220
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:171e1360
$ 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)

@Dylan-DPC-zz
Copy link

ping from triage @saleemjaffer you need to address the failing test

@saleemjaffer
Copy link
Contributor Author

This was fixed. All tests seem to be passing.

@Dylan-DPC-zz Dylan-DPC-zz added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 25, 2019
@Dylan-DPC-zz
Copy link

@estebank this is ready for a review

@Centril
Copy link
Contributor

Centril commented Mar 30, 2019

Ping from triage, @estebank, we eagerly await your review!

@pnkfelix
Copy link
Member

pnkfelix commented Apr 1, 2019

@bors r? pnkfelix

@pnkfelix
Copy link
Member

pnkfelix commented Apr 1, 2019

@bors r+

@bors
Copy link
Contributor

bors commented Apr 1, 2019

📌 Commit d258481 has been approved by pnkfelix

@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 Apr 1, 2019
@Centril
Copy link
Contributor

Centril commented Apr 1, 2019

r? @pnkfelix

@rust-highfive rust-highfive assigned pnkfelix and unassigned estebank Apr 1, 2019
Centril added a commit to Centril/rust that referenced this pull request Apr 1, 2019
@estebank
Copy link
Contributor

estebank commented Apr 1, 2019

Apologies for the unresponsiveness over the past week. I've been sporadically online.

Centril added a commit to Centril/rust that referenced this pull request Apr 1, 2019
bors added a commit that referenced this pull request Apr 1, 2019
Rollup of 7 pull requests

Successful merges:

 - #58507 (Add a -Z time option which prints only passes which runs once)
 - #58919 (Suggest using anonymous lifetime in `impl Trait` return)
 - #59041 (fixes #56766)
 - #59586 (Fixed URL in cargotest::TEST_REPOS)
 - #59595 (Update rustc-guide submodule)
 - #59601 (Fix small typo)
 - #59603 (stabilize ptr::hash)

Failed merges:

r? @ghost
@bors bors merged commit d258481 into rust-lang:master Apr 1, 2019
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.

Blank document comment in trait raises error different from with that in function.
8 participants