rust/compiler/rustc_mir/src
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](3fef7a74ca) 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
..
borrow_check Auto merge of #82159 - BoxyUwU:uwu, r=varkor 2021-02-24 21:54:52 +00:00
const_eval Auto merge of #82124 - tmiasko:op-ty-ref, r=oli-obk 2021-02-20 10:20:42 +00:00
dataflow Auto merge of #78429 - casey:doctest-attribute-splitting, r=jyn514 2021-02-26 00:17:22 +00:00
interpret Auto merge of #82338 - RalfJung:interp-error-allocs, r=oli-obk 2021-02-25 08:27:09 +00:00
monomorphize Only store a LocalDefId in hir::ImplItem. 2021-02-15 19:32:29 +01:00
transform Auto merge of #82338 - RalfJung:interp-error-allocs, r=oli-obk 2021-02-25 08:27:09 +00:00
util Fix mir-cfg dumps 2021-02-22 17:36:30 +03:00
lib.rs Prevent query cycles during inlining 2021-01-23 16:51:22 +00:00
shim.rs Replace let Some(..) = with .is_some() 2021-01-17 19:06:12 -05:00