rust: avoid redundant 'static lifetime
ClosedPublic

Authored by indygreg on Wed, Jan 10, 10:42 PM.

Details

Summary

'static is apparently automatic for const variables.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
indygreg created this revision.Wed, Jan 10, 10:42 PM
yuja added a subscriber: yuja.Thu, Jan 11, 8:08 AM

I think it's new feature. Which Rust version should we support?

https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1170-2017-04-27

In D1846#31265, @yuja wrote:

I think it's new feature. Which Rust version should we support?

https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1170-2017-04-27

Hm, that's release notes from April of 2017, so about 9 months ago. To my understanding, as long as we're only using the stable channel, we should be fine for the binaries we're building being packageable even on slower-moving distros like Debian. Let's go with this for now, worst case we can re-add the annotation.

durin42 accepted this revision.Thu, Jan 11, 1:15 PM
This revision is now accepted and ready to land.Thu, Jan 11, 1:15 PM
This revision was automatically updated to reflect the committed changes.
To my understanding, as long as we're only using the stable channel, we should be fine for the binaries we're building being packageable even on slower-moving distros like Debian.

Slow-moving distros like Debian don't update the rust compiler. Debian stable is stuck on rustc 1.14 until Debian buster (next year?).

To my understanding, as long as we're only using the stable channel, we should be fine for the binaries we're building being packageable even on slower-moving distros like Debian.

Slow-moving distros like Debian don't update the rust compiler. Debian stable is stuck on rustc 1.14 until Debian buster (next year?).

My understanding (correct me if you know more) was that that's the distributed compiler, but it's okay to depend on backports or rustup to /build/ packages, since there aren't runtime deps on anything from rustc.

but it's okay to depend on backports or rustup to /build/ packages

The only exception where it's okay is, essentially, Firefox. With a backport of the rust compiler landing in stable about once a year, and even then it won't replace the version in stable. See the gcc-mozilla package in Debian wheezy.