144 Commits

Author SHA1 Message Date
Dylan DPC
0259c10385
Rollup merge of #68365 - GuillaumeGomez:clean-up-err-codes-2, r=Dylan-DPC
Clean up error codes

r? @Dylan-DPC
2020-01-20 11:14:51 +05:30
Dylan DPC
fb86b820bb
Rollup merge of #68353 - Centril:code-liberation, r=petrochenkov
Remove `rustc_error_codes` deps except in `rustc_driver`

Remove dependencies on `rustc_error_codes` in all crates except for `rustc_driver`.

This has some benefits:

1. Adding a new error code when hacking on the compiler only requires rebuilding at most `rustc_error_codes`, `rustc_driver`, and the reflexive & transitive closure of the crate where the new error code is being added and its reverse dependencies. This improves time-to-UI-tests (TTUT).

2. Adding an error description to an error code only requires rebuilding `rustc_error_codes` and `rustc_driver`. This should substantially improve TTUT.

r? @petrochenkov
cc @rust-lang/wg-diagnostics
2020-01-20 11:14:48 +05:30
Guillaume Gomez
a9aa2dfe84 clean up E0204 explanation 2020-01-19 15:35:55 +01:00
Guillaume Gomez
0c7f40f3b2 clean up E0201 explanation 2020-01-19 15:35:44 +01:00
Dylan DPC
a29ba00107
Rollup merge of #68247 - GuillaumeGomez:clean-up-err-codes, r=Dylan-DPC
Clean up err codes

r? @Dylan-DPC
2020-01-19 17:22:07 +05:30
Mazdak Farrokhzad
de6046fa0f remove rustc_error_codes deps except in rustc_driver 2020-01-18 21:53:53 +01:00
Mazdak Farrokhzad
2a12ef8134
Rollup merge of #68340 - GuillaumeGomez:clean-up-e0200, r=Dylan-DPC
clean up e0200 explanation

r? @Dylan-DPC
2020-01-18 19:36:05 +01:00
Mazdak Farrokhzad
0aebb08115 slice_patterns: adjust error codes 2020-01-18 17:59:44 +01:00
Guillaume Gomez
9746b05da9 clean up e0200 explanation 2020-01-18 15:06:02 +01:00
Tyler Mandry
14d779c3f0
Rollup merge of #68317 - GuillaumeGomez:clean-up-e0199, r=Dylan-DPC
Clean up E0199 explanation

r? @Dylan-DPC
2020-01-17 17:28:23 -08:00
Tyler Mandry
2a1ab29806
Rollup merge of #68279 - GuillaumeGomez:clean-up-e0198, r=Dylan-DPC
Clean up E0198 explanation

r? @Dylan-DPC
2020-01-17 17:28:17 -08:00
Guillaume Gomez
e8a4b9319c Clean up E0199 explanation 2020-01-17 19:54:07 +01:00
Guillaume Gomez
9c6c2f16f0 Clean up E0198 explanation 2020-01-17 19:47:48 +01:00
Esteban Küber
029a9c6253 review comments 2020-01-16 11:32:50 -08:00
Esteban Küber
d7a6212401 review comments 2020-01-16 09:49:14 -08:00
Esteban Küber
c305ac31c0 Fix error index test 2020-01-16 09:49:13 -08:00
Esteban Küber
4a75ef91f3 fix error code index comment 2020-01-16 09:49:13 -08:00
Esteban Küber
4c13d2555c Add E0746 explanation to the index 2020-01-16 09:37:24 -08:00
Esteban Küber
6fd564112f Specific error for unsized dyn Trait return type
Suggest `impl Trait` when possible, and `Box<dyn Trait>` otherwise.
2020-01-16 09:37:24 -08:00
Guillaume Gomez
6f1bdb47f2 clean up E0197 explanation 2020-01-16 13:54:58 +01:00
Guillaume Gomez
a1a0aea9e3 clean up E0195 explanation 2020-01-16 13:54:58 +01:00
Yuki Okushi
20c49fc797
Rollup merge of #68211 - GuillaumeGomez:add-failing-example-e0170, r=Dylan-DPC
Add failing example for E0170 explanation

r? @Dylan-DPC
2020-01-15 21:51:48 +09:00
Dylan DPC
6801cf436b
Update E0170.md 2020-01-15 11:52:21 +05:30
Guillaume Gomez
5076a3efc7 Add failing example for E0170 explanation 2020-01-14 14:04:03 +01:00
Yuki Okushi
d6d5b74fb2
Rollup merge of #68176 - GuillaumeGomez:clean-up-err-codes, r=Dylan-DPC
Clean up err codes

r? @Dylan-DPC
2020-01-14 14:02:28 +09:00
Guillaume Gomez
3ec0a84e6e Clean up E0192 explanation 2020-01-13 15:02:49 +01:00
Guillaume Gomez
11f74189f1 Clean up E0191 explanation 2020-01-13 15:02:49 +01:00
bors
bf84eb538f Auto merge of #67850 - GuillaumeGomez:err-codes-checkup, r=Mark-Simulacrum
Error codes checkup and rustdoc test fix

This PR does a few things:

 * fix how rustdoc checks that an error code has been thrown (it only checked for "E0XXX" so if it appeared in the output because the file has it in its name or wherever, it passed the test, which was incorrect)
 * fix the failing code examples that weren't throwing the expected error code
2020-01-13 12:49:12 +00:00
Yuki Okushi
574ef55ea7
Rollup merge of #68157 - GuillaumeGomez:clean-up-e0186, r=Dylan-DPC
Clean up E0186 explanation

r? @Dylan-DPC
2020-01-13 16:44:23 +09:00
Guillaume Gomez
34186ef642 Clean up E0186 explanation 2020-01-12 17:50:14 +01:00
Guillaume Gomez
5b7d64e947 Fix error codes explanation' code examples 2020-01-12 17:22:42 +01:00
Mazdak Farrokhzad
34231d6c0b
Rollup merge of #68070 - GuillaumeGomez:clean-up-e0185, r=Dylan-DPC
clean up E0185 explanation

r? @Dylan-DPC
2020-01-11 12:36:10 +01:00
Dylan DPC
4fadb507f4
Update E0185.md 2020-01-10 23:56:00 +05:30
Guillaume Gomez
c899f67673
Improve E0185 wording 2020-01-10 10:05:49 +01:00
Guillaume Gomez
f79ba857dd clean up E0185 explanation 2020-01-09 22:25:58 +01:00
Mazdak Farrokhzad
1355fb58be
Rollup merge of #68009 - wcampbell0x2a:spellcheck-librustc_error_codes, r=Centril
Spell check librustc_error_codes

Found one wrongly spelled error message and decided to check all the
error messages for wrongly spelled statements.
2020-01-09 00:22:17 +01:00
Mazdak Farrokhzad
91d5fbaeb1
Rollup merge of #68005 - GuillaumeGomez:explanation-e0184, r=Dylan-DPC
Improve E0184 explanation

r? @Dylan-DPC
2020-01-09 00:22:16 +01:00
wcampbell
c9a55fe3db
Spell check librustc_error_codes
Found one wrongly spelled error message and decided to check all the
error messages for wrongly spelled statements.

Signed-off-by: wcampbell <wcampbell1995@gmail.com>
2020-01-08 10:12:29 -05:00
Guillaume Gomez
326994dfe6 Improve E0184 explanation 2020-01-08 14:24:25 +01:00
Mazdak Farrokhzad
2c3e5d3de0 - remove syntax::{span_warn!, span_err!, span_fatal!. struct_err!}
- remove syntax::{help!, span_help!, span_note!}
- remove unused syntax::{struct_span_fatal, struct_span_err_or_warn!, span_err_or_warn!}
- lintify check_for_bindings_named_same_as_variants + conflicting_repr_hints
- inline syntax::{struct_span_warn!, diagnostic_used!}
- stringify_error_code! -> error_code! & use it more.
- find_plugin_registrar: de-fatalize an error
- de-fatalize metadata errors
- move type_error_struct! to rustc_typeck
- struct_span_err! -> rustc_errors
2020-01-08 04:25:33 +01:00
Guillaume Gomez
99fda5c1ce Clean up E0178 explanation 2020-01-06 15:28:12 +01:00
Dylan DPC
062cd78958
Update E0164.md 2020-01-04 11:41:35 +05:30
Guillaume Gomez
aab4276477 Clean up E0164 explanation 2020-01-04 00:32:29 +01:00
Guillaume Gomez
ec64bbbe07 Small error explanations cleanup 2020-01-04 00:32:29 +01:00
Guillaume Gomez
8341a9a8f7 Clean up E0131 error explanation 2020-01-03 00:07:09 +01:00
Guillaume Gomez
d202b59506 Clean up E0130 error explanation 2020-01-02 19:57:19 +01:00
Donough Liu
b4e1fbcf81 Gammer fix 2019-12-30 17:14:08 +08:00
Donough Liu
751fe7c43d Add error code explanation for E0477 2019-12-30 14:41:46 +08:00
bors
c0b16b4e6a Auto merge of #67268 - estebank:assoc-types, r=oli-obk
Tweak errors for missing associated types and type parameters

* On `dyn Trait` missing associated types, provide a structured suggestion for them
* On missing type parameters, provide structured suggestion for them
* Point at trait definition when missing required type parameter
* Tweak output of E0658
* Tweak wording of E0719
* Account for `Trait1 + Trait2` case

Fix #66380, fix #60595. CC #63711.
2019-12-26 03:42:59 +00:00
David Tolnay
4646a88b7a
Deprecate Error::description for real
`description` has been documented as soft-deprecated since 1.27.0 (17
months ago). There is no longer any reason to call it or implement it.

This commit:

- adds #[rustc_deprecated(since = "1.41.0")] to Error::description;

- moves description (and cause, which is also deprecated) below the
  source and backtrace methods in the Error trait;

- reduces documentation of description and cause to take up much less
  vertical real estate in rustdocs, while preserving the example that
  shows how to render errors without needing to call description;

- removes the description function of all *currently unstable* Error
  impls in the standard library;

- marks #[allow(deprecated)] the description function of all *stable*
  Error impls in the standard library;

- replaces miscellaneous uses of description in example code and the
  compiler.
2019-12-24 22:39:49 -08:00