diff --git a/tests/ui/doc.stderr b/tests/ui/doc.stderr
index 3279ad8831d..29fe1150b25 100644
--- a/tests/ui/doc.stderr
+++ b/tests/ui/doc.stderr
@@ -21,8 +21,8 @@ LL | /// The foo_bar function does _nothing_. See also foo::bar. (note the dot t
 error: you should put `Foo::some_fun` between ticks in the documentation
   --> $DIR/doc.rs:9:84
    |
-LL | /, andThis /_ is ok. So is `_`. But not Foo::some_fun
-   |                                                                                    ^^^^^^^^^^^^^
+LL | /// Markdown is _weird_. I mean _really weird_. This \_ is ok. So is `_`. But not Foo::some_fun
+   |                                                                                   ^^^^^^^^^^^^^
 
 error: you should put `a::global:path` between ticks in the documentation
   --> $DIR/doc.rs:11:15
diff --git a/tests/ui/update-references.sh b/tests/ui/update-references.sh
index c553e4ef2e3..cd8b3fb33c7 100755
--- a/tests/ui/update-references.sh
+++ b/tests/ui/update-references.sh
@@ -6,7 +6,7 @@
 # script will then copy that output and replace the "expected output"
 # files. You can then commit the changes.
 #
-# If you find yourself manually editing a foo.stderr file, you're
+# If you find yourself manually editing a `foo.stderr` file, you're
 # doing it wrong.
 
 if [[ "$1" == "--help" || "$1" == "-h" || "$1" == "" || "$2" == "" ]]; then