about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2019-08-02 23:24:27 +0200
committerRalf Jung <post@ralfj.de>2019-08-02 23:31:21 +0200
commit1b132a2f413f2bd1ae7dea0e8f3519b2765a5a71 (patch)
treeeeef45faa7fdf70db61f3021fa2d3b7beeca5857
parentcf048cc115860cc110865f460f3f2b9b4308ad92 (diff)
downloadrust-1b132a2f413f2bd1ae7dea0e8f3519b2765a5a71.tar.gz
rust-1b132a2f413f2bd1ae7dea0e8f3519b2765a5a71.zip
be less British
-rw-r--r--src/librustc/mir/interpret/error.rs10
-rw-r--r--src/librustc/mir/interpret/mod.rs6
-rw-r--r--src/librustc_mir/transform/const_prop.rs2
3 files changed, 9 insertions, 9 deletions
diff --git a/src/librustc/mir/interpret/error.rs b/src/librustc/mir/interpret/error.rs
index 8d41b019c22..ab1af155a4b 100644
--- a/src/librustc/mir/interpret/error.rs
+++ b/src/librustc/mir/interpret/error.rs
@@ -341,16 +341,16 @@ impl fmt::Debug for InvalidProgramInfo<'tcx> {
 }
 
 #[derive(Clone, RustcEncodable, RustcDecodable, HashStable)]
-pub enum UndefinedBehaviourInfo {
+pub enum UndefinedBehaviorInfo {
     /// Handle cases which for which we do not have a fixed variant.
     Ub(String),
     /// Unreachable code was executed.
     Unreachable,
 }
 
-impl fmt::Debug for UndefinedBehaviourInfo {
+impl fmt::Debug for UndefinedBehaviorInfo {
     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-        use UndefinedBehaviourInfo::*;
+        use UndefinedBehaviorInfo::*;
         match self {
             Ub(ref msg) =>
                 write!(f, "{}", msg),
@@ -572,7 +572,7 @@ pub enum InterpError<'tcx> {
     /// The program panicked.
     Panic(PanicInfo<u64>),
     /// The program caused undefined behavior.
-    UndefinedBehaviour(UndefinedBehaviourInfo),
+    UndefinedBehavior(UndefinedBehaviorInfo),
     /// The program did something the interpreter does not support (some of these *might* be UB
     /// but the interpreter is not sure).
     Unsupported(UnsupportedOpInfo<'tcx>),
@@ -603,7 +603,7 @@ impl fmt::Debug for InterpError<'_> {
                 write!(f, "{:?}", msg),
             InvalidProgram(ref msg) =>
                 write!(f, "{:?}", msg),
-            UndefinedBehaviour(ref msg) =>
+            UndefinedBehavior(ref msg) =>
                 write!(f, "{:?}", msg),
             ResourceExhaustion(ref msg) =>
                 write!(f, "{:?}", msg),
diff --git a/src/librustc/mir/interpret/mod.rs b/src/librustc/mir/interpret/mod.rs
index 723a30792fd..855232b3334 100644
--- a/src/librustc/mir/interpret/mod.rs
+++ b/src/librustc/mir/interpret/mod.rs
@@ -21,8 +21,8 @@ macro_rules! err_inval {
 #[macro_export]
 macro_rules! err_ub {
     ($($tt:tt)*) => {
-        $crate::mir::interpret::InterpError::UndefinedBehaviour(
-            $crate::mir::interpret::UndefinedBehaviourInfo::$($tt)*
+        $crate::mir::interpret::InterpError::UndefinedBehavior(
+            $crate::mir::interpret::UndefinedBehaviorInfo::$($tt)*
         )
     };
 }
@@ -78,7 +78,7 @@ mod pointer;
 pub use self::error::{
     InterpErrorInfo, InterpResult, InterpError, AssertMessage, ConstEvalErr, struct_error,
     FrameInfo, ConstEvalRawResult, ConstEvalResult, ErrorHandled, PanicInfo, UnsupportedOpInfo,
-    InvalidProgramInfo, ResourceExhaustionInfo, UndefinedBehaviourInfo,
+    InvalidProgramInfo, ResourceExhaustionInfo, UndefinedBehaviorInfo,
 };
 
 pub use self::value::{Scalar, ScalarMaybeUndef, RawConst, ConstValue};
diff --git a/src/librustc_mir/transform/const_prop.rs b/src/librustc_mir/transform/const_prop.rs
index a450ec32e1a..38d26d0ba50 100644
--- a/src/librustc_mir/transform/const_prop.rs
+++ b/src/librustc_mir/transform/const_prop.rs
@@ -260,7 +260,7 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> {
                 match diagnostic.error {
                     Exit(_) => bug!("the CTFE program cannot exit"),
                     Unsupported(_)
-                    | UndefinedBehaviour(_)
+                    | UndefinedBehavior(_)
                     | InvalidProgram(_)
                     | ResourceExhaustion(_) => {
                         // Ignore these errors.