It's not clear what this means, because a macro in item position can expand to zero or more items. For now we disallow it, which is technically a
[breaking-change]
but is landing without an RFC. The `pub` keyword previously had no effect, which seems quite unintended.
Fixes#18317.
Fixes#14660.
This PR replaces uses of `os::getenv` with newly introduced `env::var{,_os}`.
Mostly did this as a background activity to procrastinate from procrastinating.
Tests appear to build and run fine. This includes benchmarks from test/bench directory.
Some function signatures have changed, so this is a [breaking-change].
In particular, radixes and numerical values of digits are represented by `u32` now.
Part of #22240
`PathBuf` does implement `Hash`, but `Path` doesn't. This makes it
annoying if you have a `HashMap` with `PathBuf`s as keys, because
it means you have to convert a `Path` into a `PathBuf` and get a
reference to it simply to perform operations on the `HashMap`!
Fixes#22047
`Range<u64>` and `Range<i64>` may be longer than usize::MAX on 32-bit
platforms, and thus they cannot fulfill the protocol for
ExactSizeIterator. We don't want a nonobvious platform dependency in
basic iterator traits, so the trait impl is removed.
The logic of this change assumes that usize is at least 32-bit.
This is technically a breaking change; note that `Range<usize>` and
`Range<isize>` are always ExactSizeIterators.
[breaking-change]
Add `#[rustc_error]` annotation, which causes trans to signal an error
if found on the `main()` function. This lets you write tests that live
in `compile-fail` but are expected to compile successfully. This is
handy when you have many small variations on a theme that you want to
keep together, and you are just testing the type checker, not the
runtime semantics.
r? @pnkfelix
Added all active features to the list in reference.md.
Added a second note about keeping the reference.md list up-to-date to the bottom of the list, since not everyone (including me) reads the big comment at the top of it. :)
Ensured that the feature gate list in reference.md is kept in alphabetical order.
Re-tag `slicing_syntax` as `Accepted`.
Rollup merge (373cbab5b0) of PR #20723
accidentally reverted a portion of commit
8327bcc167 which shifted
`slicing_syntax` from Active to Accepted.
While having a look at the Rust book I found this tiny error. In my opinion this if should be all lowercase, because it follows a colon, but I am no native speaker, so I am probably wrong. Also it is a very tiny change, so feel free to include it in any bigger documentation patch.
Removes the link to the rust-dev mailing list in the bug report submission page and also adds the address of the IRC server (`irc.mozilla.org`). Addresses #22249.
This overhauls the very meager docs that currently exist to clarify
various understandable confusions that I've noticed, e.g. people look in
`std::raw` for the "real" types of slices like `&[T]`, or think that
`Slice<T>` refers to `[T]` (fixes#22214).
This patch takes the liberty of offering some "style" guidance around
`raw::Slice`, since there's more restricted ways to duplicate all
functionality connected to it: `std::slice::from_raw_parts{,_mut}` for
construction and `.as_{,mut_}ptr` & `.len` for deconstruction.
It also deprecates the `std::raw::Closure` type which is now useless for
non-type-erased closures, and replaced by `TraitObject` for `&Fn`, `&mut
FnMut` etc, so I guess it should be called a:
[breaking-change]
This is super black magic internals at the moment, but having it
somewhere semi-public seems good. The current versions weren't being
rendered, and they'll be useful for some people.
Fixes#21281
r? @nikomatsakis @kmcallister