Skip to content

Commit

Permalink
Rebase successful?
Browse files Browse the repository at this point in the history
  • Loading branch information
ofeeg committed Aug 15, 2023
1 parent 47cf90a commit b868cbb
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 167 deletions.
15 changes: 0 additions & 15 deletions tests/ui/allow_attributes_false_positive.rs

This file was deleted.

34 changes: 17 additions & 17 deletions tests/ui/fn_null_check.stderr
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
error: function pointer assumed to be nullable, even though it isn't
error: lint `clippy::fn_null_check` has been renamed to `incorrect_fn_null_checks`
--> $DIR/fn_null_check.rs:2:9
|
LL | #![warn(clippy::fn_null_check)]
| ^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `incorrect_fn_null_checks`
|
= note: `-D renamed-and-removed-lints` implied by `-D warnings`

error: function pointers are not nullable, so checking them for null will always return false
--> $DIR/fn_null_check.rs:14:8
|
LL | if (fn_ptr as *mut ()).is_null() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: try wrapping your function pointer type in `Option<T>` instead, and using `is_none` to check for null pointer value
= note: `-D clippy::fn-null-check` implied by `-D warnings`
= help: wrap the function pointer inside an `Option` and use `Option::is_none` to check for null pointer value
= note: `-D incorrect-fn-null-checks` implied by `-D warnings`

error: function pointer assumed to be nullable, even though it isn't
error: function pointers are not nullable, so checking them for null will always return false
--> $DIR/fn_null_check.rs:15:8
|
LL | if (fn_ptr as *const u8).is_null() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: try wrapping your function pointer type in `Option<T>` instead, and using `is_none` to check for null pointer value
= help: wrap the function pointer inside an `Option` and use `Option::is_none` to check for null pointer value

error: function pointer assumed to be nullable, even though it isn't
error: function pointers are not nullable, so checking them for null will always return false
--> $DIR/fn_null_check.rs:16:8
|
LL | if (fn_ptr as *const ()) == std::ptr::null() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: try wrapping your function pointer type in `Option<T>` instead, and using `is_none` to check for null pointer value
= help: wrap the function pointer inside an `Option` and use `Option::is_none` to check for null pointer value

error: function pointer assumed to be nullable, even though it isn't
error: function pointers are not nullable, so checking them for null will always return false
--> $DIR/fn_null_check.rs:17:8
|
LL | if (fn_ptr as *const ()) == (0 as *const ()) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: try wrapping your function pointer type in `Option<T>` instead, and using `is_none` to check for null pointer value

error: function pointer assumed to be nullable, even though it isn't
--> $DIR/fn_null_check.rs:18:8
|
LL | if (fn_ptr as *const ()) == ZPTR {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: try wrapping your function pointer type in `Option<T>` instead, and using `is_none` to check for null pointer value
= help: wrap the function pointer inside an `Option` and use `Option::is_none` to check for null pointer value

error: aborting due to 5 previous errors

135 changes: 0 additions & 135 deletions tests/ui/integer_arithmetic.rs

This file was deleted.

0 comments on commit b868cbb

Please sign in to comment.