Skip to content

Commit a1f91b2

Browse files
committed
corrected typo
1 parent 593a71b commit a1f91b2

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/asm.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use rustc_target::asm::*;
1818
use crate::builder::Builder;
1919
use crate::callee::get_fn;
2020
use crate::context::CodegenCx;
21-
use crate::errors::{NullBytesInAsm, UnwindingInlineAsm};
21+
use crate::errors::{NulBytesInAsm, UnwindingInlineAsm};
2222
use crate::type_of::LayoutGccExt;
2323

2424
// Rust asm! and GCC Extended Asm semantics differ substantially.
@@ -926,11 +926,11 @@ impl<'gcc, 'tcx> AsmCodegenMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
926926
}
927927
// NOTE: seems like gcc will put the asm in the wrong section, so set it to .text manually.
928928
template_str.push_str("\n.popsection");
929-
// NOTE: GCC's add_top_level_asm uses CString which cannot contain null bytes.
930-
// Emit an error if there are any null bytes in the template string.
929+
// NOTE: GCC's add_top_level_asm uses CString which cannot contain nul bytes.
930+
// Emit an error if there are any nul bytes in the template string.
931931
if template_str.contains('\0') {
932932
let span = line_spans.first().copied().unwrap_or(DUMMY_SP);
933-
self.tcx.dcx().emit_err(NullBytesInAsm { span });
933+
self.tcx.dcx().emit_err(NulBytesInAsm { span });
934934
return;
935935
}
936936
self.context.add_top_level_asm(None, &template_str);

src/errors.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ pub(crate) struct LtoBitcodeFromRlib {
2525
pub(crate) struct ExplicitTailCallsUnsupported;
2626

2727
#[derive(Diagnostic)]
28-
#[diag("asm contains a NULL byte")]
29-
pub(crate) struct NullBytesInAsm {
28+
#[diag("asm contains a NUL byte")]
29+
pub(crate) struct NulBytesInAsm {
3030
#[primary_span]
3131
pub span: Span,
3232
}

0 commit comments

Comments
 (0)