tweak code fences in the rustdoc book
You can stack backticks to create "big code fences" if you're documenting some markdown and need to have code fences inside your code fences. This is especially important in this spot in the Rustdoc Book, because we're showing that using no language specifier on your code blocks is interpreted as using `rust`, but the code blocks here lose their code fences!
`````````markdown
``````markdown
Just showing some recursion, nbd.
```rust
println!("sup");
```
``````
(If you have edit powers in the rust-lang/rust repo, hit the edit button to view the source and see even more recursion :P)
`````````
Remove some unnecessary IdxSet methods
This replaces `IdxSet:: reset_to_empty` with `IdxSet:: clear`, and `IdxSet::elems`/`IdxSet::each_bit` with `IdxSet::iter`. Based on some [comments on #rustc](https://botbot.me/mozilla/rustc/2018-01-23/?msg=96063396).
r? @pnkfelix
Add info message for -Wall command
Users coming from other languages (namely C and C++) often expect
to use a -Wall flag. Rustc doesn't support that, and previously it
simply printed that it didn't recognize the "all" lint.
This change makes rustc print out a help message, explaining:
- Why there is no -Wall flag
- How to view all the available warnings
- Point out that the most commonly used warning is -Wunused
- Instead of using a command-line flag, the user should consider
a !#[warn(unused)] directive in the root of their crate.
I tried to keep the language consistent with the other usage help. Comment if I should change anything.
closes#10234, if accepted.
Remove syntax and syntax_pos thread locals
This moves `syntax` and `syntax_pos` globals into a struct which are pointed to by thread locals. Most of the changes here are indentation changes in test. It would probably be a good idea to ignore whitespace changes while reviewing. Some indentation is unchanged to avoid merge conflicts.
r? @michaelwoerister
Replace feature(never_type) with feature(exhaustive_patterns).
feature(exhaustive_patterns) only covers the pattern-exhaustives checks
that used to be covered by feature(never_type)
Move ascii::escape_default to libcore
As requested in #46409, the `ascii::escape_default` method has been added to the core library. All I did was copy over the `std::ascii` module file, remove the (redundant) `AsciiExt` trait, and change some of the documentation to match. None of the tests were changed.
I wasn't sure how to handle the annotations. For `EscapeDefault` and `escape_default()`, I changed them to `#[unstable(feature = "core_ascii", issue = "46409")]`. Is that alright? Or should I leave them as they were?
This commit updates rustc to embed bitcode in each object file generated by
default when compiling for iOS. This was determined in #35968 as a step
towards better compatibility with the iOS toolchain, so let's give it a spin and
see how it turns out!
Note that this also updates the `cc` dependency which should propagate this
change of embedding bitcode for C dependencies as well.
* Pass `opt_level(2)` when calculating CFLAGS to get the right flags on iOS
* Unconditionally pass `-O2` when compiling libbacktrace
This should...
Close#48903Close#48906