profile
viewpoint
Florian Gilcher skade Asquera and Ferrous Systems Berlin https://ferrous-systems.com CEO of @Asquera and @ferroussystems. Heavily invested in the @ruby, @rust-lang and @elastic/@solr communities. Organiser @eurucamp/@jrubyconf/@rustfest.

async-rs/async-std 2627

Async version of the Rust standard library

http-rs/surf 917

Fast and friendly HTTP client framework for async Rust

ferrous-systems/rust-three-days-course 385

Course material for Rust, taking roughly three days. English, German, Spanish available.

http-rs/async-h1 122

Asynchronous HTTP/1.1 in Rust

async-rs/async-tls 121

A TLS implementation over AsyncRead and AsyncWrite

http-rs/http-types 104

Common types for HTTP operations

kittylyst/ocelotter 68

An experiment to implement a simple JVM in Rust

logankoester/pusher-client 47

Ruby client for consuming WebSockets from http://pusherapp.com

Hoverbear/digitalocean 31

A prototype API for Digital Ocean.

push eventrust-lang/crates.io-index

bors

commit sha cb1277107733699fb0549b1f991baf1ff962cb67

Updating crate `reader#0.1.0`

view details

push time in 4 minutes

push eventrust-lang/crates.io-index

bors

commit sha 3301eb87ab9da6d1fb47c074b180176bdaa30d36

Updating crate `async-timer#1.0.0-beta.6`

view details

push time in 4 minutes

push eventrust-lang/crates.io-index

bors

commit sha 77b890e715d6c5e5094d862ba65c8daf86753763

Updating crate `inferno#0.10.2`

view details

push time in 4 minutes

push eventrust-lang/crates.io-index

bors

commit sha 8aee1cb781e68d5c17425f6613c1023c9ebfcdb0

Updating crate `js-bindgen#0.0.5`

view details

push time in 5 minutes

push eventrust-lang/crates.io-index

bors

commit sha de96a85bb1ff03c7f2ed2567f196b1f48c726a78

Updating crate `indy-sys#1.16.0-rc-162`

view details

push time in 6 minutes

push eventrust-lang/crates.io-index

bors

commit sha 955ededf1ea5b6d9ace30bb45c4e0ba6f23cc6da

Updating crate `urdf-viz#0.21.2`

view details

push time in 7 minutes

push eventrust-lang/crates.io-index

bors

commit sha b9098b1b32a77279784182effb731660d88c919f

Updating crate `k#0.20.1`

view details

push time in 16 minutes

push eventrust-lang/crates.io-index

bors

commit sha 442fc53fd7dbcac1fbb07f542a8886ee35e51fab

Updating crate `mogwai#0.3.5`

view details

push time in 21 minutes

push eventrust-lang/crates.io-index

bors

commit sha a1148b24f254272ae7dee8a2efe97bd8572abc43

Updating crate `js-bindgen#0.0.4`

view details

push time in 28 minutes

push eventrust-lang/crates.io-index

bors

commit sha f4a090155e259d31bc3b912b6ffcef42b7220582

Updating crate `qiniu-download#0.0.14`

view details

push time in 38 minutes

push eventrust-lang/crates.io-index

bors

commit sha 1592251775b8541661d7cd79d131770cbbebca63

Updating crate `infer#0.3.2`

view details

push time in an hour

issue openedrust-lang/compiler-team

Uplift the `invalid_atomic_ordering` lint from clippy to rustc

Proposal

Move the invalid_atomic_ordering lint from clippy into the compiler. The lint would be deny by default, and fire when using an invalid ordering for the given atomic operation.

For example, an incomplete set of the functionality it covers is shown below:

// Bad: `Release` cannot be used for `load`.
some_atomic.load(Release);
// Bad: `Acquire` cannot be used for `store`.
some_atomic.store(_, Acquire);
// Bad: `Relaxed` cannot be used as a fence's ordering.
core::sync::atomic::fence(Relaxed);
// Bad: `Release` cannot be used as the failure ordering
some_atomic.compare_exchange(_, _, SeqCst, Release);
// Bad: The failure ordering cannot be stronger than the success ordering
some_atomic.compare_exchange(_, _, Relaxed, SeqCst);

Using the wrong atomic ordering causes a panic at runtime, and for a long time people have mentioned that it's unfortunate that using legal orderings is not enforced in the type system.

Regardless of whether or not that eventually happens (I think it sounds hard, especially for cases like compare_exchange), the current APIs will not go away, and so this lint that prevents misuse would be valuable.

The lint has no false positives, and so long as the orderings are specified directly in the call covers the whole set of stable[0] functions which take ordering arguments that I'm aware of.

[0]: (It doesn't cover the unstable cmpxchg16b intrinsic in core::arch::{x86, x86_64} but this could easily be supported in the future via the same code path that handles the compare_exchange and compare_exchange_weak functions).

Mentors or Reviewers

I have no idea. I'm just planning on winging it based on other similar lint uplifts, and hoping the review robot picks someone acceptable 😅. (Open to suggestions as that seems non-ideal)

Process

The main points of the Major Change Process is as follows:

  • [x] File an issue describing the proposal.
  • [ ] A compiler team member or contributor who is knowledgeable in the area can second by writing @rustbot second.
    • Finding a "second" suffices for internal changes. If however you are proposing a new public-facing feature, such as a -C flag, then full team check-off is required.
    • Compiler team members can initiate a check-off via @rfcbot fcp merge on either the MCP or the PR.
  • [ ] Once an MCP is seconded, the Final Comment Period begins. If no objections are raised after 10 days, the MCP is considered approved.

You can read more about Major Change Proposals on forge.

Comments

This issue is not meant to be used for technical discussion. There is a Zulip stream for that. Use this issue to leave procedural comments, such as volunteering to review, indicating that you second the proposal (or third, etc), or raising a concern that you would like to be addressed.

created time in an hour

push eventrust-lang/crates.io-index

bors

commit sha 73dfc26097a7e5decfec053bd7b35e23dc553b5a

Updating crate `cargo-webassembly#0.0.16`

view details

push time in an hour

push eventrust-lang/crates.io-index

bors

commit sha 640fc41ca4ce74798879b7432516165961a34fe2

Updating crate `indy-sys#1.15.0-dev-1609`

view details

push time in an hour

push eventrust-lang/crates.io-index

bors

commit sha 1ea80af7a5252f34b5d8c850e2fa4ee30b28a15c

Updating crate `ic-cdk-macros#0.2.0`

view details

push time in 2 hours

push eventrust-lang/crates.io-index

bors

commit sha e8a126d5a5a206462333209c7bed8e6779715eb7

Updating crate `ic-cdk#0.2.0`

view details

push time in 2 hours

push eventrust-lang/crates.io-index

bors

commit sha f343ee8ab807cb1902bccc8d386d3714819fc426

Updating crate `cmd_parser#0.1.0`

view details

push time in 2 hours

push eventrust-lang/crates.io-index

bors

commit sha a96aab3f6ed0502b76e584af40f8e8d2367a8abf

Updating crate `shared-string#0.1.2`

view details

push time in 2 hours

push eventrust-lang/crates.io-index

bors

commit sha 58de4af669d2e4fb9645f1e518f062ecfefb1499

Updating crate `shared-string#0.1.1`

view details

push time in 2 hours

issue commentrust-lang/rfcs

Allow for and while loop to return value (without discussion of keyword names)

What if the clause is next to the conditional?

let var = while BOOL else EXPR { BLOCK }

You're normally reading a while loop as:

  1. Evaluate the conditional.
  2. If true, execute the block.
  3. Else...

This way, else is in proximity to the conditional and the assignment, which I think helps a reader make that association.

And break breaks out of a while loop, so it never hits the conditional. So if you have the intuition that the conditional either goes into the block or stops and returns the else clause, then it makes more sense that the break must bypass else entirely.

JelteF

comment created time in 2 hours

push eventrust-lang/crates.io-index

bors

commit sha ba50bb4b8b826f22ddc41fbe6d1a2e923bfc703f

Updating crate `shared-string#0.1.0`

view details

push time in 2 hours

push eventrust-lang/crates.io-index

bors

commit sha 2afefa871f6e8fdfce8336d8f923e3463e075f5c

Updating crate `pwrsurge#0.3.1`

view details

push time in 2 hours

push eventrust-lang/crates.io-index

bors

commit sha 00fe0f883972d3e4d1b15012112259e4c1983aa9

Updating crate `osm-geo-mapper#0.5.1`

view details

push time in 2 hours

push eventrust-lang/crates.io-index

bors

commit sha 797eea255e97ca215cc22de174ce4e377bae4329

Updating crate `advent-of-code#2019.12.169`

view details

push time in 2 hours

push eventrust-lang/crates.io-index

bors

commit sha fcea11feb5cc5c242e828b41ebcdf74984d699bb

Updating crate `neli#0.5.1`

view details

push time in 2 hours

push eventrust-lang/crates.io-index

bors

commit sha f28eea53d94c9e428d560fd285a888ee5064a92a

Updating crate `randy#1.6.3`

view details

push time in 2 hours

push eventrust-lang/crates.io-index

bors

commit sha 461594147fa2f1c93f2d1b8a3906f8c07b040243

Updating crate `usbd-hid#0.4.5`

view details

push time in 2 hours

push eventrust-lang/crates.io-index

bors

commit sha 649df538709b5e195e490fd7b8ca7029ccc69c7d

Updating crate `usbd-hid-macros#0.4.5`

view details

push time in 2 hours

push eventrust-lang/crates.io-index

bors

commit sha a9213e6aa4605546b164c8479f89c94d058f25e6

Updating crate `yadf#0.9.0`

view details

push time in 2 hours

push eventrust-lang/crates.io-index

bors

commit sha 9b05ff4d260452292deb76f71aabdfe6c7cbebe5

Updating crate `cpuid-bool#0.2.0`

view details

push time in 2 hours

more