| Age | Commit message (Collapse) | Author | Lines |
|
* count_ones/zeros, trailing_ones/zeros return u32, not usize
* rotate_left/right take u32, not usize
* RADIX, MANTISSA_DIGITS, DIGITS, BITS, BYTES are u32, not usize
Doesn't touch pow because there's another PR for it.
[breaking-change]
|
|
* The lint visitor's visit_ty method did not recurse, and had a
reference to the now closed #10894
* The newly enabled recursion has only affected the `deprectated` lint
which now detects uses of deprecated items in trait impls and
function return types
* Renamed some references to `CowString` and `CowVec` to `Cow<str>` and
`Cow<[T]>`, respectively, which appear outside of the crate which
defines them
* Replaced a few instances of `InvariantType<T>` with
`PhantomData<Cell<T>>`
* Disabled the `deprecated` lint in several places that
reference/implement traits on deprecated items which will get cleaned
up in the future
* Disabled the `exceeding_bitshifts` lint for
compile-fail/huge-array-simple test so it doesn't shadow the expected
error on 32bit systems
* Unfortunately, this means that if a library declares
`#![deny(deprecated)]` and marks anything as deprecated, it will have
to disable the lint for any uses of said item, e.g. any impl the now
deprecated item
For any library that denies deprecated items but has deprecated items
of its own, this is a [breaking-change]
|
|
This changes the type of some public constants/statics in libunicode.
Notably some `&'static &'static [(char, char)]` have changed
to `&'static [(char, char)]`. The regexp crate seems to be the
sole user of these, yet this is technically a [breaking-change]
|
|
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
|
|
Unstable is the conservative choice.
cc #22950.
|
|
`#[derive(Clone)]` unnecessarily requires the element type to also be
`Clone`.
|
|
Part of #22240.
|
|
Fixes issue #22016
|
|
A misplaced uint->u32 instead of usize in fmt::Pointer. Added a basic test.
|
|
These implementations were temporary workaround. Now #22828 has been
fixed, they can be removed.
|
|
* Make num::UpperHex private. I was unable to determine why this struct
is public. The num module itself is not public, and the UpperHex struct
is not referenced anywhere in the core::fmt module. (Only the UpperHex
trait is reference.) num::LowerHex is not public.
* Remove the suffix parameters from the macros that generate integral
display traits.
The code to print the Debug::fmt suffixes was removed when Show was
renamed to Debug. It was an intentional change. From RFC 0565:
* Focus on the *runtime* aspects of a type; repeating information such
as suffixes for integer literals is not generally useful since that
data is readily available from the type definition.
* Because Show was renamed to Debug, rename show! to debug!.
|
|
|
|
|
|
|
|
|
|
These implementations were temporary workaround. Now #22828 has been
fixed, they can be removed.
|
|
Updated the function to allow comparisons between different types since PartialOrd and PartialEq allow this.
|
|
This adds the assume() calls back that got lost when rebasing #21886.
|
|
Signed-off-by: JP-Ellis <coujellis@gmail.com>
|
|
|
|
The branch \"else { continue }\" is the last code inside a loop body,
it is just useless.
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
|
|
Changes .or() so that it can return a Result with a different E type
than the one it is called on.
Essentially:
fn or(self, res: Result<T, E>) -> Result<T, E>
becomes
fn or<F>(self, res: Result<T, F>) -> Result<T, F>
This brings `or` in line with the existing `and` & `or_else`
This is a
[breaking-change]
Due to some code needing additional type annotations.
|
|
Change MarkerTrait to be invariant. This is a (small) loss of expressiveness, but is necessary for now to work around #22806. Fixes #22655.
r? @pnkfelix
|
|
Keeps the method consistent with `Iterator::any`.
Closes #22617
[breaking-change]
|
|
Ensure we do not zero when \"moving\" types that are Copy.
Uses more precise `type_needs_drop` for deciding about emitting cleanup code. Added notes about the weaknesses regarding `ty::type_contents` here.
Fix #22536
|
|
We were recording stability attributes applied to fields in the
compiler, and even annotating it in the libs, but the compiler didn't
actually do the checks to give errors/warnings in user crates.
Details in the commit messages.
|
|
r? @alexcrichton
cc @nikomatsakis @pnkfelix
|
|
|
|
|
|
|
|
|
|
The branch "else { continue }" is the last code inside a loop body,
it is just useless.
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
|
|
In the process, also replaces a raw mutable pointers with Unique to
spell out the ownership semantics.
cc #22709
|
|
Changes .or() so that it can return a Result with a different E type
than the one it is called on.
Essentially:
fn or(self, res: Result<T, E>) -> Result<T, E>
becomes
fn or<F>(self, res: Result<T, F>) -> Result<T, F>
This brings `or` in line with the existing `and` and `or_else` member
types.
This is a
[breaking-change]
Due to some code needing additional type annotations.
|
|
but is necessary for now to work around #22806. Fixes #22655.
|
|
Keeps the method consistent with `Iterator::any`.
Closes #22617
[breaking-change]
|
|
Specifically, the following actions were takend:
* The `copy_memory` and `copy_nonoverlapping_memory` functions
to drop the `_memory` suffix (as it's implied by the functionality). Both
functions are now marked as `#[stable]`.
* The `set_memory` function was renamed to `write_bytes` and is now stable.
* The `zero_memory` function is now deprecated in favor of `write_bytes`
directly.
* The `Unique` pointer type is now behind its own feature gate called `unique`
to facilitate future stabilization.
[breaking-change]
|
|
r? @steveklabnik
|
|
Specifically, the following actions were taken:
* The `copy_memory` and `copy_nonoverlapping_memory` functions
to drop the `_memory` suffix (as it's implied by the functionality). Both
functions are now marked as `#[stable]`.
* The `set_memory` function was renamed to `write_bytes` and is now stable.
* The `zero_memory` function is now deprecated in favor of `write_bytes`
directly.
* The `Unique` pointer type is now behind its own feature gate called `unique`
to facilitate future stabilization.
* All type parameters now are `T: ?Sized` wherever possible and new clauses were
added to the `offset` functions to require that the type is sized.
[breaking-change]
|
|
Makes Rust less amusing by fixing [#22745](https://github.com/rust-lang/rust/issues/22745)
|
|
|
|
|
|
This is a breaking change if missing docs are forbidden in any module or crate.
I had to add documentation to undocumented associated types in libstd and libcore, please let me know if the documentation is inadequate anywhere!
Fixes #20648
|
|
fmt and hash are pretty straightforward I think. sync is a bit more complex. I thought one or two of the `isize`s ought to be `i32`s, but that would require a bunch of casting (the root cause being the lack of atomics other than isize/usize).
r? @alexcrichton
|
|
Toss the tomatoes!
r? @aturon
Fixes #22478. The underlying bug(?) behind that issue still exists though and there’s another issue that reports it.
|
|
|
|
This is one more step towards completing #13231
This series of commits add support for default trait implementations. The changes in this PR don't break existing code and they are expected to preserve the existing behavior in the compiler as far as built-in bounds checks go.
The PR adds negative implementations of `Send`/`Sync` for some types and it removes the special cases for `Send`/`Sync` during the trait obligations checks. That is, it now fully relies on the traits check rather than lang items.
Once this patch lands and a new snapshot is created, it'll be possible to add default impls for `Send` and `Sync` and remove entirely the use of `BuiltinBound::{BoundSend,BoundSync}` for positive implementations as well.
This PR also removes the restriction on negative implementations. That is, it is now possible to add negative implementations for traits other than `Send`/`Sync`
|
|
|
|
|
|
|