Skip to content

Conversation

@eamartin
Copy link
Contributor

Summary:
-removed "ne" methods in libstd and librustpkg
-made default "ne" be inlined
-made one of the "eq" methods in librustpkg follow more standard parameter naming convention

@thestinger
Copy link
Contributor

We actually still need the float, f32 and f64 ones because NaN == NaN is false (we should really have tests for this stuff... but it looks like we don't).

Other than than, this looks great!

@thestinger
Copy link
Contributor

I actually can't think of a case where defining ne in terms of eq would be wrong, it might only apply to the ordering comparisons.

bors added a commit that referenced this pull request Aug 31, 2013
Summary:
-removed "ne" methods in libstd and librustpkg
-made default "ne" be inlined
-made one of the "eq" methods in librustpkg follow more standard parameter naming convention
@bors bors closed this Aug 31, 2013
flip1995 pushed a commit to flip1995/rust that referenced this pull request Jun 4, 2022
Only return `DefId`s to `Fn`-like definitions in `clippy_utils::fn_def_id`

Fixes rust-lang#8850

in `returns.rs` `tcx.fn_sig` is called on the result of `fn_def_id`, which panics if the def is a `const`/`static`/etc rather than a functions definition

https://github.com/rust-lang/rust-clippy/blob/bc4d39e5fea64970dded1e6d2132d41435c0ef24/clippy_lints/src/returns.rs#L294-L303

changelog: Fix ICE due to callable `static`/`const`s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants