Skip to content

Manual: Sort most attributes alphabetically #16428

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

Merged
merged 2 commits into from
Aug 14, 2014

Conversation

mdinger
Copy link
Contributor

@mdinger mdinger commented Aug 11, 2014

Targetting at fixing most of #16414.

Sorts these alphabetically:

Doesn't modify these:


Marker types has an extra newline above fail_ which may throw off formatting (see #16412) or it may be for some other reason. If the newline is just a typo, I can just remove it and format this alphabetically like so:

// Sorted alphabetically
a_bread
b_bread
c_bread
fail_
fail_bounds_check
a_type
b_type
c_type

Marker types is listed as likely to become out of date so I don't know if this is worth doing anyway.

[EDIT] modified Marker types now and tried to update the language items list.

@emberian
Copy link
Member

Note that these aren't the std docs, but the manual. The std docs are http://doc.rust-lang.org/std/

@emberian
Copy link
Member

The lang items are hopelessly out of date anyway. The order you've proposed is fine with me though. r=me if you change it.

@mdinger mdinger changed the title Std docs: Sort most attributes alphabetically Manual: Sort most attributes alphabetically Aug 11, 2014
@mdinger
Copy link
Contributor Author

mdinger commented Aug 11, 2014

@cmr: I sorted Marker types and added every missing item I could find however this is now WIP as I don't have descriptions for all the items. I hope the items I added are in the correct locations. If you or someone could give me descriptions for these items, I'll update it. Otherwise I may ask later on IRC.

Oops about the std docs. Thanks for pointing it out.

These are functions:

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotta add this blank line back

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed on most recent push.

@mdinger
Copy link
Contributor Author

mdinger commented Aug 11, 2014

Lacking definitions for:

  • index_mut
  • fn
  • fn_mut
  • fn_once
  • begin_unwind
  • eh_personality
  • closure_exchange_malloc
  • gc
  • exchange_heap
  • managed_heap
  • iterator
  • opaque
  • owned_box
  • stack_exhausted
  • start
  • ty_desc
  • ty_visitor

@mdinger
Copy link
Contributor Author

mdinger commented Aug 13, 2014

@cmr: I don't want this to just sit in the PR queue if it isn't ready and I can't fix it. Should I just drop the second commit and request review to merge or should I wait; maybe someone will fill in my missing definitions eventually. I asked on IRC for help with the definitions but I got no response.

I figure it's bad etiquette to stay in the PR queue for too long without good reason.

@emberian
Copy link
Member

@mdinger I'm happy to r+ this without the definitions.

@mdinger
Copy link
Contributor Author

mdinger commented Aug 13, 2014

Excellent.

@mdinger
Copy link
Contributor Author

mdinger commented Aug 13, 2014

r=cmr

bors added a commit that referenced this pull request Aug 14, 2014
Targetting at fixing most of #16414.

Sorts these alphabetically:
* [Crate-only attributes](http://doc.rust-lang.org/rust.html#crate-only-attributes)
* [Function-only attributes](http://doc.rust-lang.org/rust.html#function-only-attributes)
* [Miscellaneous attributes](http://doc.rust-lang.org/rust.html#miscellaneous-attributes)
* [Lint check attributes](http://doc.rust-lang.org/rust.html#lint-check-attributes)
* [Built-in Traits](http://doc.rust-lang.org/rust.html#built-in-traits)
* [Types](http://doc.rust-lang.org/rust.html#types)
* [Deriving](http://doc.rust-lang.org/rust.html#deriving)
* [Compiler Features](http://doc.rust-lang.org/rust.html#compiler-features)

Doesn't modify these:
* [Operators](http://doc.rust-lang.org/rust.html#operators): An alternative sorting is unclear.
* [Marker types](http://doc.rust-lang.org/rust.html#marker-types): Could be sorted but uncertain how. See below.
* [Stability](http://doc.rust-lang.org/rust.html#stability): Already sorted by stability

---

[Marker types](http://doc.rust-lang.org/rust.html#marker-types) has an extra newline above `fail_` which may throw off formatting (see #16412) or it may be for some other reason. If the newline is just a typo, I can just remove it and format this alphabetically like so:
```rust
// Sorted alphabetically
a_bread
b_bread
c_bread
fail_
fail_bounds_check
a_type
b_type
c_type
```

Marker types is listed as likely to become out of date so I don't know if this is worth doing anyway.

[EDIT] modified `Marker types` now and tried to update the language items list.
@bors bors closed this Aug 14, 2014
@bors bors merged commit c69f7a9 into rust-lang:master Aug 14, 2014
@mdinger mdinger deleted the sort_attributes branch January 2, 2015 20:52
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

Successfully merging this pull request may close these issues.

3 participants