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

Confusing documentation for compile_error!() #63375

Closed
SOF3 opened this issue Aug 8, 2019 · 1 comment · Fixed by #63377
Closed

Confusing documentation for compile_error!() #63375

SOF3 opened this issue Aug 8, 2019 · 1 comment · Fixed by #63377
Labels
A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools C-enhancement Category: An issue proposing an enhancement or a PR with one.

Comments

@SOF3
Copy link
Contributor

SOF3 commented Aug 8, 2019

Referring to

rust/src/libcore/macros.rs

Lines 681 to 683 in db7c773

/// This macro should be used when a crate uses a conditional compilation strategy to provide
/// better error messages for erroneous conditions. It's the compiler-level form of [`panic!`],
/// which emits an error at *runtime*, rather than during compilation.

It's the compiler-level form of panic!, which emits an error at runtime, rather than during compilation.

It is unclear whether the "which" refers to "panic!" or "the compiler-level form of panic!". It is more clear to write:

It is the compiler-level form of panic!, but emits an error during compilation, rather than at runtime.

@Centril Centril added A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools C-enhancement Category: An issue proposing an enhancement or a PR with one. labels Aug 8, 2019
@Centril
Copy link
Contributor

Centril commented Aug 8, 2019

@SOF3 Can you file a PR with the change?

SOF3 added a commit to SOF3/rust that referenced this issue Aug 8, 2019
Centril added a commit to Centril/rust that referenced this issue Aug 8, 2019
Improved documentation for compile_error!()

Fixes rust-lang#63375
Centril added a commit to Centril/rust that referenced this issue Aug 8, 2019
Improved documentation for compile_error!()

Fixes rust-lang#63375
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools C-enhancement Category: An issue proposing an enhancement or a PR with one.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants