From e8a05e201ee6cea12fe05e4271e91fd40c2fb235 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Wed, 8 Jan 2020 06:39:38 -0500 Subject: permit negative impls for non-auto traits --- src/librustc_error_codes/error_codes/E0749.md | 4 ++++ src/librustc_error_codes/error_codes/E0750.md | 4 ++++ 2 files changed, 8 insertions(+) create mode 100644 src/librustc_error_codes/error_codes/E0749.md create mode 100644 src/librustc_error_codes/error_codes/E0750.md (limited to 'src/librustc_error_codes/error_codes') diff --git a/src/librustc_error_codes/error_codes/E0749.md b/src/librustc_error_codes/error_codes/E0749.md new file mode 100644 index 00000000000..9eb8ee4e3fd --- /dev/null +++ b/src/librustc_error_codes/error_codes/E0749.md @@ -0,0 +1,4 @@ +Negative impls are not allowed to have any items. Negative impls +declare that a trait is **not** implemented (and never will be) and +hence there is no need to specify the values for trait methods or +other items. diff --git a/src/librustc_error_codes/error_codes/E0750.md b/src/librustc_error_codes/error_codes/E0750.md new file mode 100644 index 00000000000..e0cf56f716f --- /dev/null +++ b/src/librustc_error_codes/error_codes/E0750.md @@ -0,0 +1,4 @@ +Negative impls cannot be default impls. A default impl supplies +default values for the items within to be used by other impls, whereas +a negative impl declares that there are no other impls. These don't +make sense to combine. -- cgit 1.4.1-3-g733a5