Skip to content

Long diagnostic for E0541 #51490

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 4 commits into from
Jun 11, 2018
Merged

Long diagnostic for E0541 #51490

merged 4 commits into from
Jun 11, 2018

Conversation

Havvy
Copy link
Contributor

@Havvy Havvy commented Jun 11, 2018

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 11, 2018
@rust-highfive
Copy link
Contributor

The job x86_64-gnu-llvm-3.9 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:05:47]    Compiling rustc_data_structures v0.0.0 (file:///checkout/src/librustc_data_structures)
[00:05:49]    Compiling arena v0.0.0 (file:///checkout/src/libarena)
[00:05:50]    Compiling syntax_pos v0.0.0 (file:///checkout/src/libsyntax_pos)
[00:05:53]    Compiling rustc_errors v0.0.0 (file:///checkout/src/librustc_errors)
[00:06:01] error: description for error code E0541 contains a line longer than 80 characters.
[00:06:01] if you're inserting a long URL use the footnote style to bypass this check.
[00:06:01]    --> libsyntax/diagnostics/macros.rs:13:37
[00:06:01]     |
[00:06:01] 13  |       ($code:tt, $description:tt) => (__register_diagnostic! { $code, $description });
[00:06:01]     | 
[00:06:01]     | 
[00:06:01]    ::: libsyntax/diagnostic_list.rs:16:1
[00:06:01]     |
[00:06:01] 16  | / register_long_diagnostics! {
[00:06:01] 17  | |
[00:06:01] 18  | | E0178: r##"
[00:06:01] 19  | | In types, the `+` type operator has low precedence, so it is often necessary
[00:06:01] 343 | |
[00:06:01] 344 | | }
[00:06:01]     | |_- in this macro invocation
[00:06:01] 
[00:06:01] 
[00:06:01] error: aborting due to previous error
[00:06:01] 
[00:06:01] error: Could not compile `syntax`.
[00:06:01] 
[00:06:01] Caused by:
[00:06:01]   process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustc --crate-name syntax libsyntax/lib.rs --color always --error-format json --crate-type dylib --emit=dep-info,link -C prefer-dynamic -C opt-level=2 -C metadata=6a2f0731783c2bd3 -C extra-filename=-6a2f0731783c2bd3 --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/release/deps --extern syntax_pos=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libsyntax_pos-670f6bac60d99b34.so --extern rustc_data_structures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_data_structures-a7df2fc298b4fb06.so --extern log=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/liblog-5073f1296cd24b67.rlib --extern bitflags=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libbitflags-99b4534960f92449.rlib --extern scoped_tls=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libscoped_tls-b76c070114255d98.rlib --extern serialize=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libserialize-5d0a8a65bb9fe29f.so --extern serialize=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libserialize-5d0a8a65bb9fe29f.rlib --extern rustc_errors=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_errors-c9d6678b1c0f0b46.so --extern rustc_target=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_target-58741ed9de9aae4f.so` (exit code: 101)
[00:06:01] 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" " jemalloc" "--manifest-path" "/checkout/src/rustc/Cargo.toml" "--message-format" "json"
[00:06:01] expected success, got: exit code: 101
[00:06:01] thread 'main' panicked at 'cargo must succeed', bootstrap/compile.rs:1091:9
[00:06:01] travis_fold:end:stage0-rustc

[00:06:01] travis_time:end:stage0-rustc:start=1528708713492163312,finish=1528708773266370054,duration=59774206742


[00:06:01] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap build
[00:06:01] Build completed unsuccessfully in 0:01:11
[00:06:01] Makefile:28: recipe for target 'all' failed
[00:06:01] make: *** [all] Error 1

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:00e4241e
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
---
travis_time:end:03c4092a:start=1528708773762450307,finish=1528708773768307479,duration=5857172
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:0f896308
$ 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:0d52f124
$ 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)

reason="Example invalid meta item. Should be 'note'") // error: unknown meta item
]
fn deprecated_function() {}

Copy link
Member

Choose a reason for hiding this comment

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

You didn't end the code block.

note="This is a valid meta item for the deprecated attribute."
)]
fn deprecated_function() {}
"##,
Copy link
Member

Choose a reason for hiding this comment

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

You didn't end the code block.

Meta items are the key/value pairs inside of an attribute. The keys provided must be one of the
valid keys for the specified attribute.

To fix the problem, either remove the unknown meta item, or rename it it you provided the wrong
Copy link
Member

Choose a reason for hiding this comment

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

"or rename it it you provided"?

@rust-highfive
Copy link
Contributor

The job x86_64-gnu-llvm-3.9 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:06:41]    Compiling rustc_data_structures v0.0.0 (file:///checkout/src/librustc_data_structures)
[00:06:44]    Compiling arena v0.0.0 (file:///checkout/src/libarena)
[00:06:44]    Compiling syntax_pos v0.0.0 (file:///checkout/src/libsyntax_pos)
[00:06:48]    Compiling rustc_errors v0.0.0 (file:///checkout/src/librustc_errors)
[00:06:57] error: description for error code E0541 contains a line longer than 80 characters.
[00:06:57] if you're inserting a long URL use the footnote style to bypass this check.
[00:06:57]    --> libsyntax/diagnostics/macros.rs:13:37
[00:06:57]     |
[00:06:57] 13  |       ($code:tt, $description:tt) => (__register_diagnostic! { $code, $description });
[00:06:57]     | 
[00:06:57]     | 
[00:06:57]    ::: libsyntax/diagnostic_list.rs:16:1
[00:06:57]     |
[00:06:57] 16  | / register_long_diagnostics! {
[00:06:57] 17  | |
[00:06:57] 18  | | E0178: r##"
[00:06:57] 19  | | In types, the `+` type operator has low precedence, so it is often necessary
[00:06:57] 345 | |
[00:06:57] 346 | | }
[00:06:57]     | |_- in this macro invocation
[00:06:57] 

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)


Meta items are the key/value pairs inside of an attribute. The keys provided must be one of the
valid keys for the specified attribute.

To fix the problem, either remove the unknown meta item, or rename it it you provided the wrong
To fix the problem, either remove the unknown meta item, or rename it if you provided the wrong
Copy link
Member

Choose a reason for hiding this comment

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

Please remove the comma as well.

fn deprecated_function() {}
```

Meta items are the key/value pairs inside of an attribute. The keys provided
Copy link
Member

Choose a reason for hiding this comment

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

Why not "key-value pairs" instead of "key/value pairs".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's what was used in the reference. Should probably change it there as well.

provided the wrong name.

In the erroneous code example above, the wrong name was provided, so changing it
to the right name fixes the error.
Copy link
Member

Choose a reason for hiding this comment

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

Please replace "error." by "error:".

Copy link
Member

Choose a reason for hiding this comment

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

Also, the formulation isn't very nice. What about:

"In the erroneous code example above, the wrong name was provided, so changing to a correct one it will fix the error. Example:"

?

@GuillaumeGomez
Copy link
Member

Thanks!

@bors: r+ rollup

@bors
Copy link
Collaborator

bors commented Jun 11, 2018

📌 Commit cf3fcab 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 Jun 11, 2018
@bors
Copy link
Collaborator

bors commented Jun 11, 2018

⌛ Testing commit cf3fcab with merge 0b7c9e7...

bors added a commit that referenced this pull request Jun 11, 2018
@bors
Copy link
Collaborator

bors commented Jun 11, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: GuillaumeGomez
Pushing 0b7c9e7 to master...

@bors bors merged commit cf3fcab into rust-lang:master Jun 11, 2018
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.

4 participants