From e47e9e25d37d3588a5fc379094f459286067eb84 Mon Sep 17 00:00:00 2001 From: Julian Wollersberger Date: Fri, 17 May 2019 17:38:29 +0200 Subject: [PATCH] Renamed the file and title of the diagnostics chapter. When I recently searched for infos in this guide on how to create a warning, I couldn't find any. Later I found it through #14. The reason was that I didn't know the term 'diagnostics' and that it is the collective term for errors, warnings and lints. Renaming the chapter to include the word 'error' should help. I think also including 'warning' in the title shouldn't be neccessary, because it's close enought. --- src/SUMMARY.md | 4 ++-- src/appendix/code-index.md | 2 +- src/{diag.md => diagnostics.md} | 2 +- src/{diag => diagnostics}/json-format.md | 0 src/implementing_new_features.md | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) rename src/{diag.md => diagnostics.md} (99%) rename src/{diag => diagnostics}/json-format.md (100%) diff --git a/src/SUMMARY.md b/src/SUMMARY.md index ca8f4adaa..3d5dd44b6 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -21,6 +21,8 @@ - [with the linux perf tool](./profiling/with_perf.md) - [Coding conventions](./conventions.md) - [crates.io Dependencies](./crates-io.md) +- [Emitting Errors and other Diagnostics](diagnostics.md) + - [JSON diagnostic format](diagnostics/json-format.md) --- @@ -83,8 +85,6 @@ - [Code Generation](./codegen.md) - [Updating LLVM](./codegen/updating-llvm.md) - [Debugging LLVM](./codegen/debugging.md) -- [Emitting Diagnostics](./diag.md) - - [JSON diagnostic format](./diag/json-format.md) - [Profile-guided Optimization](./profile-guided-optimization.md) --- diff --git a/src/appendix/code-index.md b/src/appendix/code-index.md index 3c71d6bba..222c9b2db 100644 --- a/src/appendix/code-index.md +++ b/src/appendix/code-index.md @@ -38,7 +38,7 @@ Item | Kind | Short description | Chapter | [Type checking]: ../type-checking.html [The `ty` modules]: ../ty.html [Rustdoc]: ../rustdoc.html -[Emitting Diagnostics]: ../diag.html +[Emitting Diagnostics]: ../diagnostics.html [Macro expansion]: ../macro-expansion.html [Name resolution]: ../name-resolution.html [Parameter Environment]: ../param_env.html diff --git a/src/diag.md b/src/diagnostics.md similarity index 99% rename from src/diag.md rename to src/diagnostics.md index 31268e9f6..f3d518764 100644 --- a/src/diag.md +++ b/src/diagnostics.md @@ -1,4 +1,4 @@ -# Emitting Diagnostics +# Emitting Errors and other Diagnostics A lot of effort has been put into making `rustc` have great error messages. This chapter is about how to emit compile errors and lints from the compiler. diff --git a/src/diag/json-format.md b/src/diagnostics/json-format.md similarity index 100% rename from src/diag/json-format.md rename to src/diagnostics/json-format.md diff --git a/src/implementing_new_features.md b/src/implementing_new_features.md index 8105e1474..6d1327fab 100644 --- a/src/implementing_new_features.md +++ b/src/implementing_new_features.md @@ -49,7 +49,7 @@ In some cases, a feature or bugfix might break some existing programs in some edge cases. In that case, you might want to do a crater run to assess the impact and possibly add a future-compatibility lint, similar to those used for -[edition-gated lints](./diag.md#edition-gated-lints). +[edition-gated lints](diagnostics.md#edition-gated-lints). ### Stability