File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
compiler/rustc_const_eval/src/const_eval Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -19,11 +19,9 @@ use rustc_target::abi::{self, Abi};
1919use std:: borrow:: Cow ;
2020use std:: convert:: TryInto ;
2121
22- pub fn note_on_undefined_behavior_error ( ) -> & ' static str {
23- "The rules on what exactly is undefined behavior aren't clear, \
22+ const NOTE_ON_UNDEFINED_BEHAVIOR_ERROR : & str = "The rules on what exactly is undefined behavior aren't clear, \
2423 so this check might be overzealous. Please open an issue on the rustc \
25- repository if you believe it should not be considered undefined behavior."
26- }
24+ repository if you believe it should not be considered undefined behavior.";
2725
2826// Returns a pointer to where the result lives
2927fn eval_body_using_ecx < ' mir , ' tcx > (
@@ -375,7 +373,7 @@ pub fn eval_to_allocation_raw_provider<'tcx>(
375373 ecx. tcx ,
376374 "it is undefined behavior to use this value" ,
377375 |diag| {
378- diag. note ( note_on_undefined_behavior_error ( ) ) ;
376+ diag. note ( NOTE_ON_UNDEFINED_BEHAVIOR_ERROR ) ;
379377 diag. note ( & format ! (
380378 "the raw bytes of the constant ({}" ,
381379 display_allocation(
You can’t perform that action at this time.
0 commit comments