Skip to content

doc: Runnable examples for log #16846

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 1 commit into from
Aug 31, 2014
Merged

doc: Runnable examples for log #16846

merged 1 commit into from
Aug 31, 2014

Conversation

treeman
Copy link
Contributor

@treeman treeman commented Aug 29, 2014

It took far too long for me to realize how to get the logging macros to print. Also document with //! instead of /*!.

cc @steveklabnik

//! Assumes the binary is `main`:
//!
//! ```{.bash}
//! $ export RUST_LOG=main=error; ./main
Copy link
Member

Choose a reason for hiding this comment

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

In some shells this can be written RUST_LOG=main=error ./main, but I don't know if it is universal.

Also, you can set a global default: RUST_LOG=error ./main.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Cool, it appears you are right.

Also use //! Instead of /*! in liblog.
@treeman
Copy link
Contributor Author

treeman commented Aug 29, 2014

Simplified shell commands and rebased.

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Aug 29, 2014
alexcrichton added a commit to alexcrichton/rust that referenced this pull request Aug 31, 2014
@bors bors merged commit 26b40be into rust-lang:master Aug 31, 2014
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 17, 2024
fix: incorrect handling of `use` and panic issue in `extract_module`.

fix rust-lang#16826

This PR includes the following changes:

1. Simplify the implementation partially, removing many unnecessary loops and `clone()`.

2. When it is found that the top level of the selection contains a `use` statement, a copy of the `use` will be reinserted before extraction. (rust-lang#16826)

3. Fixed an issue during `extract_module`, where if the top level of the selected part contains `A` and `use A::B`, it caused a duplication of `use A`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants