about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-09-01 23:34:14 +0000
committerbors <bors@rust-lang.org>2018-09-01 23:34:14 +0000
commita1a8c444f98e684e39d337aef56401e190ba36e5 (patch)
treedbcaab044e3816b45108c11c2cca40ac053ddc0f /src/test
parent28bcffead74d5e17c6cb1f7de432e37f93a6b50c (diff)
parent013710e8e8b322f1e902b1234ee674e395c44859 (diff)
downloadrust-a1a8c444f98e684e39d337aef56401e190ba36e5.tar.gz
rust-a1a8c444f98e684e39d337aef56401e190ba36e5.zip
Auto merge of #53842 - estebank:various, r=petrochenkov
Various small diagnostic and code clean up

 - Point at def span on incorrect `panic` or `oom` function
 - Use structured suggestion instead of note for `+=` that can be performed on a dereference of the left binding
 - Small code formatting cleanup
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ui/alloc-error/alloc-error-handler-bad-signature-3.stderr6
-rw-r--r--src/test/ui/issues/issue-5239-1.stderr4
-rw-r--r--src/test/ui/panic-handler/panic-handler-bad-signature-3.stderr6
3 files changed, 7 insertions, 9 deletions
diff --git a/src/test/ui/alloc-error/alloc-error-handler-bad-signature-3.stderr b/src/test/ui/alloc-error/alloc-error-handler-bad-signature-3.stderr
index 9b792c46c24..e7885537b06 100644
--- a/src/test/ui/alloc-error/alloc-error-handler-bad-signature-3.stderr
+++ b/src/test/ui/alloc-error/alloc-error-handler-bad-signature-3.stderr
@@ -1,10 +1,8 @@
 error: function should have one argument
   --> $DIR/alloc-error-handler-bad-signature-3.rs:20:1
    |
-LL | / fn oom() -> ! { //~ ERROR function should have one argument
-LL | |     loop {}
-LL | | }
-   | |_^
+LL | fn oom() -> ! { //~ ERROR function should have one argument
+   | ^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-5239-1.stderr b/src/test/ui/issues/issue-5239-1.stderr
index 7ae01fb7d60..f9191a9fd82 100644
--- a/src/test/ui/issues/issue-5239-1.stderr
+++ b/src/test/ui/issues/issue-5239-1.stderr
@@ -5,8 +5,10 @@ LL |     let x = |ref x: isize| { x += 1; };
    |                              -^^^^^
    |                              |
    |                              cannot use `+=` on type `&isize`
+help: `+=` can be used on 'isize', you can dereference `x`
    |
-   = help: `+=` can be used on 'isize', you can dereference `x`: `*x`
+LL |     let x = |ref x: isize| { *x += 1; };
+   |                              ^^
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/panic-handler/panic-handler-bad-signature-3.stderr b/src/test/ui/panic-handler/panic-handler-bad-signature-3.stderr
index 0eb0d4e1000..5d0395e17f5 100644
--- a/src/test/ui/panic-handler/panic-handler-bad-signature-3.stderr
+++ b/src/test/ui/panic-handler/panic-handler-bad-signature-3.stderr
@@ -1,10 +1,8 @@
 error: function should have one argument
   --> $DIR/panic-handler-bad-signature-3.rs:20:1
    |
-LL | / fn panic() -> ! { //~ ERROR function should have one argument
-LL | |     loop {}
-LL | | }
-   | |_^
+LL | fn panic() -> ! { //~ ERROR function should have one argument
+   | ^^^^^^^^^^^^^^^
 
 error: aborting due to previous error