X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_resolve%2Fsrc%2Fdiagnostics.rs;h=555a3382acfe9ef575e1207f753385e7340161eb;hb=7907385999b4a83d37ed31d334f3ed9ca02983a1;hp=e0a83ba8c0d4ac95ce65bcd3983dbdb3ca1314c3;hpb=76d4862fdd131b6f79dc0a31857f888d26bcdb27;p=rust.git diff --git a/compiler/rustc_resolve/src/diagnostics.rs b/compiler/rustc_resolve/src/diagnostics.rs index e0a83ba8c0d..555a3382acf 100644 --- a/compiler/rustc_resolve/src/diagnostics.rs +++ b/compiler/rustc_resolve/src/diagnostics.rs @@ -2273,16 +2273,16 @@ pub(crate) fn check_for_module_export_macro( /// Given a `binding_span` of a binding within a use statement: /// -/// ``` +/// ```ignore (illustrative) /// use foo::{a, b, c}; -/// ^ +/// // ^ /// ``` /// /// then return the span until the next binding or the end of the statement: /// -/// ``` +/// ```ignore (illustrative) /// use foo::{a, b, c}; -/// ^^^ +/// // ^^^ /// ``` fn find_span_of_binding_until_next_binding( sess: &Session, @@ -2326,14 +2326,14 @@ fn find_span_of_binding_until_next_binding( /// Given a `binding_span`, return the span through to the comma or opening brace of the previous /// binding. /// -/// ``` +/// ```ignore (illustrative) /// use foo::a::{a, b, c}; -/// ^^--- binding span -/// | -/// returned span +/// // ^^--- binding span +/// // | +/// // returned span /// /// use foo::{a, b, c}; -/// --- binding span +/// // --- binding span /// ``` fn extend_span_to_previous_binding(sess: &Session, binding_span: Span) -> Option { let source_map = sess.source_map(); @@ -2369,15 +2369,15 @@ fn extend_span_to_previous_binding(sess: &Session, binding_span: Span) -> Option /// Given a `use_span` of a binding within a use statement, returns the highlighted span and if /// it is a nested use tree. /// -/// ``` +/// ```ignore (illustrative) /// use foo::a::{b, c}; -/// ^^^^^^^^^^ // false +/// // ^^^^^^^^^^ -- false /// /// use foo::{a, b, c}; -/// ^^^^^^^^^^ // true +/// // ^^^^^^^^^^ -- true /// /// use foo::{a, b::{c, d}}; -/// ^^^^^^^^^^^^^^^ // true +/// // ^^^^^^^^^^^^^^^ -- true /// ``` fn find_span_immediately_after_crate_name( sess: &Session,