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

Convert old first edition links to current edition one #57856

Merged
merged 1 commit into from Feb 14, 2019

Conversation

Projects
None yet
7 participants
@lzutao
Copy link
Contributor

lzutao commented Jan 23, 2019

r? @steveklabnik

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Jan 23, 2019

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @steveklabnik (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

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Jan 23, 2019

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:09559c14:start=1548227820661750598,finish=1548227822611622372,duration=1949871774
$ 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
Setting environment variables from .travis.yml
$ export IMAGE=x86_64-gnu-llvm-6.0
---

[00:03:44] travis_fold:start:tidy
travis_time:start:tidy
tidy check
[00:03:44] tidy error: /checkout/src/libproc_macro/lib.rs:8: line longer than 100 chars
[00:03:44] tidy error: /checkout/src/librustc_typeck/diagnostics.rs:1546: line longer than 100 chars
[00:03:44] tidy error: /checkout/src/librustc_typeck/diagnostics.rs:2921: line longer than 100 chars
[00:03:44] tidy error: /checkout/src/librustc_typeck/diagnostics.rs:3027: line longer than 100 chars
[00:03:44] tidy error: /checkout/src/librustc_typeck/diagnostics.rs:3036: line longer than 100 chars
[00:03:44] tidy error: /checkout/src/librustc/diagnostics.rs:645: line longer than 100 chars
[00:03:45] some tidy checks failed
[00:03:45] 
[00:03:45] 
[00:03:45] 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:45] 
[00:03:45] 
[00:03:45] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
[00:03:45] Build completed unsuccessfully in 0:00:47
[00:03:45] Build completed unsuccessfully in 0:00:47
[00:03:45] Makefile:69: recipe for target 'tidy' failed
[00:03:45] make: *** [tidy] Error 1
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:02f2a1ab
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Wed Jan 23 07:21:00 UTC 2019
---
travis_time:end:146efc9c:start=1548228060608080289,finish=1548228060612906734,duration=4826445
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:10bd70c4
$ 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:0574dae0
travis_time:start:0574dae0
$ 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:06895c38
$ 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)

@lzutao lzutao changed the title Convert old first edition links to current edition Convert old first edition links to current edition one Jan 23, 2019

@frewsxcv

This comment has been minimized.

Copy link
Member

frewsxcv commented Jan 23, 2019

Tidy checker wants some lines to be wrapped: https://travis-ci.com/rust-lang/rust/jobs/172317538

@Dylan-DPC

This comment has been minimized.

Copy link
Member

Dylan-DPC commented Feb 11, 2019

ping from triage @steveklabnik awaiting your review on this

@steveklabnik

This comment has been minimized.

Copy link
Member

steveklabnik commented Feb 11, 2019

This looks good to me, but I don't know how to wrap that line.

r=me once CI gets sorted out, but I'm not sure who to ask. Maybe @rust-lang/infra ?

@kennytm

This comment has been minimized.

Copy link
Member

kennytm commented Feb 12, 2019

@lzutao @steveklabnik

I think we could simply add // ignore-tidy-linelength to the file, after applying #57856 (comment).

The register_long_diagnostics! macro will eventually invoke the __register_diagnostic! syntax extension. There is already a length check in it.

if msg.lines().any(|line| line.len() > MAX_DESCRIPTION_WIDTH && !is_url(line)) {
ecx.span_err(span, &format!(
"description for error code {} contains a line longer than {} characters.\n\
if you're inserting a long URL use the footnote style to bypass this check.",
code, MAX_DESCRIPTION_WIDTH
));
}

So we don't need tidy to double-check it.

Alternative: Instead of // ignore-tidy-linelength we could relax tidy's line_is_url() function to accept [stuff]: http://url without being a comment when the file name is diagnostic.rs, but this change is much more involved.

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Feb 12, 2019

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:204b1b28:start=1549988529303668691,finish=1549988614641606610,duration=85337937919
$ 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
Setting environment variables from .travis.yml
$ export IMAGE=x86_64-gnu-llvm-6.0
---
[00:05:59]    Compiling rustc_errors v0.0.0 (/checkout/src/librustc_errors)
[00:07:07]    Compiling syntax_ext v0.0.0 (/checkout/src/libsyntax_ext)
[00:12:30]    Compiling rustc_mir v0.0.0 (/checkout/src/librustc_mir)
[00:12:30]    Compiling rustc_typeck v0.0.0 (/checkout/src/librustc_typeck)
[00:12:31] error: description for error code E0375 contains a line longer than 80 characters.
[00:12:31] if you're inserting a long URL use the footnote style to bypass this check.
[00:12:31]     --> src/librustc_typeck/diagnostics.rs:4:1
[00:12:31]      |
[00:12:31] 4    | / register_long_diagnostics! {
[00:12:31] 5    | |
[00:12:31] 6    | | E0023: r##"
[00:12:31] 7    | | A pattern used to match against an enum variant must provide a sub-pattern for
[00:12:31] 4642 | |
[00:12:31] 4643 | | }
[00:12:31]      | |_^
[00:12:31]      |
[00:12:31]      |
[00:12:31]      = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
[00:12:31] 
[00:12:31] error: description for error code E0604 contains a line longer than 80 characters.
[00:12:31] if you're inserting a long URL use the footnote style to bypass this check.
[00:12:31]     --> src/librustc_typeck/diagnostics.rs:4:1
[00:12:31]      |
[00:12:31] 4    | / register_long_diagnostics! {
[00:12:31] 5    | |
[00:12:31] 6    | | E0023: r##"
[00:12:31] 7    | | A pattern used to match against an enum variant must provide a sub-pattern for
[00:12:31] 4642 | |
[00:12:31] 4643 | | }
[00:12:31]      | |_^
[00:12:31]      |
[00:12:31]      |
[00:12:31]      = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
[00:12:31] 
[00:12:31] error: description for error code E0605 contains a line longer than 80 characters.
[00:12:31] if you're inserting a long URL use the footnote style to bypass this check.
[00:12:31]     --> src/librustc_typeck/diagnostics.rs:4:1
[00:12:31]      |
[00:12:31] 4    | / register_long_diagnostics! {
[00:12:31] 5    | |
[00:12:31] 6    | | E0023: r##"
[00:12:31] 7    | | A pattern used to match against an enum variant must provide a sub-pattern for
[00:12:31] 4642 | |
[00:12:31] 4643 | | }
[00:12:31]      | |_^
[00:12:31]      |
[00:12:31]      |
[00:12:31]      = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
[00:12:31] 
[00:12:31] error: description for error code E0606 contains a line longer than 80 characters.
[00:12:31] if you're inserting a long URL use the footnote style to bypass this check.
[00:12:31]     --> src/librustc_typeck/diagnostics.rs:4:1
[00:12:31]      |
[00:12:31] 4    | / register_long_diagnostics! {
[00:12:31] 5    | |
[00:12:31] 6    | | E0023: r##"
[00:12:31] 7    | | A pattern used to match against an enum variant must provide a sub-pattern for
[00:12:31] 4642 | |
[00:12:31] 4643 | | }
[00:12:31]      | |_^
[00:12:31]      |
[00:12:31]      |
[00:12:31]      = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
[00:12:31] 
[00:12:31] error: description for error code E0607 contains a line longer than 80 characters.
[00:12:31] if you're inserting a long URL use the footnote style to bypass this check.
[00:12:31]     --> src/librustc_typeck/diagnostics.rs:4:1
[00:12:31]      |
[00:12:31] 4    | / register_long_diagnostics! {
[00:12:31] 5    | |
[00:12:31] 6    | | E0023: r##"
[00:12:31] 7    | | A pattern used to match against an enum variant must provide a sub-pattern for
[00:12:31] 4642 | |
[00:12:31] 4643 | | }
[00:12:31]      | |_^
[00:12:31]      |
---
[00:16:26] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-j" "4" "--release" "--locked" "--color" "always" "--features" "" "--manifest-path" "/checkout/src/rustc/Cargo.toml" "--message-format" "json"
[00:16:26] expected success, got: exit code: 101
[00:16:26] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap build
[00:16:26] Build completed unsuccessfully in 0:12:34
[00:16:26] make: *** [all] Error 1
[00:16:26] Makefile:18: recipe for target 'all' failed
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:017c5d0c
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Tue Feb 12 16:40:10 UTC 2019
---
travis_time:end:08022d50:start=1549989611010831226,finish=1549989611015323730,duration=4492504
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:06491802
$ 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:03518594
travis_time:start:03518594
$ 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:037bfb2b
$ 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)

@lzutao

This comment has been minimized.

Copy link
Contributor Author

lzutao commented Feb 13, 2019

Finally travis is green. Should I squash it into single commit?

@steveklabnik

This comment has been minimized.

Copy link
Member

steveklabnik commented Feb 13, 2019

Yeah a squash would be great! r=me after

Convert old doc links to current edition
Use footnote style to bypass the tidy check

@lzutao lzutao force-pushed the lzutao:fix-old-first-edition branch from 2fddb31 to e7f8e63 Feb 13, 2019

@kennytm

This comment has been minimized.

Copy link
Member

kennytm commented Feb 14, 2019

@bors r=steveklabnik

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 14, 2019

📌 Commit e7f8e63 has been approved by steveklabnik

Centril added a commit to Centril/rust that referenced this pull request Feb 14, 2019

Rollup merge of rust-lang#57856 - lzutao:fix-old-first-edition, r=ste…
…veklabnik

Convert old first edition links to current edition one

r? @steveklabnik

Centril added a commit to Centril/rust that referenced this pull request Feb 14, 2019

Rollup merge of rust-lang#57856 - lzutao:fix-old-first-edition, r=ste…
…veklabnik

Convert old first edition links to current edition one

r? @steveklabnik

bors added a commit that referenced this pull request Feb 14, 2019

Auto merge of #58446 - Centril:rollup, r=Centril
Rollup of 8 pull requests

Successful merges:

 - #57451 (suggestion-diagnostics: as_ref improve snippet)
 - #57856 (Convert old first edition links to current edition one)
 - #57992 (Update the future/task API)
 - #58258 (Reduce the size of `hir::Expr`.)
 - #58267 (Tweak "incompatible match arms" error)
 - #58296 (Hidden suggestion support)
 - #58301 (Enable comparing fat pointers)
 - #58308 (Extract block to insert an intrinsic into its own function)

Failed merges:

r? @ghost

@bors bors merged commit e7f8e63 into rust-lang:master Feb 14, 2019

@lzutao lzutao deleted the lzutao:fix-old-first-edition branch Feb 14, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment