Skip to content
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

Fix two missing_const_for_fn false positives #3844

Merged
merged 2 commits into from Mar 5, 2019

Conversation

Projects
None yet
4 participants
@phansch
Copy link
Collaborator

commented Mar 4, 2019

Fixes #3841

  • Fixes false positive in external macros
  • Fixes false positive in impl trait methods
Don't trigger missing_const_for_fn in external macros
As reported in #3841. Only fixes the part where it triggers on the
`derive`.

@phansch phansch changed the title Don't trigger missing_const_for_fn in external macros Fix two missing_const_for_fn false positives Mar 5, 2019

@oli-obk

This comment has been minimized.

Copy link
Collaborator

commented Mar 5, 2019

@bors r+

@bors

This comment has been minimized.

Copy link
Contributor

commented Mar 5, 2019

📌 Commit 15cba2e has been approved by oli-obk

@bors

This comment has been minimized.

Copy link
Contributor

commented Mar 5, 2019

⌛️ Testing commit 15cba2e with merge a8f61e7...

bors added a commit that referenced this pull request Mar 5, 2019

Auto merge of #3844 - phansch:const_fn_external_macro, r=oli-obk
Fix two missing_const_for_fn false positives

Fixes #3841

* Fixes false positive in external macros
* Fixes false positive when implement trait methods
@bors

This comment has been minimized.

Copy link
Contributor

commented Mar 5, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: oli-obk
Pushing a8f61e7 to master...

@bors bors merged commit 15cba2e into rust-lang:master Mar 5, 2019

3 checks passed

Travis CI - Pull Request Build Passed
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
homu Test successful
Details

@phansch phansch deleted the phansch:const_fn_external_macro branch Mar 5, 2019

jhpratt added a commit to r-spacex/Enceladus-API that referenced this pull request Mar 6, 2019

Quasi-functional WebSocket server
Currently lets clients connect and join rooms, though no messages are
sent out. This is more a proof-of-concept, showing that it can be run
alongside Rocket in a separate thread.

A significant improvement on the structuring of WebSocket rooms is
currently pending on the upstream housleyjk/ws-rs#257 to be merged. That
will allow the use of a `HashSet` instead of using a `LinkedList`,
providing O(1) deletions rather than O(n).

Another upstream that is pending (though not directly affecting the
build) is rust-lang/rust-clippy#3844. This has been merged and is
pending release. Once this is released, the numerous warnings regarding
`const fn` from clippy should be silenced, as it's either external or
not currently possible in Rust.

flip1995 added a commit to flip1995/rust-clippy that referenced this pull request Mar 9, 2019

Rollup merge of rust-lang#3851 - phansch:refactor_trait_stuff, r=flip…
…1995

Refactor: Extract `trait_ref_of_method` function

This pattern was used in three places after rust-lang#3844, so I think it's worth moving it into `utils/mod.rs` and documenting it.
@jhpratt

This comment has been minimized.

Copy link

commented Apr 17, 2019

@phansch Any timeline for this fix to go live? Running rustup component add clippy followed by cargo clippy --version gives 2019-03-03 (0.0.212) — before this patch was applied.

@phansch

This comment has been minimized.

Copy link
Collaborator Author

commented Apr 17, 2019

@jhpratt It's currently included in Rusts beta channel and should hit stable with Rust 1.35 on May 23rd. (It's unlikely that it will be included in a possible 1.34.1 release as it's a disabled-by-default lint)

@jhpratt

This comment has been minimized.

Copy link

commented Apr 17, 2019

It's not available on nightly beforehand? I guess that's where my confusion is at.

@phansch

This comment has been minimized.

Copy link
Collaborator Author

commented Apr 17, 2019

Oh I misunderstood the Clippy version. It should be available in nightly after nightly-2019-03-12.

bors added a commit to rust-lang/rust that referenced this pull request Apr 23, 2019

Auto merge of #60198 - pietroalbini:stable-next, r=Mark-Simulacrum
[stable] 1.34.1 point release

The release date is April 25th.

Included in this point release:

* #59891: Fix the link to sort_by_cached_key
* #59989: Fix links to Atomic* in RELEASES.md
* rust-lang/rust-clippy#3805: Fix ICE https://github.com/rust-lang/rust-clippy/issue/3747
* rust-lang/rust-clippy#3821: do not trigger redundant_closure when there is a difference in borrow...
* rust-lang/rust-clippy#3844: Fix two missing_const_for_fn false positives

bors added a commit to rust-lang/rust that referenced this pull request Apr 24, 2019

Auto merge of #60198 - pietroalbini:stable-next, r=Mark-Simulacrum
[stable] 1.34.1 point release

The release date is April 25th.

Included in this point release:

* #59891: Fix the link to sort_by_cached_key
* #59989: Fix links to Atomic* in RELEASES.md
* rust-lang/rust-clippy#3805: Fix ICE https://github.com/rust-lang/rust-clippy/issue/3747
* rust-lang/rust-clippy#3821: do not trigger redundant_closure when there is a difference in borrow...
* rust-lang/rust-clippy#3844: Fix two missing_const_for_fn false positives

bors added a commit to rust-lang/rust that referenced this pull request Apr 24, 2019

Auto merge of #60198 - pietroalbini:stable-next, r=Mark-Simulacrum
[stable] 1.34.1 point release

The release date is April 25th.

Included in this point release:

* #59891: Fix the link to sort_by_cached_key
* #59989: Fix links to Atomic* in RELEASES.md
* rust-lang/rust-clippy#3805: Fix ICE https://github.com/rust-lang/rust-clippy/issue/3747
* rust-lang/rust-clippy#3821: do not trigger redundant_closure when there is a difference in borrow...
* rust-lang/rust-clippy#3844: Fix two missing_const_for_fn false positives

bors added a commit to rust-lang/rust that referenced this pull request Apr 24, 2019

Auto merge of #60198 - pietroalbini:stable-next, r=Mark-Simulacrum
[stable] 1.34.1 point release

The release date is April 25th.

Included in this point release:

* #59891: Fix the link to sort_by_cached_key
* #59989: Fix links to Atomic* in RELEASES.md
* rust-lang/rust-clippy#3805: Fix ICE https://github.com/rust-lang/rust-clippy/issue/3747
* rust-lang/rust-clippy#3821: do not trigger redundant_closure when there is a difference in borrow...
* rust-lang/rust-clippy#3844: Fix two missing_const_for_fn false positives

bors added a commit to rust-lang/rust that referenced this pull request Apr 24, 2019

Auto merge of #60198 - pietroalbini:stable-next, r=Mark-Simulacrum
[stable] 1.34.1 point release

The release date is April 25th.

Included in this point release:

* #59891: Fix the link to sort_by_cached_key
* #59989: Fix links to Atomic* in RELEASES.md
* rust-lang/rust-clippy#3805: Fix ICE https://github.com/rust-lang/rust-clippy/issue/3747
* rust-lang/rust-clippy#3821: do not trigger redundant_closure when there is a difference in borrow...
* rust-lang/rust-clippy#3844: Fix two missing_const_for_fn false positives

bors added a commit to rust-lang/rust that referenced this pull request Apr 24, 2019

Auto merge of #60198 - pietroalbini:stable-next, r=Mark-Simulacrum
[stable] 1.34.1 point release

The release date is April 25th.

Included in this point release:

* #59891: Fix the link to sort_by_cached_key
* #59989: Fix links to Atomic* in RELEASES.md
* rust-lang/rust-clippy#3805: Fix ICE https://github.com/rust-lang/rust-clippy/issue/3747
* rust-lang/rust-clippy#3821: do not trigger redundant_closure when there is a difference in borrow...
* rust-lang/rust-clippy#3844: Fix two missing_const_for_fn false positives

netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request May 9, 2019

he
Update rust to version 1.34.1.
Pkgsrc changes: basically none.  Build verified on NetBSD 8.0/i386.

Upstream changes:

Version 1.34.1 (2019-04-25)
===========================

* [Fix false positives for the `redundant_closure` Clippy lint][clippy/3821]
* [Fix false positives for the `missing_const_for_fn` Clippy lint][clippy/3844]
* [Fix Clippy panic when checking some macros][clippy/3805]

[clippy/3821]: rust-lang/rust-clippy#3821
[clippy/3844]: rust-lang/rust-clippy#3844
[clippy/3805]: rust-lang/rust-clippy#3805

netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request May 19, 2019

he
Update rust to version 1.34.1.
Pkgsrc changes: basically none.  Build verified on NetBSD 8.0/i386.

Upstream changes:

Version 1.34.1 (2019-04-25)
===========================

* [Fix false positives for the `redundant_closure` Clippy lint][clippy/3821]
* [Fix false positives for the `missing_const_for_fn` Clippy lint][clippy/3844]
* [Fix Clippy panic when checking some macros][clippy/3805]

[clippy/3821]: rust-lang/rust-clippy#3821
[clippy/3844]: rust-lang/rust-clippy#3844
[clippy/3805]: rust-lang/rust-clippy#3805
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.