]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_mir/interpret/intern.rs
Rollup merge of #62760 - chansuke:dedupe-error-messages, r=zackmdavis
[rust.git] / src / librustc_mir / interpret / intern.rs
index 1074ab941a761acbfc5eb23b388ebd2570b78c45..32ba70a81c99792cedd200c305dff2d8623e42ec 100644 (file)
@@ -296,11 +296,7 @@ pub fn intern_const_alloc_recursive(
                 let err = crate::const_eval::error_to_const_error(&ecx, error);
                 match err.struct_error(ecx.tcx, "it is undefined behavior to use this value") {
                     Ok(mut diag) => {
-                        diag.note("The rules on what exactly is undefined behavior aren't clear, \
-                            so this check might be overzealous. Please open an issue on the rust \
-                            compiler repository if you believe it should not be considered \
-                            undefined behavior",
-                        );
+                        diag.note(crate::const_eval::note_on_undefined_behavior_error());
                         diag.emit();
                     }
                     Err(ErrorHandled::TooGeneric) |