Short-cut `T: Sized` trait selection for ADTs
Basically avoids all nested obligations when checking whether an ADT is sized - this speeds up typeck by ~15%
The refactoring fixed#32963, but I also want to make `Copy` not object-safe (will commit that soon).
Fixes#33201
r? @nikomatsakis
rand: don't block before random pool is initialized
If we attempt a read with getrandom() on Linux the syscall can block
before the random pool is initialized unless the GRND_NONBLOCK flag is
passed. This flag causes getrandom() to instead return EAGAIN while the
pool is uninitialized. To avoid downstream users of crate or std
functionality that have no ability to avoid this blocking behavior this
change causes Rust to read bytes from /dev/urandom while getrandom()
would block and once getrandom() is available to use that. Fixes#32953.
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
Panic on overflow in `Duration::new` constructor
Panicking on overflow is also done for `+`, and it replaces the
currently incorrect overflow behavior of wrapping around, which does not
make sense for `Duration`s.
Since these impls can be scattered around quite a bit, it is nice
to be able to jump to the location where individual methods and
trait impls are defined.
Fixes: #30416
Distribute both rust-lldb and rust-gdb everywhere
Both debuggers are viable in some capacity on all tier-1 platforms,
and people often ask for rust-lldb on Linux or rust-gdb on OS X.
r? @michaelwoerister
I'm still testing locally, but this *looks* like the right thing to change.
Add `as_mut` methods to the `std::cell` structs
This is safe since the borrow checking ensures that we have the only
mutable reference to the struct, thus we can safely borrow its interior.
This is safe since the borrow checker ensures that we have the only
mutable reference to the struct, thus we can safely borrow its interior.
Tracking issue is #33444.
The definition of this value recently changed slightly. It no
longer corresponds directly to the target triple.
Also shuffled things around to make the order of cfg descriptions more
logical and added text related them to the target triple.
cc #33403
We will no longer use `ccache` in the makefiles for our local dependencies like
miniz, but they're so small anyway it doesn't really matter.
Closes#33285
Add more aliases for Unicode confusable chars
Building upon #29837, this PR:
* added aliases for space characters,
* distinguished square brackets from parens, and
* added common CJK punctuation characters as aliases.
This will especially help CJK users who may have forgotten to switch off IME when coding.
If the `-f` option isn't given, GNU tar will use environment variable
`TAPE` first, and next use the compiled-in default, which isn't
necessary `stdout` (it is the tape device `/dev/rst0` under OpenBSD for
example).
Broke up long lines in E0506
Trimmed E0506 comment to be under max line width
Added function example to E0506
Changed example of erroneous code wording on E0506
mk: Pass CFLAGS for target, not host
This changes the CFLAGS and related variables passed to compiletest to be passed
for the target, not the host, so we can correctly test 32-bit cross compiles on
64-bit host machines.
Hopefuly fixes#33379
Right now they're `gnueabihf` and `gnueabi`, but when adding new platforms like
musl on ARM it's unfortunate to have to test for all three (`musl`, `musleabi`,
and `musleabihf`). This PR switches everything currently to `gnu`, and the new
musl targets can also use `musl` when they land.
Closes#33244
Clients can now use the rustdoc syntax highlighter to classify tokens, then use that info to put together there own HTML (or whatever), rather than just having static HTML output.
This commit expands the bootstrap build system's `README.md` as well as ensuring
that all API documentation is present and up-to-date. Additionally a new
`config.toml.example` file is checked in with commented out versions of all
possible configuration values.
This changes the CFLAGS and related variables passed to compiletest to be passed
for the target, not the host, so we can correctly test 32-bit cross compiles on
64-bit host machines.
Hopefuly fixes#33379