From 7ca5d95acc1c9754964a8a755a91f19cae540372 Mon Sep 17 00:00:00 2001 From: Frederic Marx Date: Wed, 30 Mar 2016 02:55:00 +0200 Subject: [PATCH] Add explicit
-tags and download page header --- community.md | 17 ++++++++++++++++- conduct.md | 6 +++++- css/style.css | 40 +++++++++++++++++++--------------------- documentation.md | 10 ++++++++++ downloads.html | 10 +++++++--- faq.md | 41 +++++++++++++++++++++++++++++++++++++++++ 6 files changed, 98 insertions(+), 26 deletions(-) diff --git a/community.md b/community.md index b1def57af..9b970ae19 100644 --- a/community.md +++ b/community.md @@ -24,6 +24,8 @@ care about making the community a safe space for you. [mod_team]: https://www.rust-lang.org/team.html#Moderation [mod_team_email]: mailto:rust-mods@rust-lang.org +--- + ## Getting Started The most important community resources for those new to Rust are: @@ -37,6 +39,8 @@ You may also find help on the question and answer site, [Stack Overflow][stack_o [stack_overflow]: https://stackoverflow.com/questions/tagged/rust +--- + ## News [This Week in Rust][twir] collects the latest news, upcoming events @@ -53,6 +57,8 @@ We also have a [Twitter][twitter] account. [reddit_coc]: https://www.reddit.com/r/rust/comments/2rvrzx/our_code_of_conduct_please_read/ [twitter]: https://twitter.com/rustlang +--- + ## IRC Channels Rustaceans maintain a number of friendly, high-traffic [IRC] channels on Mozilla's IRC network. @@ -89,7 +95,7 @@ Rust's developers coordinate in [#rust-internals][internals_irc]. It is for real [IRC]: https://en.wikipedia.org/wiki/Internet_Relay_Chat [rust_irc]: https://client00.chat.mibbit.com/?server=irc.mozilla.org&channel=%23rust -[rustc_irc]: https://client00.chat.mibbit.com/?server=irc.mozilla.org&channel=%23rustc +[rustc_irc]: https://client00.chat.mibbit.com/?server=irc.mozilla.org&channel=%23rustc [libs_irc]: https://client00.chat.mibbit.com/?server=irc.mozilla.org&channel=%23rust-libs [tools_irc]: https://client00.chat.mibbit.com/?server=irc.mozilla.org&channel=%23rust-tools [lang_irc]: https://client00.chat.mibbit.com/?server=irc.mozilla.org&channel=%23rust-lang @@ -106,6 +112,8 @@ Rust's developers coordinate in [#rust-internals][internals_irc]. It is for real [beginners_irc]: https://client00.chat.mibbit.com/?server=irc.mozilla.org&channel=%23rust-beginners [networking_irc]: https://client00.chat.mibbit.com/?server=irc.mozilla.org&channel=%23rust-networking +--- + ## Discussion Forums We have two forums for asynchronous discussion: @@ -120,6 +128,8 @@ We have two forums for asynchronous discussion: [users_forum]: https://users.rust-lang.org/ [internals_forum]: https://internals.rust-lang.org/ +--- + ## User Groups and Meetups There are more than 50 [Rust User Groups][user_group] worldwide in over 20 @@ -134,6 +144,8 @@ Contact the [community team][community_team] to add your own. [user_group]: ./user-groups.html [calendar]: https://www.google.com/calendar/embed?src=apd9vmbc22egenmtu5l6c5jbfc@group.calendar.google.com +--- + ## The Rust Team Rust has a community-driven development process where most decisions are made @@ -180,7 +192,10 @@ help get you started. [community_team]: https://www.rust-lang.org/team.html#Community [mod_team]: https://www.rust-lang.org/team.html#Moderation +--- + + ## Rust Development Rust has had over [1,200 different contributors][authors], a number that grows diff --git a/conduct.md b/conduct.md index 100fd4537..edcfa8b24 100644 --- a/conduct.md +++ b/conduct.md @@ -5,6 +5,8 @@ title: The Rust Code of Conduct · The Rust Programming Language # The Rust Code of Conduct +--- + ## Conduct **Contact**: [rust-mods@rust-lang.org](mailto:rust-mods@rust-lang.org) @@ -18,6 +20,8 @@ title: The Rust Code of Conduct · The Rust Programming Language * Private harassment is also unacceptable. No matter who you are, if you feel you have been or are being harassed or made uncomfortable by a community member, please contact one of the channel ops or any of the [Rust moderation team](/team.html#Moderation) immediately. Whether you're a regular contributor or a newcomer, we care about making this community a safe place for you and we've got your back. * Likewise any spamming, trolling, flaming, baiting or other attention-stealing behaviour is not welcome. +--- + ## Moderation @@ -38,4 +42,4 @@ And if someone takes issue with something you said or did, resist the urge to be The enforcement policies listed above apply to all official Rust venues; including official IRC channels (#rust, #rust-internals, #rust-tools, #rust-libs, #rustc, #rust-beginners, #rust-docs, #rust-community, #rust-lang, and #cargo); GitHub repositories under rust-lang, rust-lang-nursery, and rust-lang-deprecated; and all forums under rust-lang.org (users.rust-lang.org, internals.rust-lang.org). For other projects adopting the Rust Code of Conduct, please contact the maintainers of those projects for enforcement. If you wish to use this code of conduct for your own project, consider explicitly mentioning your moderation policy or making a copy with your own moderation policy so as to avoid confusion. -*Adapted from the [Node.js Policy on Trolling](http://blog.izs.me/post/30036893703/policy-on-trolling) as well as the [Contributor Covenant v1.3.0](http://contributor-covenant.org/version/1/3/0/).* \ No newline at end of file +*Adapted from the [Node.js Policy on Trolling](http://blog.izs.me/post/30036893703/policy-on-trolling) as well as the [Contributor Covenant v1.3.0](http://contributor-covenant.org/version/1/3/0/).* diff --git a/css/style.css b/css/style.css index 088c10476..3e161eed2 100644 --- a/css/style.css +++ b/css/style.css @@ -96,22 +96,6 @@ h3 { font-weight: 500; } -.side-header h2 { - font-weight: 500; - font-size: 18.5px; - line-height: 24px; - margin-top: 7px; -} - -.side-header h3 { - font-size: 1em; - margin-top: 0px; -} - -.side-header p { - color: #777; -} - .table-features { width: 100%; margin-bottom: 18px; @@ -201,7 +185,7 @@ p.pitch a { hr { margin-top: 2em; - margin-bottom: 3em; + margin-bottom: 1em; border-top: 2px solid #dedede; } @@ -412,17 +396,31 @@ ul.laundry-list { .content h2 { font-size: 2em; line-height: 1.5em; - margin: 3rem 0 1rem; + margin: 1rem 0; font-weight: 400; - border-top: 2px solid #dedede; - padding-top: 1rem; } .content h3 { font-size: 1em; line-height: 1.5em; font-weight: 500; - margin: 2rem 0 .5rem; + margin: .5rem 0; +} + +.side-header h2 { + font-weight: 500; + font-size: 18.5px; + line-height: 24px; + margin-top: 7px; +} + +.side-header h3 { + font-size: 1em; + margin-top: 0px; +} + +.side-header p { + color: #777; } @media screen and (min-width: 820px) { diff --git a/documentation.md b/documentation.md index 56a2865fb..d307ca7f0 100644 --- a/documentation.md +++ b/documentation.md @@ -12,6 +12,8 @@ show you how to install it, and explain its syntax and concepts. Upon completing the book, you'll be an intermediate Rust developer, and will have a good grasp of the fundamental ideas behind Rust. +--- + ## Learning Rust [The Rust Programming Language][book]. Also known as "The Book", @@ -37,6 +39,8 @@ for learning Rust. [nomicon]: https://doc.rust-lang.org/nomicon/ [rust-learning]: https://github.com/ctjhoa/rust-learning +--- + ## References [Standard Library API Reference][api]. Documentation for the @@ -62,6 +66,8 @@ the errors produced by the Rust compiler. [cargo]: http://doc.crates.io/guide.html [err]: https://doc.rust-lang.org/error-index.html +--- + ## Project policies [Rust security policy][security]. The project's policies for @@ -75,6 +81,8 @@ trademarks are described here. [security]: security.html [legal]: legal.html +--- + ## Nightly and beta documentation Much of the official Rust documentation is also available for the @@ -84,6 +92,8 @@ linked above. [nightly]: http://doc.rust-lang.org/nightly/ [beta]: http://doc.rust-lang.org/beta/ +--- + ## Non-english resources For resources in languages other than English, see the diff --git a/downloads.html b/downloads.html index f0baac98a..2fccca45e 100644 --- a/downloads.html +++ b/downloads.html @@ -2,6 +2,10 @@ layout: basic title: Downloads · The Rust Programming Language --- +
+

Downloads

+ +
@@ -55,7 +59,7 @@

{{ site.stable_date }}


-
+

Beta  ({{ site.beta }})

@@ -104,7 +108,7 @@

Beta  ({{ site.beta }})


-
+

Nightly  ({{ site.nightly }})

@@ -194,4 +198,4 @@

Nightly  ({{ site.nightly }})

- +
diff --git a/faq.md b/faq.md index 9c6a13be5..ccc98ddfa 100644 --- a/faq.md +++ b/faq.md @@ -42,6 +42,7 @@ If there is some common or important question you feel is wrongly left unanswere
+

The Rust Project

@@ -150,6 +151,8 @@ Why a BSD-style permissive license rather than MPL or tri-license? This is partly due to preference of the original developer (Graydon), and partly due to the fact that languages tend to have a wider audience and more diverse set of possible embeddings and end-uses than products such as web browsers. We'd like to appeal to as many of those potential contributors as possible. +
+

Performance

@@ -236,6 +239,8 @@ Does Rust have a runtime? Not in the typical sense used by languages such as Java, but parts of the Rust standard library can be considered a "runtime", providing a heap, backtraces, unwinding, and stack guards. There is a [small amount of initialization code](https://github.com/rust-lang/rust/blob/33916307780495fe311fe9c080b330d266f35bfb/src/libstd/rt.rs#L43) that runs before the user's `main` function. The Rust standard library additionally links to the C standard library, which does similar [runtime initialization](http://www.embecosm.com/appnotes/ean9/html/ch05s02.html). Rust code can be compiled without the standard library, in which case the runtime is roughly equivalent to C's. +
+

Syntax

@@ -313,6 +318,8 @@ match val.do_something() { } ``` +
+

Numerics

@@ -345,6 +352,8 @@ How can I convert between numeric types? There are two ways: the `as` keyword, which does simple casting for primitive types, and the [`Into`][Into] and [`From`][From] traits, which are implemented for a number of type conversions (and which you can implement for your own types). The [`Into`][Into] and [`From`][From] traits are only implemented in cases where conversions are lossless, so for example, `f64::from(0f32)` will compile while `f32::from(0f64)` will not. On the other hand, `as` will convert between any two primitive types, truncating values as necessary. +
+

Strings

@@ -409,6 +418,8 @@ The [`char`][char] type is UTF-32. If you are sure you need to do a codepoint-at For a more in-depth explanation of why UTF-8 is usually preferable over UTF-16 or UTF-32, read the [UTF-8 Everywhere manifesto](http://utf8everywhere.org/). +
+

Collections

@@ -449,6 +460,8 @@ You don't necessarily have to. If you're declaring an array directly, the size i One thing to note is that currently Rust doesn't offer generics over arrays of different size. If you'd like to accept a contiguous container of a variable number of values, use a [`Vec`][Vec] or slice (depending on whether you need ownership). +
+

Ownership

@@ -575,6 +588,8 @@ The most common sorts of deref coercions are: - `&Vec` to `&[T]` - `&String` to `&str` +
+

Lifetimes

@@ -655,6 +670,8 @@ How do I express the absence of a value without null? You can do that with the [`Option`][Option] type, which can either be `Some(T)` or `None`. `Some(T)` indicates that a value of type `T` is contained within, while `None` indicates the absence of a value. +
+

Generics

@@ -755,6 +772,8 @@ Floating point types ([`f32`][f32] and [`f64`][f64]) are good examples of each. As explained in [the earlier question on floats](#why-cant-i-compare-floats), these distinctions are important because some collections rely on total orderings/equality in order to give correct results. +
+

Input / Output

@@ -798,6 +817,8 @@ The easiest way is to use [`Args`][Args], which provides an iterator over the in If you're looking for something more powerful, there are a [number of options on crates.io](https://crates.io/keywords/argument). +
+

Error Handling

@@ -832,6 +853,8 @@ If you're looking for a way to avoid handling [`Result`s][Result] in other peopl If you really don't want to handle an error, use [`unwrap()`][unwrap], but know that doing so means that the code panics on failure, which usually results in a shutting down the process. +
+

Concurrency

@@ -842,6 +865,8 @@ Mutation is safe if it's synchronized. Mutating a static [`Mutex`][Mutex] (lazil More generally, if a type implements [`Sync`][Sync] and does not implement [`Drop`][Drop], it [can be used in a `static`](https://doc.rust-lang.org/book/const-and-static.html#static). +
+

Macros

@@ -850,6 +875,8 @@ Can I write a macro to generate identifiers? Not currently. Rust macros are ["hygienic macros"](https://en.wikipedia.org/wiki/Hygienic_macro), which intentionally avoid capturing or creating identifiers that may cause unexpected collisions with other identifiers. Their capabilities are significantly different than the style of macros commonly associated with the C preprocessor. Macro invocations can only appear in places where they are explicitly supported: items, method declarations, statements, expressions, and patterns. Here, "method declarations" means a blank space where a method can be put. They can't be used to complete a partial method declaration. By the same logic, they can't be used to complete a partial variable declaration. +
+

Debugging and Tooling

@@ -876,6 +903,8 @@ There are a number of options for development environment with Rust, all of whic `rustfmt` is [right here](https://github.com/rust-lang-nursery/rustfmt), and is being actively developed to make reading Rust code as easy and predictable as possible. +
+

Low-Level

@@ -921,6 +950,8 @@ enum CLike { The `#[repr(C)]` attribute can be applied to such `enums` to give them the same representation they would have in equivalent C code. This allows using Rust `enum`s in FFI code where C `enum`s are also used, for most use cases. The attribute can also be applied to `struct`s to get the same layout as a C `struct` would. +
+

Cross-Platform