about summary refs log tree commit diff
path: root/src/test/ui/error-codes
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2020-05-29 20:21:13 +0200
committerGitHub <noreply@github.com>2020-05-29 20:21:13 +0200
commit9c1f2035a973aaa7202647ec323e21011a47aae5 (patch)
treeb11aacec3b3afeef03c0aa0d344d9146049e3511 /src/test/ui/error-codes
parentcbcc4c4f05cef62d283d7205bd00ce7d7adcfec6 (diff)
parent6ddbef170bf0b79b868088580e28c862b691bff3 (diff)
Rollup merge of #72383 - DarkEld3r:issue-72322, r=matthewjasper
Suggest using std::mem::drop function instead of explicit destructor call

I would prefer to give a better suggestion that includes code example, but I'm currently stuck on getting the correct span for that.

Closes #72322.
Diffstat (limited to 'src/test/ui/error-codes')
-rw-r--r--src/test/ui/error-codes/E0040.stderr5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/test/ui/error-codes/E0040.stderr b/src/test/ui/error-codes/E0040.stderr
index 96645590281..69cf28b2970 100644
--- a/src/test/ui/error-codes/E0040.stderr
+++ b/src/test/ui/error-codes/E0040.stderr
@@ -2,7 +2,10 @@ error[E0040]: explicit use of destructor method
   --> $DIR/E0040.rs:13:7
    |
 LL |     x.drop();
-   |       ^^^^ explicit destructor calls not allowed
+   |       ^^^^
+   |       |
+   |       explicit destructor calls not allowed
+   |       help: consider using `drop` function: `drop(x)`
 
 error: aborting due to previous error