Rollup merge of #57784 - JohnTitor:improve-error-message, r=estebank

Add span for bad doc comment

Fixes #57382

r? @estebank
This commit is contained in:
Mazdak Farrokhzad 2019-01-21 02:21:58 +01:00 committed by GitHub
commit 00c60d115c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 7 deletions

View file

@ -2,7 +2,7 @@ error: expected item after doc comment
--> $DIR/doc-before-eof.rs:3:1
|
LL | /// hi //~ERROR expected item after doc comment
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this doc comment doesn't document anything
error: aborting due to previous error

View file

@ -2,7 +2,7 @@ error: expected item after doc comment
--> $DIR/doc-before-extern-rbrace.rs:2:5
|
LL | /// hi
| ^^^^^^
| ^^^^^^ this doc comment doesn't document anything
error: aborting due to previous error

View file

@ -2,7 +2,7 @@ error: expected item after doc comment
--> $DIR/doc-before-mod-rbrace.rs:4:5
|
LL | /// document
| ^^^^^^^^^^^^
| ^^^^^^^^^^^^ this doc comment doesn't document anything
error: aborting due to previous error