about summary refs log tree commit diff
path: root/compiler/rustc_mir/src/dataflow/framework
diff options
context:
space:
mode:
authorCasey Rodarmor <casey@rodarmor.com>2020-10-26 19:08:42 -0700
committerCasey Rodarmor <casey@rodarmor.com>2021-02-12 00:02:52 -0800
commit66f4883308d999c8b405fdfd442562b8600a462d (patch)
tree86a5d6b52b22914633ca307b7739549f72b4f5e6 /compiler/rustc_mir/src/dataflow/framework
parente9920ef7749d11fc71cc32ca4ba055bcfeaab945 (diff)
downloadrust-66f4883308d999c8b405fdfd442562b8600a462d.tar.gz
rust-66f4883308d999c8b405fdfd442562b8600a462d.zip
[librustdoc] Reform lang string token splitting
Only split doctest lang strings on `,`, ` `, and `\t`. Additionally, to
preserve backwards compatibility with pandoc-style langstrings, strip a
surrounding `{}`, and remove leading `.`s from each token.

Prior to this change, doctest lang strings were split on all
non-alphanumeric characters except `-` or `_`, which limited future
extensions to doctest lang string tokens, for example using `=` for
key-value tokens.

This is a breaking change, although it is not expected to be disruptive,
because lang strings using separators other than `,` and ` ` are not
very common
Diffstat (limited to 'compiler/rustc_mir/src/dataflow/framework')
-rw-r--r--compiler/rustc_mir/src/dataflow/framework/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_mir/src/dataflow/framework/mod.rs b/compiler/rustc_mir/src/dataflow/framework/mod.rs
index 524ad0af1a7..3f7808c2090 100644
--- a/compiler/rustc_mir/src/dataflow/framework/mod.rs
+++ b/compiler/rustc_mir/src/dataflow/framework/mod.rs
@@ -10,7 +10,7 @@
 //! fixpoint solution to your dataflow problem, or implement the `ResultsVisitor` interface and use
 //! `visit_results`. The following example uses the `ResultsCursor` approach.
 //!
-//! ```ignore(cross-crate-imports)
+//! ```ignore (cross-crate-imports)
 //! use rustc_mir::dataflow::Analysis; // Makes `into_engine` available.
 //!
 //! fn do_my_analysis(tcx: TyCtxt<'tcx>, body: &mir::Body<'tcx>) {
@@ -211,7 +211,7 @@ pub trait Analysis<'tcx>: AnalysisDomain<'tcx> {
     /// default impl and the one for all `A: GenKillAnalysis` will do the right thing.
     /// Its purpose is to enable method chaining like so:
     ///
-    /// ```ignore(cross-crate-imports)
+    /// ```ignore (cross-crate-imports)
     /// let results = MyAnalysis::new(tcx, body)
     ///     .into_engine(tcx, body, def_id)
     ///     .iterate_to_fixpoint()