Skip to content

rustup #2038

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 24, 2022
Merged

rustup #2038

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rust-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9bd53718e2537d95d8c092609618c2dcd6f05127
d2df372bca13bb60979c909660e69f2451630e81
2 changes: 1 addition & 1 deletion tests/compile-fail/null_pointer_deref.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#[allow(deref_nullptr)]
fn main() {
let x: i32 = unsafe { *std::ptr::null() }; //~ ERROR null pointer is not a valid pointer for this operation
let x: i32 = unsafe { *std::ptr::null() }; //~ ERROR null pointer is not a valid pointer
panic!("this should never print: {}", x);
}
2 changes: 1 addition & 1 deletion tests/compile-fail/null_pointer_write.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#[allow(deref_nullptr)]
fn main() {
unsafe { *std::ptr::null_mut() = 0i32 }; //~ ERROR null pointer is not a valid pointer for this operation
unsafe { *std::ptr::null_mut() = 0i32 }; //~ ERROR null pointer is not a valid pointer
}