-
Notifications
You must be signed in to change notification settings - Fork 948
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
Add more lints #4598
Add more lints #4598
Conversation
|
Aye, that makes sense. |
That one's not enabled because, past the 2015 edition, such paths don't even work; the semantics were changed in 2018 such that absolute paths may only refer to named crates, where they could previously refer to items declared in the current crate root. So, that lint only means anything in 2015 edition code. All compatibility lints are about “this will mean something different, or be rejected, in the next edition”. So there is no reason to enable any of them once you are using later editions. |
Ah! Thanks @kpreid, much appreciated. |
Just to clarify: my suggestion in OP now boils down to adding |
Yeah adding rust-2018 idioms seems good |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Requesting changes per above.
(Reminder: please re-request a review from me once the changes are addressed to make sure I see it!)
Done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably should add these to wgpu-core and hal as well, but let's wait till #3626 lands.
…6978ae2d251. r=webgpu-reviewers,supply-chain-reviewers,ErichDonGubler,teoxoy Note: This revision contains the arcanization work # Changelog * #4702 Add `WasmNotSendSync` By daxpedda in gfx-rs/wgpu#4702 * #4707 Add more metal keywords By fornwall in gfx-rs/wgpu#4707 * #4706 [naga] remove `span` and `validate` features By teoxoy in gfx-rs/wgpu#4706 * #4709 [dx12] filter out haswell iGPUs By teoxoy in gfx-rs/wgpu#4709 * #4712 Fix typo in pull request template. By jimblandy in gfx-rs/wgpu#4712 * #4598 Add more lints By daxpedda in gfx-rs/wgpu#4598 * #4713 [naga wgsl-in] Include base when printing pointer and array types. By jimblandy in gfx-rs/wgpu#4713 * #4718 [vk] check that adapters are Vulkan compliant By teoxoy in gfx-rs/wgpu#4718 * #4719 [naga] Let constant evaluation of `As` preserve `Splat` expressions. By jimblandy in gfx-rs/wgpu#4719 * #4725 Corrects typo in examples FrameCounter By cantudo in gfx-rs/wgpu#4725 * #3626 Arcanization of wgpu core resources By gents83 in gfx-rs/wgpu#3626 Differential Revision: https://phabricator.services.mozilla.com/D194048
…6978ae2d251. r=webgpu-reviewers,supply-chain-reviewers,ErichDonGubler,teoxoy Note: This revision contains the arcanization work # Changelog * #4702 Add `WasmNotSendSync` By daxpedda in gfx-rs/wgpu#4702 * #4707 Add more metal keywords By fornwall in gfx-rs/wgpu#4707 * #4706 [naga] remove `span` and `validate` features By teoxoy in gfx-rs/wgpu#4706 * #4709 [dx12] filter out haswell iGPUs By teoxoy in gfx-rs/wgpu#4709 * #4712 Fix typo in pull request template. By jimblandy in gfx-rs/wgpu#4712 * #4598 Add more lints By daxpedda in gfx-rs/wgpu#4598 * #4713 [naga wgsl-in] Include base when printing pointer and array types. By jimblandy in gfx-rs/wgpu#4713 * #4718 [vk] check that adapters are Vulkan compliant By teoxoy in gfx-rs/wgpu#4718 * #4719 [naga] Let constant evaluation of `As` preserve `Splat` expressions. By jimblandy in gfx-rs/wgpu#4719 * #4725 Corrects typo in examples FrameCounter By cantudo in gfx-rs/wgpu#4725 * #3626 Arcanization of wgpu core resources By gents83 in gfx-rs/wgpu#3626 Differential Revision: https://phabricator.services.mozilla.com/D194048
…6978ae2d251. r=webgpu-reviewers,supply-chain-reviewers,ErichDonGubler,teoxoy Note: This revision contains the arcanization work # Changelog * #4702 Add `WasmNotSendSync` By daxpedda in gfx-rs/wgpu#4702 * #4707 Add more metal keywords By fornwall in gfx-rs/wgpu#4707 * #4706 [naga] remove `span` and `validate` features By teoxoy in gfx-rs/wgpu#4706 * #4709 [dx12] filter out haswell iGPUs By teoxoy in gfx-rs/wgpu#4709 * #4712 Fix typo in pull request template. By jimblandy in gfx-rs/wgpu#4712 * #4598 Add more lints By daxpedda in gfx-rs/wgpu#4598 * #4713 [naga wgsl-in] Include base when printing pointer and array types. By jimblandy in gfx-rs/wgpu#4713 * #4718 [vk] check that adapters are Vulkan compliant By teoxoy in gfx-rs/wgpu#4718 * #4719 [naga] Let constant evaluation of `As` preserve `Splat` expressions. By jimblandy in gfx-rs/wgpu#4719 * #4725 Corrects typo in examples FrameCounter By cantudo in gfx-rs/wgpu#4725 * #3626 Arcanization of wgpu core resources By gents83 in gfx-rs/wgpu#3626 Differential Revision: https://phabricator.services.mozilla.com/D194048 UltraBlame original commit: eb839abb42abde594497e419517260997fa1fc4d
…6978ae2d251. r=webgpu-reviewers,supply-chain-reviewers,ErichDonGubler,teoxoy Note: This revision contains the arcanization work # Changelog * #4702 Add `WasmNotSendSync` By daxpedda in gfx-rs/wgpu#4702 * #4707 Add more metal keywords By fornwall in gfx-rs/wgpu#4707 * #4706 [naga] remove `span` and `validate` features By teoxoy in gfx-rs/wgpu#4706 * #4709 [dx12] filter out haswell iGPUs By teoxoy in gfx-rs/wgpu#4709 * #4712 Fix typo in pull request template. By jimblandy in gfx-rs/wgpu#4712 * #4598 Add more lints By daxpedda in gfx-rs/wgpu#4598 * #4713 [naga wgsl-in] Include base when printing pointer and array types. By jimblandy in gfx-rs/wgpu#4713 * #4718 [vk] check that adapters are Vulkan compliant By teoxoy in gfx-rs/wgpu#4718 * #4719 [naga] Let constant evaluation of `As` preserve `Splat` expressions. By jimblandy in gfx-rs/wgpu#4719 * #4725 Corrects typo in examples FrameCounter By cantudo in gfx-rs/wgpu#4725 * #3626 Arcanization of wgpu core resources By gents83 in gfx-rs/wgpu#3626 Differential Revision: https://phabricator.services.mozilla.com/D194048 UltraBlame original commit: eb839abb42abde594497e419517260997fa1fc4d
…6978ae2d251. r=webgpu-reviewers,supply-chain-reviewers,ErichDonGubler,teoxoy Note: This revision contains the arcanization work # Changelog * #4702 Add `WasmNotSendSync` By daxpedda in gfx-rs/wgpu#4702 * #4707 Add more metal keywords By fornwall in gfx-rs/wgpu#4707 * #4706 [naga] remove `span` and `validate` features By teoxoy in gfx-rs/wgpu#4706 * #4709 [dx12] filter out haswell iGPUs By teoxoy in gfx-rs/wgpu#4709 * #4712 Fix typo in pull request template. By jimblandy in gfx-rs/wgpu#4712 * #4598 Add more lints By daxpedda in gfx-rs/wgpu#4598 * #4713 [naga wgsl-in] Include base when printing pointer and array types. By jimblandy in gfx-rs/wgpu#4713 * #4718 [vk] check that adapters are Vulkan compliant By teoxoy in gfx-rs/wgpu#4718 * #4719 [naga] Let constant evaluation of `As` preserve `Splat` expressions. By jimblandy in gfx-rs/wgpu#4719 * #4725 Corrects typo in examples FrameCounter By cantudo in gfx-rs/wgpu#4725 * #3626 Arcanization of wgpu core resources By gents83 in gfx-rs/wgpu#3626 Differential Revision: https://phabricator.services.mozilla.com/D194048 UltraBlame original commit: eb839abb42abde594497e419517260997fa1fc4d
In #4597 I stumbled on a couple of
Surface
s where I forgot to apply'static
, which reminded me ofelided-lifetimes-in-paths
. I used it to make sure I didn't miss any others.I'm not sure if this is desired at all, but thought I would make a PR so maintainers can take a look.
I could also add the whole
rust-2018-idioms
group if that's desirable, it's pretty simply withcargo fix
.Requires #4597, but I'm happy to rebase it to
trunk
if it helps.