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

RFC: remove the ability to use E rather than e in float literals #5171

Closed
bstrie opened this issue Feb 28, 2013 · 3 comments
Closed

RFC: remove the ability to use E rather than e in float literals #5171

bstrie opened this issue Feb 28, 2013 · 3 comments

Comments

@bstrie
Copy link
Contributor

bstrie commented Feb 28, 2013

Right now both of the following are legal:

let foo = 9.02e6;
let bar = 9.02E6;

In the interest of There's Only One Way To Do It, I don't see why having two slightly different forms for the same result is necessary. I thereby propose that the capitalized form be removed because:

  1. All other letters in numeric literals (i, u, f) are lower case. Mandating e would make literals more consistent.
  2. Among numbers, a lowercase letter is easier to recognize at a glance than an uppercase one, making this a readability win.

This also makes the grammar slightly simpler. But really I just care about not having two trivially different ways of doing the same thing.

@lifthrasiir
Copy link
Contributor

In my opinion, this is equivalent to disallowing uppercase or lowercase hexadecimal digits (e.g. 0xABCD is allowed and 0xabcd is not). Unlike numeric suffixes there are many programs that generate both variants of float representations.

@graydon
Copy link
Contributor

graydon commented Feb 28, 2013

Yeah, I concur with @lifthrasiir , we allow mixed-case hex literals too. There are unfortunately quite a few ways to write numerically-equal numbers. This doesn't strike me as a big deal either way, I was just going with the most common grammars for FP out there. http://rosettacode.org/wiki/Literals/Floating_point

@bstrie bstrie closed this as completed Feb 28, 2013
@bstrie
Copy link
Contributor Author

bstrie commented Feb 28, 2013

Good enough for me, I'm not about to argue that we shouldn't allow mixed-case hex literals... though I'm a little tempted. :)

bors added a commit to rust-lang-ci/rust that referenced this issue May 2, 2020
Improve deployment and documentation

**This should be merged shortly after** rust-lang#5172

This extracts the python code that generated the `versions.json` file and now sorts the versions. in addition to that it improves the order on the website, respecting the new `rust-*` directories.

The new appearance of the documentation site can be previewed here: https://flip1995.github.io/rust-clippy/

changelog: Add documentation for Clippy stable releases at https://rust-lang.github.io/rust-clippy/
bors added a commit to rust-lang-ci/rust that referenced this issue May 2, 2020
…shearth,llogiq,flip1995

I like to move it, move it

GHA now runs in the background for 6 days (rust-lang#5088)

Since then ~~15~~ 19 PRs were successfully merged and Travis+Appveyor agreed on the status in every case. ([GitHub PR search query](https://github.com/rust-lang/rust-clippy/pulls?utf8=%E2%9C%93&q=is%3Apr+is%3Amerged+merged%3A%3E%3D2020-02-12T15%3A42%3A00+sort%3Aupdated-desc+NOT+%5Bgh-pages%5D+in%3Atitle))

Some PRs were:
- rust-lang#5163
- rust-lang#5170
- rust-lang#5168
- rust-lang#5173
- rust-lang#5171
- rust-lang#5156
- rust-lang#4809
- rust-lang#5177
- rust-lang#5182
- rust-lang#5183
- rust-lang#5184
- rust-lang#5185
- rust-lang#5186
- rust-lang#5181
- rust-lang#5189

Bug with GHA:
- When a rustc PR gets merged between the `integration_build` and the `integration` job, the `integration` job will fail. This happened once in rust-lang#5162, but not in the past 6 days. Even if it would happen every 4th PR we would save time, since splitting up the integration build and tests saves 5-7 minutes per run and a complete run takes 15-17 minutes
- Sometimes the MacOS build takes up to an hour to download the master toolchain. Until now, this happend 2 or 3 times and can be resolved by a `@bors r3try`+canceling the previous run (restarting single jobs is not supported yet)

## Before merging this, rust-lang/rust-central-station#578 has to get merged

This PR is for starting the discussion and to get consensus (@rust-lang/clippy) on a final move to GHA. If we're ready, I'll contact Pietro, to finalize the move.

changelog: Clippy completely runs on GHA now 🎉

---

BTW: The deployment already runs on GHA, instead of Travis.
calebcartwright pushed a commit to calebcartwright/rust that referenced this issue Mar 30, 2022
* Fix formatting of comments in empty structs

* Add tests

* Add single line tests

* Fix block comments

* Revert changes of test source files
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

No branches or pull requests

3 participants