rust/compiler
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
..
rustc
rustc_apfloat bumped smallvec deps 2021-02-14 18:03:11 +03:00
rustc_arena Update the bootstrap compiler 2021-02-20 17:19:30 -05:00
rustc_ast Rollup merge of #82321 - bugadani:ast3, r=varkor 2021-02-25 14:34:03 +01:00
rustc_ast_lowering Auto merge of #82447 - Amanieu:legacy_const_generics, r=oli-obk 2021-02-25 18:14:50 +00:00
rustc_ast_passes Rollup merge of #82296 - spastorino:pubrules, r=nikomatsakis 2021-02-23 16:10:23 +01:00
rustc_ast_pretty Rollup merge of #82238 - petrochenkov:nocratemod, r=Aaron1011 2021-02-19 02:49:08 +01:00
rustc_attr remove redundant wrapping of return types of allow_internal_unstable() and rustc_allow_const_fn_unstable() 2021-02-21 18:11:27 +01:00
rustc_builtin_macros Remove some P-s 2021-02-20 10:51:26 +01:00
rustc_codegen_cranelift Use a QueryContext for try_mark_green. 2021-02-19 17:51:56 +01:00
rustc_codegen_llvm Rollup merge of #82214 - est31:no_to_string, r=oli-obk 2021-02-25 14:33:59 +01:00
rustc_codegen_ssa Rollup merge of #82214 - est31:no_to_string, r=oli-obk 2021-02-25 14:33:59 +01:00
rustc_data_structures Update the bootstrap compiler 2021-02-20 17:19:30 -05:00
rustc_driver Rollup merge of #82269 - LeSeulArtichaut:cleanup-ppmode, r=spastorino 2021-02-25 16:06:16 -05:00
rustc_error_codes Auto merge of #78429 - casey:doctest-attribute-splitting, r=jyn514 2021-02-26 00:17:22 +00:00
rustc_errors Rollup merge of #82087 - estebank:abolish-ice, r=oli-obk 2021-02-25 14:33:56 +01:00
rustc_expand remove redundant wrapping of return types of allow_internal_unstable() and rustc_allow_const_fn_unstable() 2021-02-21 18:11:27 +01:00
rustc_feature Auto merge of #82447 - Amanieu:legacy_const_generics, r=oli-obk 2021-02-25 18:14:50 +00:00
rustc_fs_util
rustc_graphviz
rustc_hir Improve error msgs when found type is deref of expected 2021-02-23 10:50:06 +03:00
rustc_hir_pretty Auto merge of #81611 - cjgillot:meowner, r=estebank 2021-02-16 22:14:32 +00:00
rustc_incremental Print -Ztime-passes (and misc stats/logs) on stderr, not stdout. 2021-02-18 14:13:38 +02:00
rustc_index
rustc_infer Rollup merge of #81496 - guswynn:expected_async_block, r=oli-obk 2021-02-19 02:49:00 +01:00
rustc_interface Rollup merge of #82269 - LeSeulArtichaut:cleanup-ppmode, r=spastorino 2021-02-25 16:06:16 -05:00
rustc_lexer
rustc_lint Rollup merge of #82113 - m-ou-se:panic-format-lint, r=estebank 2021-02-23 16:10:21 +01:00
rustc_lint_defs Add explanations and suggestions to irrefutable_let_patterns lint 2021-02-18 16:21:16 -08:00
rustc_llvm HWASan support 2021-02-07 23:48:58 -08:00
rustc_macros Move the query system to rustc_query_impl. 2021-02-19 17:51:58 +01:00
rustc_metadata Add #[rustc_legacy_const_generics] 2021-02-23 17:25:55 +00:00
rustc_middle Rollup merge of #82510 - jyn514:fix-typo, r=Dylan-DPC 2021-02-25 16:06:26 -05:00
rustc_mir Auto merge of #78429 - casey:doctest-attribute-splitting, r=jyn514 2021-02-26 00:17:22 +00:00
rustc_mir_build Auto merge of #81978 - tmiasko:head-ctor, r=Mark-Simulacrum 2021-02-22 21:45:50 +00:00
rustc_parse Rollup merge of #82321 - bugadani:ast3, r=varkor 2021-02-25 14:34:03 +01:00
rustc_parse_format
rustc_passes Auto merge of #82447 - Amanieu:legacy_const_generics, r=oli-obk 2021-02-25 18:14:50 +00:00
rustc_plugin_impl Only store a LocalDefId in hir::Item. 2021-02-15 19:32:10 +01:00
rustc_privacy Rollup merge of #82066 - matthewjasper:trait-ref-fix, r=jackh726 2021-02-18 16:57:34 +01:00
rustc_query_impl Simplify hashing. 2021-02-21 12:22:22 +01:00
rustc_query_system Simplify hashing. 2021-02-21 12:22:22 +01:00
rustc_resolve Auto merge of #82447 - Amanieu:legacy_const_generics, r=oli-obk 2021-02-25 18:14:50 +00:00
rustc_save_analysis Only store a LocalDefId in hir::ForeignItem. 2021-02-15 19:32:29 +01:00
rustc_serialize Update the bootstrap compiler 2021-02-20 17:19:30 -05:00
rustc_session Rollup merge of #82269 - LeSeulArtichaut:cleanup-ppmode, r=spastorino 2021-02-25 16:06:16 -05:00
rustc_span Auto merge of #82447 - Amanieu:legacy_const_generics, r=oli-obk 2021-02-25 18:14:50 +00:00
rustc_symbol_mangling Use less HirId when referring to items. 2021-02-15 19:36:12 +01:00
rustc_target Rollup merge of #82166 - kaniini:s390x-musl-target, r=nagisa 2021-02-23 02:51:53 +01:00
rustc_trait_selection Auto merge of #82020 - jyn514:mut-passes, r=camelid,GuillaumeGomez 2021-02-19 16:39:03 +00:00
rustc_traits Rollup merge of #82066 - matthewjasper:trait-ref-fix, r=jackh726 2021-02-18 16:57:34 +01:00
rustc_ty_utils Auto merge of #82159 - BoxyUwU:uwu, r=varkor 2021-02-24 21:54:52 +00:00
rustc_type_ir New pass to deduplicate blocks 2021-02-21 21:51:54 +01:00
rustc_typeck Rollup merge of #82468 - osa1:pick_by_value_method_docs, r=petrochenkov 2021-02-25 16:06:22 -05:00