[std::ascii] Add .to_ascii_opt() and .into_ascii_opt() returning Option

… instead of failing.

Make them default methods on the trait, and also make .to_ascii()
a default method while we’re at it.

Conflicts:
	src/libstd/ascii.rs
rustc: Strip struct fields and enum variants

Closes #11085
Implement a Once primitive for initialization

Of the 8 static mutexes that are currently in-use by the compiler and its
libraries, 4 of them are currently used for one-time initialization. The
unforunate side effect of using a static mutex is that the mutex is leaked.

This primitive should provide the basis for efficiently keeping track of
one-time initialization as well as ensuring that it does not leak the internal
mutex that is used.

I have chosen to put this in libstd because libstd is currently making use of a
static initialization mutex (rt::local_ptr), but I can also see a more refined
version of this type being suitable to initialize FFI bindings (such as
initializing LLVM and initializing winsock networking on windows). I also intend
on adding "helper threads" to libnative, and those will greatly benefit from a
simple "once" primitive rather than always reinventing the wheel by using
mutexes and bools.

I would much rather see this primitive built on a mutex that blocks green
threads appropriately, but that does not exist at this time, so it does not
belong outside of `std::unstable`.
rust.md : update crate attributes.

#[ author = "Jane Doe" ]; raises "warning: unknown crate attribute"
Add /doc/{green,native} to .gitignore
Add /doc/{rustc,syntax} to .gitignore
Rename pkgid variables
Rename PkgId to CrateId
Rename uses of PkgId to CrateId in librustpkg
Update Docs to use crateid
Actually block in a windows cvar

Turns out with an argument of 0 the function always returns immediately!

Closes #11003
rustdoc: only filter lines starting with '# ' from the shown code.

Currently any line starting with `#` is filtered from the output,
including line like `#[deriving]`; this patch makes it so lines are only
filtered when followed by a space similar to the current behaviour of
the tutorial/manual tester.
rustdoc: Unify the handling of the hidden example lines.
auto merge of #11182 : luisbg/rust/crateid, r=cmr

Issue #11048
auto merge of #11185 : huonw/rust/doc-ignore, r=cmr

Currently any line starting with `#` is filtered from the output,
including line like `#[deriving]`; this patch makes it so lines are only
filtered when followed by a space similar to the current behaviour of
the tutorial/manual tester.
auto merge of #11190 : eliovir/rust/patch-3, r=alexcrichton

#[ author = "Jane Doe" ]; raises "warning: unknown crate attribute"
replace `pkgid` by `crate_id`
add `comment`
Implement Ratio:from_float()

The Ratio::from_float() converts a float (f32 and f64) into a
Ratio<BigInt>.

Closes #9838
Add metadata from a tempdir instead of a build dir

Right now if you have concurrent builds of two libraries in the same directory
(such as rustc's bootstrapping process), it's possible that two libraries will
stomp over each others' metadata, producing corrupt rlibs.

By placing the metadata file in a tempdir we're guranteed to not conflict with
ay other builds happening concurrently. Normally this isn't a problem because
output filenames are scoped to the name of the crate, but metadata is special in
that it has the same name across all crates.
auto merge of #11194 : kballard/rust/gitignore-doc-green-native, r=alexcrichton
auto merge of #11199 : alexcrichton/rust/windows-isnt-waiting, r=pcwalton

Turns out with an argument of 0 the function always returns immediately!

Closes #11003