| Age | Commit message (Collapse) | Author | Lines |
|
|
|
Use more specific panic message for &str slicing errors
Separate out of bounds errors from character boundary errors, and print
more details for character boundary errors.
It reports the first error it finds in:
1. begin out of bounds
2. end out of bounds
3. begin <= end violated
3. begin not char boundary
5. end not char boundary.
Example:
&"abcαβγ"[..4]
thread 'str::test_slice_fail_boundary_1' panicked at 'byte index 4 is not
a char boundary; it is inside 'α' (bytes 3..5) of `abcαβγ`'
Fixes #38052
|
|
Span the affected fields instead of reporting the field/variant name.
|
|
Add links to methods on all slice iterator struct docs
In the same style as `std::slice::Iter` to help people find how to create iterators.
r? @steveklabnik
|
|
TrustedLen for Empty and Once.
These implementations were missing, so, I went ahead and added them.
|
|
|
|
|
|
just as ceil(log10(2^64)) == 20
|
|
|
|
Also fix the leb128 tests
|
|
This commit includes manual merge conflict resolution changes from a rebase by @est31.
|
|
Dangling a carrot in front of a donkey.
This commit includes manual merge conflict resolution changes from a rebase by @est31.
|
|
This commit introduces 128-bit integers. Stage 2 builds and produces a working compiler which
understands and supports 128-bit integers throughout.
The general strategy used is to have rustc_i128 module which provides aliases for iu128, equal to
iu64 in stage9 and iu128 later. Since nowhere in rustc we rely on large numbers being supported,
this strategy is good enough to get past the first bootstrap stages to end up with a fully working
128-bit capable compiler.
In order for this strategy to work, number of locations had to be changed to use associated
max_value/min_value instead of MAX/MIN constants as well as the min_value (or was it max_value?)
had to be changed to use xor instead of shift so both 64-bit and 128-bit based consteval works
(former not necessarily producing the right results in stage1).
This commit includes manual merge conflict resolution changes from a rebase by @est31.
|
|
Historically this was done to accommodate bugs in lints, but there hasn't been a
bug in a lint since this feature was added which the warnings affected. Let's
completely purge warnings from all our stages by denying warnings in all stages.
This will also assist in tracking down `stage0` code to be removed whenever
we're updating the bootstrap compiler.
|
|
Fix typo in PartialOrd docs
|
|
Add missing urls for atomic fn docs
r? @frewsxcv
|
|
Add missing urls for atomic_int macros types
r? @frewsxcv
|
|
Add missing urls for AtomicPtr
r? @frewsxcv
|
|
Add missing urls in AtomicBool docs
r? @frewsxcv
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Explain meaning of Result iters and link to factory functions
|
|
r=alexcrichton
Use Borrow for binary_search and contains methods in the standard library
Fixes all standard library methods in #32822 that can be fixed without backwards compatibility issues.
|
|
|
|
Rewrite, improve documentation for `core::hash::BuildHasherDefault`.
Fixes https://github.com/rust-lang/rust/issues/31242.
|
|
|
|
Fixes https://github.com/rust-lang/rust/issues/31242.
|
|
|
|
|
|
|
|
|
|
|
|
Fixes https://github.com/rust-lang/rust/issues/34381.
|
|
|
|
Implement RFC #1725 (read_unaligned, write_unaligned)
cc #37955
r? @alexcrichton
|
|
cc #37955
|
|
Rename 'librustc_unicode' crate to 'libstd_unicode'.
Fixes https://github.com/rust-lang/rust/issues/26554.
|
|
Forward more ExactSizeIterator methods and `is_empty` edits
- Forward ExactSizeIterator methods in more places, like `&mut I` and `Box<I>` iterator impls.
- Improve `VecDeque::is_empty` itself (see commit 4)
- All the collections iterators now have `len` or `is_empty` forwarded if doing so is a benefit. In the remaining cases, they already use a simple size hint (using something like a stored `usize` value), which is sufficient for the default implementation of len and is_empty.
|
|
Remove Self: Sized from Iterator::nth
It is an unnecessary restriction; nth neither needs self to be sized
nor needs to be exempted from the trait object.
It increases the utility of the nth method, because type specific
implementations are available through `&mut I` or through an iterator
trait object.
It is a backwards compatible change due to the special cases of the
`where Self: Sized` bound; it was already optional to include this bound
in `Iterator` implementations.
|
|
|
|
|
|
Add cloned example for Option
r? @frewsxcv
|
|
It is an unnecessary restriction; nth neither needs self to be sized
nor needs to be exempted from the trait object.
It increases the utility of the nth method, because type specific
implementations are available through `&mut I` or through an iterator
trait object.
It is a backwards compatible change due to the special cases of the
`where Self: Sized` bound; it was already optional to include this bound
in `Iterator` implementations.
|
|
Make core::fmt::Void a non-empty type.
Adding back this change that was removed from PR #36449 because it's a fix and because I immediately hit a problem with it again when I started implementing my fix for #12609.
|
|
Now that we've got a beta build, let's use it!
|