Skip to content

Commit c261d91

Browse files
committed
bump lint version
1 parent 8f40b2e commit c261d91

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

clippy_lints/src/casts/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,7 @@ declare_clippy_lint! {
781781
/// let aligned = std::ptr::dangling::<u32>();
782782
/// let mut_ptr: *mut i64 = std::ptr::dangling_mut();
783783
/// ```
784-
#[clippy::version = "1.86.0"]
784+
#[clippy::version = "1.87.0"]
785785
pub MANUAL_DANGLING_PTR,
786786
style,
787787
"casting small constant literals to pointers to create dangling pointers"

tests/ui/transmute_null_to_fn.stderr

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,39 +9,39 @@ LL | let _: fn() = std::mem::transmute(0 as *const ());
99
= help: to override `-D warnings` add `#[allow(clippy::transmute_null_to_fn)]`
1010

1111
error: transmuting a known null pointer into a function pointer
12-
--> tests/ui/transmute_null_to_fn.rs:11:23
12+
--> tests/ui/transmute_null_to_fn.rs:12:23
1313
|
1414
LL | let _: fn() = std::mem::transmute(std::ptr::null::<()>());
1515
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this transmute results in undefined behavior
1616
|
1717
= help: try wrapping your function pointer type in `Option<T>` instead, and using `None` as a null pointer value
1818

1919
error: transmuting a known null pointer into a function pointer
20-
--> tests/ui/transmute_null_to_fn.rs:22:23
20+
--> tests/ui/transmute_null_to_fn.rs:23:23
2121
|
2222
LL | let _: fn() = std::mem::transmute(ZPTR);
2323
| ^^^^^^^^^^^^^^^^^^^^^^^^^ this transmute results in undefined behavior
2424
|
2525
= help: try wrapping your function pointer type in `Option<T>` instead, and using `None` as a null pointer value
2626

2727
error: transmuting a known null pointer into a function pointer
28-
--> tests/ui/transmute_null_to_fn.rs:32:23
28+
--> tests/ui/transmute_null_to_fn.rs:33:23
2929
|
3030
LL | let _: fn() = std::mem::transmute(0 as *const u8 as *const ());
3131
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this transmute results in undefined behavior
3232
|
3333
= help: try wrapping your function pointer type in `Option<T>` instead, and using `None` as a null pointer value
3434

3535
error: transmuting a known null pointer into a function pointer
36-
--> tests/ui/transmute_null_to_fn.rs:35:23
36+
--> tests/ui/transmute_null_to_fn.rs:36:23
3737
|
3838
LL | let _: fn() = std::mem::transmute(std::ptr::null::<()>() as *const u8);
3939
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this transmute results in undefined behavior
4040
|
4141
= help: try wrapping your function pointer type in `Option<T>` instead, and using `None` as a null pointer value
4242

4343
error: transmuting a known null pointer into a function pointer
44-
--> tests/ui/transmute_null_to_fn.rs:38:23
44+
--> tests/ui/transmute_null_to_fn.rs:39:23
4545
|
4646
LL | let _: fn() = std::mem::transmute(ZPTR as *const u8);
4747
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this transmute results in undefined behavior

0 commit comments

Comments
 (0)