diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2020-01-08 14:10:59 -0500 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2020-03-26 06:52:26 -0400 |
| commit | 65071708f8fe72dd2103c6eace0eb6802a6acf03 (patch) | |
| tree | 912d748e82574d835e72d9d69d4cd3b5a5f1d6a3 /src/librustc_error_codes/error_codes | |
| parent | e8a05e201ee6cea12fe05e4271e91fd40c2fb235 (diff) | |
| download | rust-65071708f8fe72dd2103c6eace0eb6802a6acf03.tar.gz rust-65071708f8fe72dd2103c6eace0eb6802a6acf03.zip | |
make a custom error for overlap with negative impls
Diffstat (limited to 'src/librustc_error_codes/error_codes')
| -rw-r--r-- | src/librustc_error_codes/error_codes/E0751.md | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/librustc_error_codes/error_codes/E0751.md b/src/librustc_error_codes/error_codes/E0751.md new file mode 100644 index 00000000000..a440f82e4b6 --- /dev/null +++ b/src/librustc_error_codes/error_codes/E0751.md @@ -0,0 +1,12 @@ +There are both a positive and negative trait implementation for the same type. + +Erroneous code example: + +```compile_fail,E0748 +trait MyTrait {} +impl MyTrait for i32 { } +impl !MyTrait for i32 { } +``` + +Negative implementations are a promise that the trait will never be +implemented for the given types. |
