about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-08-19 03:45:50 +0000
committerbors <bors@rust-lang.org>2021-08-19 03:45:50 +0000
commitad1eaffc7e24f497e969c47f400ad20ae383f9aa (patch)
tree73902e1b4a0079845cf5a0cd0a45e14eb7de1578 /src
parent6d300391ede6de79469670957b508072d132a2a0 (diff)
parent9bbb57c6ab4d0693b42e6a050ba9ddf8b857a804 (diff)
Auto merge of #88143 - GuillaumeGomez:rollup-sgh318f, r=GuillaumeGomez
Rollup of 10 pull requests

Successful merges:

 - #87818 (Fix anchors display in rustdoc)
 - #87983 (Use more accurate spans when proposing adding lifetime to item)
 - #88012 (Change WASI's `RawFd` from `u32` to `c_int` (`i32`).)
 - #88031 (Make `BuildHasher` object safe)
 - #88036 (Fix dead code warning when inline const is used in pattern)
 - #88082 (Take into account jobs number for rustdoc GUI tests)
 - #88109 (Fix environment variable getter docs)
 - #88111 (Add background-color on clickable definitions in source code)
 - #88129 (Fix dataflow graphviz bug, make dataflow graphviz modules public)
 - #88136 (Move private_unused.rs test to impl-trait)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'src')
-rw-r--r--src/bootstrap/test.rs2
-rw-r--r--src/librustdoc/html/static/css/themes/ayu.css3
-rw-r--r--src/librustdoc/html/static/css/themes/dark.css3
-rw-r--r--src/librustdoc/html/static/css/themes/light.css3
-rw-r--r--src/test/ui/error-codes/E0106.stderr2
-rw-r--r--src/test/ui/generic-associated-types/gat-trait-path-generic-type-arg.stderr2
-rw-r--r--src/test/ui/impl-header-lifetime-elision/assoc-type.stderr2
-rw-r--r--src/test/ui/impl-trait/private_unused.rs (renamed from src/test/ui/type-alias-impl-trait/private_unused.rs)0
-rw-r--r--src/test/ui/issues/issue-19707.stderr8
-rw-r--r--src/test/ui/issues/issue-26638.stderr2
-rw-r--r--src/test/ui/issues/issue-30255.stderr6
-rw-r--r--src/test/ui/lifetimes/lifetime-elision-return-type-requires-explicit-lifetime.stderr4
-rw-r--r--src/test/ui/lifetimes/lifetime-errors/ex1b-return-no-names-if-else.stderr2
-rw-r--r--src/test/ui/lint/dead-code/anon-const-in-pat.rs45
-rw-r--r--src/test/ui/rfc1623-2.stderr4
-rw-r--r--src/test/ui/suggestions/fn-missing-lifetime-in-item.stderr4
-rw-r--r--src/test/ui/suggestions/issue-84592.stderr2
-rw-r--r--src/test/ui/suggestions/issue-86667.stderr4
-rw-r--r--src/test/ui/suggestions/missing-lt-for-hrtb.stderr2
-rw-r--r--src/test/ui/suggestions/return-elided-lifetime.stderr12
-rw-r--r--src/test/ui/underscore-lifetime/in-fn-return-illegal.stderr2
-rw-r--r--src/test/ui/underscore-lifetime/underscore-lifetime-binders.stderr2
-rw-r--r--src/tools/rustdoc-gui/tester.js24
23 files changed, 107 insertions, 33 deletions
diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs
index 9effdb2c959..d12e86b7c1d 100644
--- a/src/bootstrap/test.rs
+++ b/src/bootstrap/test.rs
@@ -933,6 +933,8 @@ impl Step for RustdocGUI {
         let mut command = Command::new(&nodejs);
         command
             .arg(builder.build.src.join("src/tools/rustdoc-gui/tester.js"))
+            .arg("--jobs")
+            .arg(&builder.jobs().to_string())
             .arg("--doc-folder")
             .arg(out_dir.join("doc"))
             .arg("--tests-folder")
diff --git a/src/librustdoc/html/static/css/themes/ayu.css b/src/librustdoc/html/static/css/themes/ayu.css
index 8dd7b2b3edc..dab6d655c6a 100644
--- a/src/librustdoc/html/static/css/themes/ayu.css
+++ b/src/librustdoc/html/static/css/themes/ayu.css
@@ -216,6 +216,9 @@ nav.main .separator {
 a {
 	color: #c5c5c5;
 }
+body.source .example-wrap pre.rust a {
+	background: #c5c5c5;
+}
 
 .docblock:not(.type-decl) a:not(.srclink):not(.test-arrow),
 .docblock-short a:not(.srclink):not(.test-arrow), .item-info a,
diff --git a/src/librustdoc/html/static/css/themes/dark.css b/src/librustdoc/html/static/css/themes/dark.css
index c26122e4bff..d9348be6994 100644
--- a/src/librustdoc/html/static/css/themes/dark.css
+++ b/src/librustdoc/html/static/css/themes/dark.css
@@ -177,6 +177,9 @@ nav.main .separator {
 a {
 	color: #ddd;
 }
+body.source .example-wrap pre.rust a {
+	background: #333;
+}
 
 .docblock:not(.type-decl) a:not(.srclink):not(.test-arrow),
 .docblock-short a:not(.srclink):not(.test-arrow), .item-info a,
diff --git a/src/librustdoc/html/static/css/themes/light.css b/src/librustdoc/html/static/css/themes/light.css
index bc18a724508..0ffe5929ea5 100644
--- a/src/librustdoc/html/static/css/themes/light.css
+++ b/src/librustdoc/html/static/css/themes/light.css
@@ -172,6 +172,9 @@ nav.main .separator {
 a {
 	color: #000;
 }
+body.source .example-wrap pre.rust a {
+	background: #eee;
+}
 
 .docblock:not(.type-decl) a:not(.srclink):not(.test-arrow),
 .docblock-short a:not(.srclink):not(.test-arrow), .item-info a,
diff --git a/src/test/ui/error-codes/E0106.stderr b/src/test/ui/error-codes/E0106.stderr
index ee9a4733fd9..fbd77d96700 100644
--- a/src/test/ui/error-codes/E0106.stderr
+++ b/src/test/ui/error-codes/E0106.stderr
@@ -59,7 +59,7 @@ LL | type MyStr = &str;
 help: consider introducing a named lifetime parameter
    |
 LL | type MyStr<'a> = &'a str;
-   |           ++++   ~~~
+   |           ++++    ++
 
 error: aborting due to 5 previous errors
 
diff --git a/src/test/ui/generic-associated-types/gat-trait-path-generic-type-arg.stderr b/src/test/ui/generic-associated-types/gat-trait-path-generic-type-arg.stderr
index 1594747e54c..e82cbf7e8e5 100644
--- a/src/test/ui/generic-associated-types/gat-trait-path-generic-type-arg.stderr
+++ b/src/test/ui/generic-associated-types/gat-trait-path-generic-type-arg.stderr
@@ -15,7 +15,7 @@ LL |     type F<T1> = &[u8];
 help: consider introducing a named lifetime parameter
    |
 LL |     type F<'a, T1> = &'a [u8];
-   |            +++       ~~~
+   |            +++        ++
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/impl-header-lifetime-elision/assoc-type.stderr b/src/test/ui/impl-header-lifetime-elision/assoc-type.stderr
index b752cde228d..44955c58889 100644
--- a/src/test/ui/impl-header-lifetime-elision/assoc-type.stderr
+++ b/src/test/ui/impl-header-lifetime-elision/assoc-type.stderr
@@ -7,7 +7,7 @@ LL |     type Output = &i32;
 help: consider introducing a named lifetime parameter
    |
 LL |     type Output<'a> = &'a i32;
-   |                ++++   ~~~
+   |                ++++    ++
 
 error[E0106]: missing lifetime specifier
   --> $DIR/assoc-type.rs:16:20
diff --git a/src/test/ui/type-alias-impl-trait/private_unused.rs b/src/test/ui/impl-trait/private_unused.rs
index 92268f1861d..92268f1861d 100644
--- a/src/test/ui/type-alias-impl-trait/private_unused.rs
+++ b/src/test/ui/impl-trait/private_unused.rs
diff --git a/src/test/ui/issues/issue-19707.stderr b/src/test/ui/issues/issue-19707.stderr
index c3e5fcdd63b..18f69bb5775 100644
--- a/src/test/ui/issues/issue-19707.stderr
+++ b/src/test/ui/issues/issue-19707.stderr
@@ -9,11 +9,11 @@ LL | type Foo = fn(&u8, &u8) -> &u8;
 help: consider making the type lifetime-generic with a new `'a` lifetime
    |
 LL | type Foo = for<'a> fn(&'a u8, &'a u8) -> &'a u8;
-   |            +++++++    ~~~~~~  ~~~~~~     ~~~
+   |            +++++++     ++      ++         ++
 help: consider introducing a named lifetime parameter
    |
 LL | type Foo<'a> = fn(&'a u8, &'a u8) -> &'a u8;
-   |         ++++      ~~~~~~  ~~~~~~     ~~~
+   |         ++++       ++      ++         ++
 
 error[E0106]: missing lifetime specifier
   --> $DIR/issue-19707.rs:5:27
@@ -26,11 +26,11 @@ LL | fn bar<F: Fn(&u8, &u8) -> &u8>(f: &F) {}
 help: consider making the bound lifetime-generic with a new `'a` lifetime
    |
 LL | fn bar<F: for<'a> Fn(&'a u8, &'a u8) -> &'a u8>(f: &F) {}
-   |           +++++++    ~~~~~~  ~~~~~~     ~~~
+   |           +++++++     ++      ++         ++
 help: consider introducing a named lifetime parameter
    |
 LL | fn bar<'a, F: Fn(&'a u8, &'a u8) -> &'a u8>(f: &F) {}
-   |        +++       ~~~~~~  ~~~~~~     ~~~
+   |        +++        ++      ++         ++
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/issues/issue-26638.stderr b/src/test/ui/issues/issue-26638.stderr
index 5784ca9d77f..bb7cdcbb100 100644
--- a/src/test/ui/issues/issue-26638.stderr
+++ b/src/test/ui/issues/issue-26638.stderr
@@ -8,7 +8,7 @@ LL | fn parse_type(iter: Box<dyn Iterator<Item=&str>+'static>) -> &str { iter.ne
 help: consider introducing a named lifetime parameter
    |
 LL | fn parse_type<'a>(iter: Box<dyn Iterator<Item=&str>+'static>) -> &'a str { iter.next() }
-   |              ++++                                                ~~~
+   |              ++++                                                 ++
 
 error[E0106]: missing lifetime specifier
   --> $DIR/issue-26638.rs:4:40
diff --git a/src/test/ui/issues/issue-30255.stderr b/src/test/ui/issues/issue-30255.stderr
index 390aa31487a..e5f492af5b3 100644
--- a/src/test/ui/issues/issue-30255.stderr
+++ b/src/test/ui/issues/issue-30255.stderr
@@ -8,7 +8,7 @@ LL | fn f(a: &S, b: i32) -> &i32 {
 help: consider introducing a named lifetime parameter
    |
 LL | fn f<'a>(a: &'a S, b: i32) -> &'a i32 {
-   |     ++++    ~~~~~             ~~~
+   |     ++++     ++                ++
 
 error[E0106]: missing lifetime specifier
   --> $DIR/issue-30255.rs:14:34
@@ -20,7 +20,7 @@ LL | fn g(a: &S, b: bool, c: &i32) -> &i32 {
 help: consider introducing a named lifetime parameter
    |
 LL | fn g<'a>(a: &'a S, b: bool, c: &'a i32) -> &'a i32 {
-   |     ++++    ~~~~~              ~~~~~~~     ~~~
+   |     ++++     ++                 ++          ++
 
 error[E0106]: missing lifetime specifier
   --> $DIR/issue-30255.rs:19:44
@@ -32,7 +32,7 @@ LL | fn h(a: &bool, b: bool, c: &S, d: &i32) -> &i32 {
 help: consider introducing a named lifetime parameter
    |
 LL | fn h<'a>(a: &'a bool, b: bool, c: &'a S, d: &'a i32) -> &'a i32 {
-   |     ++++    ~~~~~~~~              ~~~~~     ~~~~~~~     ~~~
+   |     ++++     ++                    ++        ++          ++
 
 error: aborting due to 3 previous errors
 
diff --git a/src/test/ui/lifetimes/lifetime-elision-return-type-requires-explicit-lifetime.stderr b/src/test/ui/lifetimes/lifetime-elision-return-type-requires-explicit-lifetime.stderr
index d0dc3601202..0e69cd50f6a 100644
--- a/src/test/ui/lifetimes/lifetime-elision-return-type-requires-explicit-lifetime.stderr
+++ b/src/test/ui/lifetimes/lifetime-elision-return-type-requires-explicit-lifetime.stderr
@@ -20,7 +20,7 @@ LL | fn g(_x: &isize, _y: &isize) -> &isize {
 help: consider introducing a named lifetime parameter
    |
 LL | fn g<'a>(_x: &'a isize, _y: &'a isize) -> &'a isize {
-   |     ++++     ~~~~~~~~~      ~~~~~~~~~     ~~~
+   |     ++++      ++             ++            ++
 
 error[E0106]: missing lifetime specifier
   --> $DIR/lifetime-elision-return-type-requires-explicit-lifetime.rs:17:19
@@ -32,7 +32,7 @@ LL | fn h(_x: &Foo) -> &isize {
 help: consider introducing a named lifetime parameter
    |
 LL | fn h<'a>(_x: &'a Foo) -> &'a isize {
-   |     ++++     ~~~~~~~     ~~~
+   |     ++++      ++          ++
 
 error[E0106]: missing lifetime specifier
   --> $DIR/lifetime-elision-return-type-requires-explicit-lifetime.rs:21:20
diff --git a/src/test/ui/lifetimes/lifetime-errors/ex1b-return-no-names-if-else.stderr b/src/test/ui/lifetimes/lifetime-errors/ex1b-return-no-names-if-else.stderr
index cf365af9904..bcc3e9510ac 100644
--- a/src/test/ui/lifetimes/lifetime-errors/ex1b-return-no-names-if-else.stderr
+++ b/src/test/ui/lifetimes/lifetime-errors/ex1b-return-no-names-if-else.stderr
@@ -8,7 +8,7 @@ LL | fn foo(x: &i32, y: &i32) -> &i32 {
 help: consider introducing a named lifetime parameter
    |
 LL | fn foo<'a>(x: &'a i32, y: &'a i32) -> &'a i32 {
-   |       ++++    ~~~~~~~     ~~~~~~~     ~~~
+   |       ++++     ++          ++          ++
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/lint/dead-code/anon-const-in-pat.rs b/src/test/ui/lint/dead-code/anon-const-in-pat.rs
new file mode 100644
index 00000000000..4c6211a279a
--- /dev/null
+++ b/src/test/ui/lint/dead-code/anon-const-in-pat.rs
@@ -0,0 +1,45 @@
+// check-pass
+#![feature(inline_const)]
+#![allow(incomplete_features)]
+#![deny(dead_code)]
+
+const fn one() -> i32 {
+    1
+}
+
+const fn two() -> i32 {
+    2
+}
+
+const fn three() -> i32 {
+    3
+}
+
+fn inline_const() {
+    // rust-lang/rust#78171: dead_code lint triggers even though function is used in const pattern
+    match 1 {
+        const { one() } => {}
+        _ => {}
+    }
+}
+
+fn inline_const_range() {
+    match 1 {
+        1 ..= const { two() } => {}
+        _ => {}
+    }
+}
+
+struct S<const C: i32>;
+
+fn const_generic_arg() {
+    match S::<3> {
+        S::<{three()}> => {}
+    }
+}
+
+fn main() {
+    inline_const();
+    inline_const_range();
+    const_generic_arg();
+}
diff --git a/src/test/ui/rfc1623-2.stderr b/src/test/ui/rfc1623-2.stderr
index 8ed606cf905..65b9f68817a 100644
--- a/src/test/ui/rfc1623-2.stderr
+++ b/src/test/ui/rfc1623-2.stderr
@@ -9,7 +9,7 @@ LL | static NON_ELIDABLE_FN: &fn(&u8, &u8) -> &u8 =
 help: consider making the type lifetime-generic with a new `'a` lifetime
    |
 LL | static NON_ELIDABLE_FN: &for<'a> fn(&'a u8, &'a u8) -> &'a u8 =
-   |                          +++++++    ~~~~~~  ~~~~~~     ~~~
+   |                          +++++++     ++      ++         ++
 
 error[E0106]: missing lifetime specifier
   --> $DIR/rfc1623-2.rs:10:39
@@ -22,7 +22,7 @@ LL |     &(non_elidable as fn(&u8, &u8) -> &u8);
 help: consider making the type lifetime-generic with a new `'a` lifetime
    |
 LL |     &(non_elidable as for<'a> fn(&'a u8, &'a u8) -> &'a u8);
-   |                       +++++++    ~~~~~~  ~~~~~~     ~~~
+   |                       +++++++     ++      ++         ++
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/suggestions/fn-missing-lifetime-in-item.stderr b/src/test/ui/suggestions/fn-missing-lifetime-in-item.stderr
index 20468cef20b..7c0f8d199a9 100644
--- a/src/test/ui/suggestions/fn-missing-lifetime-in-item.stderr
+++ b/src/test/ui/suggestions/fn-missing-lifetime-in-item.stderr
@@ -25,11 +25,11 @@ LL | struct S2<F: Fn(&i32, &i32) -> &i32>(F);
 help: consider making the bound lifetime-generic with a new `'a` lifetime
    |
 LL | struct S2<F: for<'a> Fn(&'a i32, &'a i32) -> &'a i32>(F);
-   |              +++++++    ~~~~~~~  ~~~~~~~     ~~~
+   |              +++++++     ++       ++          ++
 help: consider introducing a named lifetime parameter
    |
 LL | struct S2<'a, F: Fn(&'a i32, &'a i32) -> &'a i32>(F);
-   |           +++       ~~~~~~~  ~~~~~~~     ~~~
+   |           +++        ++       ++          ++
 
 error[E0582]: binding for associated type `Output` references lifetime `'a`, which does not appear in the trait input types
   --> $DIR/fn-missing-lifetime-in-item.rs:3:40
diff --git a/src/test/ui/suggestions/issue-84592.stderr b/src/test/ui/suggestions/issue-84592.stderr
index fe301e41277..70c96feb1de 100644
--- a/src/test/ui/suggestions/issue-84592.stderr
+++ b/src/test/ui/suggestions/issue-84592.stderr
@@ -10,7 +10,7 @@ LL | fn two_lifetimes_needed(a: &(), b: &()) -> TwoLifetimes<'_, '_> {
 help: consider introducing a named lifetime parameter
    |
 LL | fn two_lifetimes_needed<'a>(a: &'a (), b: &'a ()) -> TwoLifetimes<'a, 'a> {
-   |                        ++++    ~~~~~~     ~~~~~~                  ~~  ~~
+   |                        ++++     ++         ++                     ~~  ~~
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/suggestions/issue-86667.stderr b/src/test/ui/suggestions/issue-86667.stderr
index c1319165a70..14dbbfffb0e 100644
--- a/src/test/ui/suggestions/issue-86667.stderr
+++ b/src/test/ui/suggestions/issue-86667.stderr
@@ -8,7 +8,7 @@ LL | async fn a(s1: &str, s2: &str) -> &str {
 help: consider introducing a named lifetime parameter
    |
 LL | async fn a<'a>(s1: &'a str, s2: &'a str) -> &'a str {
-   |           ++++     ~~~~~~~      ~~~~~~~     ~~~
+   |           ++++      ++           ++          ++
 
 error[E0106]: missing lifetime specifier
   --> $DIR/issue-86667.rs:11:29
@@ -20,7 +20,7 @@ LL | fn b(s1: &str, s2: &str) -> &str {
 help: consider introducing a named lifetime parameter
    |
 LL | fn b<'a>(s1: &'a str, s2: &'a str) -> &'a str {
-   |     ++++     ~~~~~~~      ~~~~~~~     ~~~
+   |     ++++      ++           ++          ++
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/suggestions/missing-lt-for-hrtb.stderr b/src/test/ui/suggestions/missing-lt-for-hrtb.stderr
index b1caaea9aed..33f9d092e6e 100644
--- a/src/test/ui/suggestions/missing-lt-for-hrtb.stderr
+++ b/src/test/ui/suggestions/missing-lt-for-hrtb.stderr
@@ -47,7 +47,7 @@ LL | struct V<'a>(&'a dyn for<'b> Fn(&X) -> &X);
 help: consider using one of the available lifetimes here
    |
 LL | struct V<'a>(&'a dyn for<'b> Fn(&X) -> &'lifetime X);
-   |                                        ~~~~~~~~~~
+   |                                         +++++++++
 
 error[E0106]: missing lifetime specifier
   --> $DIR/missing-lt-for-hrtb.rs:5:41
diff --git a/src/test/ui/suggestions/return-elided-lifetime.stderr b/src/test/ui/suggestions/return-elided-lifetime.stderr
index cdc3f5e85d1..f147b4463e2 100644
--- a/src/test/ui/suggestions/return-elided-lifetime.stderr
+++ b/src/test/ui/suggestions/return-elided-lifetime.stderr
@@ -80,7 +80,7 @@ LL | fn f3(s: &S) -> &i32 { loop {} }
 help: consider introducing a named lifetime parameter
    |
 LL | fn f3<'a>(s: &'a S) -> &'a i32 { loop {} }
-   |      ++++    ~~~~~     ~~~
+   |      ++++     ++        ++
 
 error[E0106]: missing lifetime specifier
   --> $DIR/return-elided-lifetime.rs:21:26
@@ -92,7 +92,7 @@ LL | fn f3_(s: &S, t: &S) -> (&i32, &i32) { loop {} }
 help: consider introducing a named lifetime parameter
    |
 LL | fn f3_<'a>(s: &'a S, t: &'a S) -> (&'a i32, &i32) { loop {} }
-   |       ++++    ~~~~~     ~~~~~      ~~~
+   |       ++++     ++        ++         ++
 
 error[E0106]: missing lifetime specifier
   --> $DIR/return-elided-lifetime.rs:21:32
@@ -104,7 +104,7 @@ LL | fn f3_(s: &S, t: &S) -> (&i32, &i32) { loop {} }
 help: consider introducing a named lifetime parameter
    |
 LL | fn f3_<'a>(s: &'a S, t: &'a S) -> (&i32, &'a i32) { loop {} }
-   |       ++++    ~~~~~     ~~~~~            ~~~
+   |       ++++     ++        ++               ++
 
 error[E0106]: missing lifetime specifier
   --> $DIR/return-elided-lifetime.rs:25:42
@@ -121,7 +121,7 @@ LL | fn f4<'a, 'b>(a: &'a i32, b: &'b i32) -> &i32 { loop {} }
 help: consider using one of the available lifetimes here
    |
 LL | fn f4<'a, 'b>(a: &'a i32, b: &'b i32) -> &'lifetime i32 { loop {} }
-   |                                          ~~~~~~~~~~
+   |                                           +++++++++
 
 error[E0106]: missing lifetime specifier
   --> $DIR/return-elided-lifetime.rs:27:44
@@ -138,7 +138,7 @@ LL | fn f4_<'a, 'b>(a: &'a i32, b: &'b i32) -> (&i32, &i32) { loop {} }
 help: consider using one of the available lifetimes here
    |
 LL | fn f4_<'a, 'b>(a: &'a i32, b: &'b i32) -> (&'lifetime i32, &i32) { loop {} }
-   |                                            ~~~~~~~~~~
+   |                                             +++++++++
 
 error[E0106]: missing lifetime specifier
   --> $DIR/return-elided-lifetime.rs:27:50
@@ -155,7 +155,7 @@ LL | fn f4_<'a, 'b>(a: &'a i32, b: &'b i32) -> (&i32, &i32) { loop {} }
 help: consider using one of the available lifetimes here
    |
 LL | fn f4_<'a, 'b>(a: &'a i32, b: &'b i32) -> (&i32, &'lifetime i32) { loop {} }
-   |                                                  ~~~~~~~~~~
+   |                                                   +++++++++
 
 error[E0106]: missing lifetime specifier
   --> $DIR/return-elided-lifetime.rs:31:35
diff --git a/src/test/ui/underscore-lifetime/in-fn-return-illegal.stderr b/src/test/ui/underscore-lifetime/in-fn-return-illegal.stderr
index 89d36bfc926..6a104e8f94b 100644
--- a/src/test/ui/underscore-lifetime/in-fn-return-illegal.stderr
+++ b/src/test/ui/underscore-lifetime/in-fn-return-illegal.stderr
@@ -8,7 +8,7 @@ LL | fn foo(x: &u32, y: &u32) -> &'_ u32 { loop { } }
 help: consider introducing a named lifetime parameter
    |
 LL | fn foo<'a>(x: &'a u32, y: &'a u32) -> &'a u32 { loop { } }
-   |       ++++    ~~~~~~~     ~~~~~~~      ~~
+   |       ++++     ++          ++          ~~
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/underscore-lifetime/underscore-lifetime-binders.stderr b/src/test/ui/underscore-lifetime/underscore-lifetime-binders.stderr
index 4c207bd3e68..22bf1fdba32 100644
--- a/src/test/ui/underscore-lifetime/underscore-lifetime-binders.stderr
+++ b/src/test/ui/underscore-lifetime/underscore-lifetime-binders.stderr
@@ -43,7 +43,7 @@ LL | fn foo2(_: &'_ u8, y: &'_ u8) -> &'_ u8 { y }
 help: consider introducing a named lifetime parameter
    |
 LL | fn foo2<'a>(_: &'a u8, y: &'a u8) -> &'a u8 { y }
-   |        ++++    ~~~~~~     ~~~~~~      ~~
+   |        ++++     ~~         ~~         ~~
 
 error: aborting due to 5 previous errors
 
diff --git a/src/tools/rustdoc-gui/tester.js b/src/tools/rustdoc-gui/tester.js
index d1cf5fb803d..e697e1f86a9 100644
--- a/src/tools/rustdoc-gui/tester.js
+++ b/src/tools/rustdoc-gui/tester.js
@@ -17,6 +17,11 @@ function showHelp() {
     console.log("  --no-headless              : disable headless mode");
     console.log("  --help                     : show this message then quit");
     console.log("  --tests-folder [PATH]      : location of the .GOML tests folder");
+    console.log("  --jobs [NUMBER]            : number of threads to run tests on");
+}
+
+function isNumeric(s) {
+    return /^\d+$/.test(s);
 }
 
 function parseOptions(args) {
@@ -27,6 +32,7 @@ function parseOptions(args) {
         "debug": false,
         "show_text": false,
         "no_headless": false,
+        "jobs": -1,
     };
     var correspondances = {
         "--doc-folder": "doc_folder",
@@ -39,13 +45,21 @@ function parseOptions(args) {
     for (var i = 0; i < args.length; ++i) {
         if (args[i] === "--doc-folder"
             || args[i] === "--tests-folder"
-            || args[i] === "--file") {
+            || args[i] === "--file"
+            || args[i] === "--jobs") {
             i += 1;
             if (i >= args.length) {
                 console.log("Missing argument after `" + args[i - 1] + "` option.");
                 return null;
             }
-            if (args[i - 1] !== "--file") {
+            if (args[i - 1] === "--jobs") {
+                if (!isNumeric(args[i])) {
+                    console.log(
+                        "`--jobs` option expects a positive number, found `" + args[i] + "`");
+                    return null;
+                }
+                opts["jobs"] = parseInt(args[i]);
+            } else if (args[i - 1] !== "--file") {
                 opts[correspondances[args[i - 1]]] = args[i];
             } else {
                 opts["files"].push(args[i]);
@@ -158,7 +172,11 @@ async function main(argv) {
     files.sort();
 
     console.log(`Running ${files.length} rustdoc-gui tests...`);
-    process.setMaxListeners(files.length + 1);
+    if (opts["jobs"] < 1) {
+        process.setMaxListeners(files.length + 1);
+    } else {
+        process.setMaxListeners(opts["jobs"]);
+    }
     let tests = [];
     let results = {
         successful: [],