about summary refs log tree commit diff
path: root/compiler/rustc_error_codes
diff options
context:
space:
mode:
authorLeón Orell Valerian Liehr <me@fmease.dev>2024-01-02 00:26:50 +0100
committerLeón Orell Valerian Liehr <me@fmease.dev>2024-01-02 13:49:47 +0100
commitae8e401c9f8b51dc8ff3ac5914e0203ea95e26d2 (patch)
treebd238157a95daeb72d0d1cfa38a462dfb6c40afa /compiler/rustc_error_codes
parent8f546aa495dee00326d40fe277ed5fef1f68175e (diff)
downloadrust-ae8e401c9f8b51dc8ff3ac5914e0203ea95e26d2.tar.gz
rust-ae8e401c9f8b51dc8ff3ac5914e0203ea95e26d2.zip
E0379: Make diagnostic more precise
Diffstat (limited to 'compiler/rustc_error_codes')
-rw-r--r--compiler/rustc_error_codes/src/error_codes/E0379.md4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_error_codes/src/error_codes/E0379.md b/compiler/rustc_error_codes/src/error_codes/E0379.md
index ab438e41447..35f546cfdb7 100644
--- a/compiler/rustc_error_codes/src/error_codes/E0379.md
+++ b/compiler/rustc_error_codes/src/error_codes/E0379.md
@@ -6,6 +6,10 @@ Erroneous code example:
 trait Foo {
     const fn bar() -> u32; // error!
 }
+
+impl Foo for () {
+    const fn bar() -> u32 { 0 } // error!
+}
 ```
 
 Trait methods cannot be declared `const` by design. For more information, see