Skip to content

Commit 1b132a2

Browse files
committed
be less British
1 parent cf048cc commit 1b132a2

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

src/librustc/mir/interpret/error.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -341,16 +341,16 @@ impl fmt::Debug for InvalidProgramInfo<'tcx> {
341341
}
342342

343343
#[derive(Clone, RustcEncodable, RustcDecodable, HashStable)]
344-
pub enum UndefinedBehaviourInfo {
344+
pub enum UndefinedBehaviorInfo {
345345
/// Handle cases which for which we do not have a fixed variant.
346346
Ub(String),
347347
/// Unreachable code was executed.
348348
Unreachable,
349349
}
350350

351-
impl fmt::Debug for UndefinedBehaviourInfo {
351+
impl fmt::Debug for UndefinedBehaviorInfo {
352352
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
353-
use UndefinedBehaviourInfo::*;
353+
use UndefinedBehaviorInfo::*;
354354
match self {
355355
Ub(ref msg) =>
356356
write!(f, "{}", msg),
@@ -572,7 +572,7 @@ pub enum InterpError<'tcx> {
572572
/// The program panicked.
573573
Panic(PanicInfo<u64>),
574574
/// The program caused undefined behavior.
575-
UndefinedBehaviour(UndefinedBehaviourInfo),
575+
UndefinedBehavior(UndefinedBehaviorInfo),
576576
/// The program did something the interpreter does not support (some of these *might* be UB
577577
/// but the interpreter is not sure).
578578
Unsupported(UnsupportedOpInfo<'tcx>),
@@ -603,7 +603,7 @@ impl fmt::Debug for InterpError<'_> {
603603
write!(f, "{:?}", msg),
604604
InvalidProgram(ref msg) =>
605605
write!(f, "{:?}", msg),
606-
UndefinedBehaviour(ref msg) =>
606+
UndefinedBehavior(ref msg) =>
607607
write!(f, "{:?}", msg),
608608
ResourceExhaustion(ref msg) =>
609609
write!(f, "{:?}", msg),

src/librustc/mir/interpret/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ macro_rules! err_inval {
2121
#[macro_export]
2222
macro_rules! err_ub {
2323
($($tt:tt)*) => {
24-
$crate::mir::interpret::InterpError::UndefinedBehaviour(
25-
$crate::mir::interpret::UndefinedBehaviourInfo::$($tt)*
24+
$crate::mir::interpret::InterpError::UndefinedBehavior(
25+
$crate::mir::interpret::UndefinedBehaviorInfo::$($tt)*
2626
)
2727
};
2828
}
@@ -78,7 +78,7 @@ mod pointer;
7878
pub use self::error::{
7979
InterpErrorInfo, InterpResult, InterpError, AssertMessage, ConstEvalErr, struct_error,
8080
FrameInfo, ConstEvalRawResult, ConstEvalResult, ErrorHandled, PanicInfo, UnsupportedOpInfo,
81-
InvalidProgramInfo, ResourceExhaustionInfo, UndefinedBehaviourInfo,
81+
InvalidProgramInfo, ResourceExhaustionInfo, UndefinedBehaviorInfo,
8282
};
8383

8484
pub use self::value::{Scalar, ScalarMaybeUndef, RawConst, ConstValue};

src/librustc_mir/transform/const_prop.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> {
260260
match diagnostic.error {
261261
Exit(_) => bug!("the CTFE program cannot exit"),
262262
Unsupported(_)
263-
| UndefinedBehaviour(_)
263+
| UndefinedBehavior(_)
264264
| InvalidProgram(_)
265265
| ResourceExhaustion(_) => {
266266
// Ignore these errors.

0 commit comments

Comments
 (0)