Skip to content

Commit

Permalink
rebase and new fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
klensy committed Feb 7, 2025
1 parent b36389a commit 049ab9c
Show file tree
Hide file tree
Showing 14 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2430,7 +2430,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
}

if !mismatched_params.is_empty() {
// For each mismatched paramter, create a two-way link to each matched parameter
// For each mismatched parameter, create a two-way link to each matched parameter
// of the same type.
let mut dependants = IndexVec::<ExpectedIdx, _>::from_fn_n(
|_| SmallVec::<[u32; 4]>::new(),
Expand Down Expand Up @@ -2473,7 +2473,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
spans.push_span_label(param.param.span(), "");
}
}
// Highligh each parameter being depended on for a generic type.
// Highlight each parameter being depended on for a generic type.
for ((&(_, param), deps), &(_, expected_ty)) in
params_with_generics.iter().zip(&dependants).zip(formal_and_expected_inputs)
{
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_middle/src/mir/terminator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ impl<O> AssertKind<O> {
"\"misaligned pointer dereference: address must be a multiple of {{}} but is {{}}\", {required:?}, {found:?}"
)
}
NullPointerDereference => write!(f, "\"null pointer dereference occured\""),
NullPointerDereference => write!(f, "\"null pointer dereference occurred\""),
ResumedAfterReturn(CoroutineKind::Coroutine(_)) => {
write!(f, "\"coroutine resumed after completion\"")
}
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_session/src/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ pub struct ParseSess {
pub edition: Edition,
/// Places where contract attributes were expanded into unstable AST forms.
/// This is used to allowlist those spans (so that we only check them against the feature
/// gate for the externally visible interface, and not internal implmentation machinery).
/// gate for the externally visible interface, and not internal implementation machinery).
pub contract_attribute_spans: AppendOnlyVec<Span>,
/// Places where raw identifiers were used. This is used to avoid complaining about idents
/// clashing with keywords in new editions.
Expand Down
2 changes: 1 addition & 1 deletion compiler/stable_mir/src/mir/body.rs
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ impl AssertMessage {
AssertMessage::MisalignedPointerDereference { .. } => {
Ok("misaligned pointer dereference")
}
AssertMessage::NullPointerDereference => Ok("null pointer dereference occured"),
AssertMessage::NullPointerDereference => Ok("null pointer dereference occurred"),
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion compiler/stable_mir/src/mir/pretty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ fn pretty_assert_message<W: Write>(writer: &mut W, msg: &AssertMessage) -> io::R
)
}
AssertMessage::NullPointerDereference => {
write!(writer, "\"null pointer dereference occured.\"")
write!(writer, "\"null pointer dereference occurred.\"")
}
AssertMessage::ResumedAfterReturn(_) | AssertMessage::ResumedAfterPanic(_) => {
write!(writer, "{}", msg.description().unwrap())
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/intrinsics/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4067,7 +4067,7 @@ pub const unsafe fn const_deallocate(_ptr: *mut u8, _size: usize, _align: usize)
/// Returns whether we should perform contract-checking at runtime.
///
/// This is meant to be similar to the ub_checks intrinsic, in terms
/// of not prematurely commiting at compile-time to whether contract
/// of not prematurely committing at compile-time to whether contract
/// checking is turned on, so that we can specify contracts in libstd
/// and let an end user opt into turning them on.
#[cfg(not(bootstrap))]
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/panicking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ fn panic_null_pointer_dereference() -> ! {
}

panic_nounwind_fmt(
format_args!("null pointer dereference occured"),
format_args!("null pointer dereference occurred"),
/* force_no_backtrace */ false,
)
}
Expand Down
2 changes: 1 addition & 1 deletion library/std/src/sys/pal/uefi/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,7 @@ mod uefi_command_internal {
}

/// Create a map of environment variable changes. Allows efficient setting and rolling back of
/// enviroment variable changes.
/// environment variable changes.
///
/// Entry: (Old Value, New Value)
fn env_changes(env: &CommandEnv) -> Option<BTreeMap<EnvKey, (Option<OsString>, Option<OsString>)>> {
Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/doctest/extracted.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ impl ExtractedDocTests {
Some(&opts.crate_name),
);
self.doctests.push(ExtractedDocTest {
file: filename.prefer_remapped_unconditionaly().to_string(),
file: filename.prefer_remapped_unconditionally().to_string(),
line,
doctest_attributes: langstr.into(),
doctest_code: if size != 0 { Some(full_test_code) } else { None },
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/mir/null/borrowed_mut_null.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//@ run-fail
//@ compile-flags: -C debug-assertions
//@ error-pattern: null pointer dereference occured
//@ error-pattern: null pointer dereference occurred

fn main() {
let ptr: *mut u32 = std::ptr::null_mut();
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/mir/null/borrowed_null.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//@ run-fail
//@ compile-flags: -C debug-assertions
//@ error-pattern: null pointer dereference occured
//@ error-pattern: null pointer dereference occurred

fn main() {
let ptr: *const u32 = std::ptr::null();
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/mir/null/null_lhs.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//@ run-fail
//@ compile-flags: -C debug-assertions
//@ error-pattern: null pointer dereference occured
//@ error-pattern: null pointer dereference occurred

fn main() {
let ptr: *mut u32 = std::ptr::null_mut();
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/mir/null/null_rhs.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//@ run-fail
//@ compile-flags: -C debug-assertions
//@ error-pattern: null pointer dereference occured
//@ error-pattern: null pointer dereference occurred

fn main() {
let ptr: *mut u32 = std::ptr::null_mut();
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/mir/null/two_pointers.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//@ run-fail
//@ compile-flags: -C debug-assertions
//@ error-pattern: null pointer dereference occured
//@ error-pattern: null pointer dereference occurred

fn main() {
let ptr = std::ptr::null();
Expand Down

0 comments on commit 049ab9c

Please sign in to comment.