rust/library
bors d95d304861 Auto merge of #78429 - casey:doctest-attribute-splitting, r=jyn514
[librustdoc] Only split lang string on `,`, ` `, and `\t`

Split markdown lang strings into tokens on `,`.

The previous behavior was to split lang strings into tokens on any
character that wasn't a `_`, `_`, or alphanumeric.

This is a potentially breaking change, so please scrutinize! See discussion in #78344.

I noticed some test cases that made me wonder if there might have been some reason for the original behavior:

```
t("{.no_run .example}", false, true, Ignore::None, true, false, false, false, v(), None);
t("{.sh .should_panic}", true, false, Ignore::None, false, false, false, false, v(), None);
t("{.example .rust}", false, false, Ignore::None, true, false, false, false, v(), None);
t("{.test_harness .rust}", false, false, Ignore::None, true, true, false, false, v(), None);
```

It seemed pretty peculiar to specifically test lang strings in braces, with all the tokens prefixed by `.`.

I did some digging, and it looks like the test cases were added way back in [this commit from 2014](https://github.com/rust-lang/rust/commit/3fef7a74ca9a) by `@skade.`

It looks like they were added just to make sure that the splitting was permissive, and aren't testing that those strings in particular are accepted.

Closes https://github.com/rust-lang/rust/issues/78344.
2021-02-26 00:17:22 +00:00
..
alloc library: Normalize safety-for-unsafe-block comments 2021-02-24 06:13:42 +01:00
backtrace@af078ecc0b std: Update the backtrace crate submodule 2020-11-20 11:56:07 -08:00
core Auto merge of #78429 - casey:doctest-attribute-splitting, r=jyn514 2021-02-26 00:17:22 +00:00
panic_abort slightly more typed interface to panic implementation 2020-12-21 13:37:59 +01:00
panic_unwind Revert stabilizing integer::BITS. 2021-02-03 22:23:58 +01:00
proc_macro `impl PartialEq<Punct> for char`; symmetry for #78636 2021-02-19 17:28:19 -08:00
profiler_builtins Fix warning whe building profiler_builtins crate 2020-09-04 15:10:29 +02:00
rtstartup Bump bootstrap compiler to 1.50 beta 2020-12-30 09:27:19 -05:00
rustc-std-workspace-alloc mv std libs to library/ 2020-07-27 19:51:13 -05:00
rustc-std-workspace-core Fix rustc-std-workspace-core documentation 2020-12-20 15:23:21 +08:00
rustc-std-workspace-std mv std libs to library/ 2020-07-27 19:51:13 -05:00
std Rollup merge of #82467 - ojeda:tidy-normalize-safety-comments, r=kennytm 2021-02-25 16:06:21 -05:00
stdarch@9c732a56f6 Update stdarch submodule 2020-12-21 00:00:00 +00:00
term Allow/fix non_fmt_panic in tests. 2021-02-03 23:15:45 +01:00
test Rollup merge of #82349 - tmiasko:pretty-test-timeout, r=Mark-Simulacrum 2021-02-21 15:26:50 +09:00
unwind Support AArch64 ILP32 in libunwind bindings 2021-01-27 22:47:57 +00:00