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

Clarify the short explanation of E0207 #60358

Merged
merged 1 commit into from
Apr 29, 2019
Merged

Conversation

nickolay
Copy link
Contributor

After being greatly improved in #33692, https://doc.rust-lang.org/error-index.html#E0207 uses terminology from the related RFC, which is different from the reference, e.g. "self type" instead of "implementing type" and "trait reference" instead of "implemented trait".

It probably makes no difference to an experienced reader, but for a newbie like me it added to the confusion as you can't look up the definition of the terms being used and can't be sure you've guessed correctly...

I would also move the link to RFC to the top, as it seems to be the only doc that attempts to explain what the third criteria entails), but it seems to go against the accepted style.

@rust-highfive
Copy link
Collaborator

Some changes occurred in diagnostic error codes

cc @GuillaumeGomez

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @matthewjasper (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 28, 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:02546b1f:start=1556480162141635027,finish=1556480163627633299,duration=1485998272
$ 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
$ export AWS_ACCESS_KEY_ID=AKIA46X5W6CZEJZ6XT55
---
[00:04:02] tidy error: /checkout/src/librustc_typeck/error_codes.rs:1947: trailing whitespace
[00:04:04] some tidy checks failed
[00:04:04] 
[00:04:04] 
[00:04:04] 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:04] 
[00:04:04] 
[00:04:04] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
[00:04:04] Build completed unsuccessfully in 0:00:44
[00:04:04] Build completed unsuccessfully in 0:00:44
[00:04:04] Makefile:67: recipe for target 'tidy' failed
[00:04:04] make: *** [tidy] Error 1
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:15954d91
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Sun Apr 28 19:40:19 UTC 2019
---
travis_time:end:01e1d756:start=1556480420013082555,finish=1556480420017615071,duration=4532516
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:00520404
$ 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:0bd4d7b8
travis_time:start:0bd4d7b8
$ 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:339ad9b8
$ 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)

- Use the terms from the reference <https://doc.rust-lang.org/reference/items/implementations.html>
- Add code snippets to explain the terms
@GuillaumeGomez
Copy link
Member

Thanks!

@bors: r+ rollup

@bors
Copy link
Contributor

bors commented Apr 28, 2019

📌 Commit 35f1c2f has been approved by GuillaumeGomez

@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 28, 2019
Centril added a commit to Centril/rust that referenced this pull request Apr 29, 2019
Clarify the short explanation of E0207

After being greatly improved in rust-lang#33692, https://doc.rust-lang.org/error-index.html#E0207 uses terminology from the related RFC, which is different from the [reference](https://doc.rust-lang.org/reference/items/implementations.html), e.g. "self type" instead of "implementing type" and "trait reference" instead of "implemented trait".

It probably makes no difference to an experienced reader, but for a newbie like me it added to the confusion as you can't look up the definition of the terms being used and can't be sure you've guessed correctly...

I would also move the link to RFC to the top, as it seems to be the only doc that attempts to explain what the third criteria entails), but it seems to go against the accepted style.
bors added a commit that referenced this pull request Apr 29, 2019
Rollup of 9 pull requests

Successful merges:

 - #59946 (Fix equivalent string in escape_default docs)
 - #60256 (Option::flatten)
 - #60305 (hir: remove LoweredNodeId)
 - #60334 (Stabilized vectored IO)
 - #60353 (Add test not to forget resolved ICE)
 - #60356 (Stabilize str::as_mut_ptr)
 - #60358 (Clarify the short explanation of E0207)
 - #60359 (resolve: Consider erroneous imports used to avoid duplicate diagnostics)
 - #60360 (Add test case for labeled break in const assignment)

Failed merges:

r? @ghost
@bors bors merged commit 35f1c2f into rust-lang:master Apr 29, 2019
@nickolay nickolay deleted the patch-1 branch April 30, 2019 00:05
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.

None yet

5 participants