Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
02dac5c
add test suggest-clone-in-macro-issue-139253.rs
xizheyin Jun 17, 2025
fd9c1b9
Find correct span when suggesting using clone
xizheyin Jun 17, 2025
b315e9a
clippy fix: rely on autoderef
hkBst Jul 4, 2025
54cc45d
tests: Don't check for self-printed output in std-backtrace.rs test
Enselic Jul 3, 2025
d77c387
Fixes for Arm64EC
dpaoliello Jul 13, 2025
05154af
docs: update documentation of core::mem::copy to include const on the…
SunkenPotato Jul 15, 2025
1d0eddb
tests: debuginfo: Work around or disable broken tests on powerpc
Gelbpunkt Jul 18, 2025
690ae52
Tweak borrowck label pointing at `!Copy` value moved into closure
estebank Jul 20, 2025
5082e6a
Generalize logic pointing at binding moved into closure
estebank Jul 20, 2025
8df93e6
Tweak spans when encountering multiline initializer in move error
estebank Jul 20, 2025
dafc9f9
Reduce comment verbosity
estebank Jul 21, 2025
e1b6cfe
Rephrase comment to include some tracking issues
Gelbpunkt Jul 21, 2025
a9fd8d0
bootstrap: Move musl-root fallback out of sanity check
Gelbpunkt Jul 22, 2025
ed11a39
Don't special-case llvm.* as nounwind
purplesyringa Jul 15, 2025
01fdafc
Hint that choose_pivot returns index in bounds
kornelski Jul 22, 2025
93d2003
Update `dlmalloc` dependency of libstd
alexcrichton Jul 23, 2025
6237e73
Point at the type that doesn't impl `Clone` in more cases beyond clos…
estebank Jul 21, 2025
a93a9aa
Don't emit two `assume`s in transmutes when one is a subset of the other
scottmcm Jul 20, 2025
e7441fb
Clippy fixup
Gelbpunkt Jul 23, 2025
ab6fd22
remove deprecated Error::description in impls
hkBst Jul 23, 2025
e44a738
Remove dead code and extend test coverage and diagnostics around it
oli-obk Jul 24, 2025
642deb3
remove movability from `RigidTy::Coroutine` and `AggregateKind::Corou…
makai410 Jul 24, 2025
9ffa775
resolve: Remove `Scope::CrateRoot`
petrochenkov Jul 22, 2025
f73d14c
Rollup merge of #142569 - xizheyin:139253, r=davidtwco
fmease Jul 24, 2025
0c1542f
Rollup merge of #143401 - Enselic:no-stack-backtrace-print-in-display…
fmease Jul 24, 2025
c646816
Rollup merge of #143424 - hkBst:auto-deref, r=jhpratt
fmease Jul 24, 2025
4ab3568
Rollup merge of #143970 - SunkenPotato:update_mem_copy_docs, r=scottmcm
fmease Jul 24, 2025
ba7acc9
Rollup merge of #143979 - dpaoliello:arm64ectest, r=petrochenkov
fmease Jul 24, 2025
9e56c5c
Rollup merge of #144160 - Gelbpunkt:debuginfo-tests-ppc, r=oli-obk
fmease Jul 24, 2025
3740d0a
Rollup merge of #144200 - estebank:dont-point-at-closure, r=lcnr
fmease Jul 24, 2025
f6720ad
Rollup merge of #144209 - scottmcm:assume_less, r=lcnr,dianqk
fmease Jul 24, 2025
cd06424
Rollup merge of #144225 - purplesyringa:unwinding-intrinsics, r=nikic
fmease Jul 24, 2025
b4a684b
Rollup merge of #144314 - kornelski:pivot-safely, r=jhpratt
fmease Jul 24, 2025
de3ac17
Rollup merge of #144316 - Gelbpunkt:musl-libdir-bootstrap, r=Kobzol
fmease Jul 24, 2025
d22ae67
Rollup merge of #144364 - alexcrichton:update-dlmalloc, r=Mark-Simula…
fmease Jul 24, 2025
0d4b813
Rollup merge of #144368 - petrochenkov:rmrootscope, r=b-naber
fmease Jul 24, 2025
7cb9726
Rollup merge of #144373 - hkBst:remove-deprecated-1, r=jhpratt
fmease Jul 24, 2025
fd39bdd
Rollup merge of #144390 - oli-obk:arbitrary-enum-discrs, r=SparrowLii
fmease Jul 24, 2025
f68aaab
Rollup merge of #144392 - makai410:rm-mov, r=scottmcm
fmease Jul 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 3 additions & 12 deletions compiler/rustc_thread_pool/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -787,18 +787,7 @@ impl ThreadPoolBuildError {
}
}

const GLOBAL_POOL_ALREADY_INITIALIZED: &str =
"The global thread pool has already been initialized.";

impl Error for ThreadPoolBuildError {
#[allow(deprecated)]
fn description(&self) -> &str {
match self.kind {
ErrorKind::GlobalPoolAlreadyInitialized => GLOBAL_POOL_ALREADY_INITIALIZED,
ErrorKind::IOError(ref e) => e.description(),
}
}

fn source(&self) -> Option<&(dyn Error + 'static)> {
match &self.kind {
ErrorKind::GlobalPoolAlreadyInitialized => None,
Expand All @@ -810,7 +799,9 @@ impl Error for ThreadPoolBuildError {
impl fmt::Display for ThreadPoolBuildError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match &self.kind {
ErrorKind::GlobalPoolAlreadyInitialized => GLOBAL_POOL_ALREADY_INITIALIZED.fmt(f),
ErrorKind::GlobalPoolAlreadyInitialized => {
"The global thread pool has already been initialized.".fmt(f)
}
ErrorKind::IOError(e) => e.fmt(f),
}
}
Expand Down
5 changes: 0 additions & 5 deletions library/alloc/src/boxed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2114,11 +2114,6 @@ impl<F: ?Sized + Future + Unpin, A: Allocator> Future for Box<F, A> {

#[stable(feature = "box_error", since = "1.8.0")]
impl<E: Error> Error for Box<E> {
#[allow(deprecated, deprecated_in_future)]
fn description(&self) -> &str {
Error::description(&**self)
}

#[allow(deprecated)]
fn cause(&self) -> Option<&dyn Error> {
Error::cause(&**self)
Expand Down
7 changes: 1 addition & 6 deletions library/alloc/src/boxed/convert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -608,12 +608,7 @@ impl<'a> From<String> for Box<dyn Error + Send + Sync + 'a> {
fn from(err: String) -> Box<dyn Error + Send + Sync + 'a> {
struct StringError(String);

impl Error for StringError {
#[allow(deprecated)]
fn description(&self) -> &str {
&self.0
}
}
impl Error for StringError {}

impl fmt::Display for StringError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Expand Down
4 changes: 0 additions & 4 deletions library/alloc/src/collections/btree/map/entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,6 @@ impl<'a, K: Debug + Ord, V: Debug, A: Allocator + Clone> fmt::Display
impl<'a, K: core::fmt::Debug + Ord, V: core::fmt::Debug> core::error::Error
for crate::collections::btree_map::OccupiedError<'a, K, V>
{
#[allow(deprecated)]
fn description(&self) -> &str {
"key already exists"
}
}

impl<'a, K: Ord, V, A: Allocator + Clone> Entry<'a, K, V, A> {
Expand Down
21 changes: 2 additions & 19 deletions library/alloc/src/ffi/c_str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1061,17 +1061,10 @@ impl IntoStringError {
}
}

impl IntoStringError {
fn description(&self) -> &str {
"C string contained non-utf8 bytes"
}
}

#[stable(feature = "cstring_into", since = "1.7.0")]
impl fmt::Display for IntoStringError {
#[allow(deprecated, deprecated_in_future)]
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
self.description().fmt(f)
"C string contained non-utf8 bytes".fmt(f)
}
}

Expand Down Expand Up @@ -1291,23 +1284,13 @@ impl PartialEq<CString> for Cow<'_, CStr> {
}

#[stable(feature = "rust1", since = "1.0.0")]
impl core::error::Error for NulError {
#[allow(deprecated)]
fn description(&self) -> &str {
"nul byte found in data"
}
}
impl core::error::Error for NulError {}

#[stable(feature = "cstring_from_vec_with_nul", since = "1.58.0")]
impl core::error::Error for FromVecWithNulError {}

#[stable(feature = "cstring_into", since = "1.7.0")]
impl core::error::Error for IntoStringError {
#[allow(deprecated)]
fn description(&self) -> &str {
"C string contained non-utf8 bytes"
}

fn source(&self) -> Option<&(dyn core::error::Error + 'static)> {
Some(&self.error)
}
Expand Down
14 changes: 2 additions & 12 deletions library/alloc/src/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2285,20 +2285,10 @@ impl fmt::Display for FromUtf16Error {
}

#[stable(feature = "rust1", since = "1.0.0")]
impl Error for FromUtf8Error {
#[allow(deprecated)]
fn description(&self) -> &str {
"invalid utf-8"
}
}
impl Error for FromUtf8Error {}

#[stable(feature = "rust1", since = "1.0.0")]
impl Error for FromUtf16Error {
#[allow(deprecated)]
fn description(&self) -> &str {
"invalid utf-16"
}
}
impl Error for FromUtf16Error {}

#[cfg(not(no_global_oom_handling))]
#[stable(feature = "rust1", since = "1.0.0")]
Expand Down
5 changes: 0 additions & 5 deletions library/alloc/src/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4100,11 +4100,6 @@ impl<T: ?Sized, A: Allocator> Drop for UniqueArcUninit<T, A> {

#[stable(feature = "arc_error", since = "1.52.0")]
impl<T: core::error::Error + ?Sized> core::error::Error for Arc<T> {
#[allow(deprecated, deprecated_in_future)]
fn description(&self) -> &str {
core::error::Error::description(&**self)
}

#[allow(deprecated)]
fn cause(&self) -> Option<&dyn core::error::Error> {
core::error::Error::cause(&**self)
Expand Down
10 changes: 2 additions & 8 deletions library/core/src/array/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,18 +184,12 @@ pub struct TryFromSliceError(());
impl fmt::Display for TryFromSliceError {
#[inline]
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
#[allow(deprecated)]
self.description().fmt(f)
"could not convert slice to array".fmt(f)
}
}

#[stable(feature = "try_from", since = "1.34.0")]
impl Error for TryFromSliceError {
#[allow(deprecated)]
fn description(&self) -> &str {
"could not convert slice to array"
}
}
impl Error for TryFromSliceError {}

#[stable(feature = "try_from_slice_error", since = "1.36.0")]
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
Expand Down
17 changes: 6 additions & 11 deletions library/core/src/char/convert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,21 +193,16 @@ enum CharErrorKind {
}

#[stable(feature = "char_from_str", since = "1.20.0")]
impl Error for ParseCharError {
#[allow(deprecated)]
fn description(&self) -> &str {
match self.kind {
CharErrorKind::EmptyString => "cannot parse char from empty string",
CharErrorKind::TooManyChars => "too many characters in string",
}
}
}
impl Error for ParseCharError {}

#[stable(feature = "char_from_str", since = "1.20.0")]
impl fmt::Display for ParseCharError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
#[allow(deprecated)]
self.description().fmt(f)
match self.kind {
CharErrorKind::EmptyString => "cannot parse char from empty string",
CharErrorKind::TooManyChars => "too many characters in string",
}
.fmt(f)
}
}

Expand Down
7 changes: 1 addition & 6 deletions library/core/src/char/decode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,4 @@ impl fmt::Display for DecodeUtf16Error {
}

#[stable(feature = "decode_utf16", since = "1.9.0")]
impl Error for DecodeUtf16Error {
#[allow(deprecated)]
fn description(&self) -> &str {
"unpaired surrogate found"
}
}
impl Error for DecodeUtf16Error {}
6 changes: 1 addition & 5 deletions library/core/src/convert/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -958,11 +958,7 @@ impl fmt::Display for Infallible {
}

#[stable(feature = "str_parse_error2", since = "1.8.0")]
impl Error for Infallible {
fn description(&self) -> &str {
match *self {}
}
}
impl Error for Infallible {}

#[stable(feature = "convert_infallible", since = "1.34.0")]
#[rustc_const_unstable(feature = "const_cmp", issue = "143800")]
Expand Down
33 changes: 4 additions & 29 deletions library/core/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1042,11 +1042,6 @@ impl<'a> crate::iter::FusedIterator for Source<'a> {}

#[stable(feature = "error_by_ref", since = "1.51.0")]
impl<'a, T: Error + ?Sized> Error for &'a T {
#[allow(deprecated, deprecated_in_future)]
fn description(&self) -> &str {
Error::description(&**self)
}

#[allow(deprecated)]
fn cause(&self) -> Option<&dyn Error> {
Error::cause(&**self)
Expand All @@ -1062,36 +1057,16 @@ impl<'a, T: Error + ?Sized> Error for &'a T {
}

#[stable(feature = "fmt_error", since = "1.11.0")]
impl Error for crate::fmt::Error {
#[allow(deprecated)]
fn description(&self) -> &str {
"an error occurred when formatting an argument"
}
}
impl Error for crate::fmt::Error {}

#[stable(feature = "try_borrow", since = "1.13.0")]
impl Error for crate::cell::BorrowError {
#[allow(deprecated)]
fn description(&self) -> &str {
"already mutably borrowed"
}
}
impl Error for crate::cell::BorrowError {}

#[stable(feature = "try_borrow", since = "1.13.0")]
impl Error for crate::cell::BorrowMutError {
#[allow(deprecated)]
fn description(&self) -> &str {
"already borrowed"
}
}
impl Error for crate::cell::BorrowMutError {}

#[stable(feature = "try_from", since = "1.34.0")]
impl Error for crate::char::CharTryFromError {
#[allow(deprecated)]
fn description(&self) -> &str {
"converted integer out of range for `char`"
}
}
impl Error for crate::char::CharTryFromError {}

#[stable(feature = "duration_checked_float", since = "1.66.0")]
impl Error for crate::time::TryFromFloatSecsError {}
Expand Down
15 changes: 5 additions & 10 deletions library/core/src/net/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -497,16 +497,7 @@ pub struct AddrParseError(AddrKind);

#[stable(feature = "addr_parse_error_error", since = "1.4.0")]
impl fmt::Display for AddrParseError {
#[allow(deprecated, deprecated_in_future)]
fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
fmt.write_str(self.description())
}
}

#[stable(feature = "addr_parse_error_error", since = "1.4.0")]
impl Error for AddrParseError {
#[allow(deprecated)]
fn description(&self) -> &str {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self.0 {
AddrKind::Ip => "invalid IP address syntax",
AddrKind::Ipv4 => "invalid IPv4 address syntax",
Expand All @@ -515,5 +506,9 @@ impl Error for AddrParseError {
AddrKind::SocketV4 => "invalid IPv4 socket address syntax",
AddrKind::SocketV6 => "invalid IPv6 socket address syntax",
}
.fmt(f)
}
}

#[stable(feature = "addr_parse_error_error", since = "1.4.0")]
impl Error for AddrParseError {}
17 changes: 6 additions & 11 deletions library/core/src/num/dec2flt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,21 +217,16 @@ enum FloatErrorKind {
}

#[stable(feature = "rust1", since = "1.0.0")]
impl Error for ParseFloatError {
#[allow(deprecated)]
fn description(&self) -> &str {
match self.kind {
FloatErrorKind::Empty => "cannot parse float from empty string",
FloatErrorKind::Invalid => "invalid float literal",
}
}
}
impl Error for ParseFloatError {}

#[stable(feature = "rust1", since = "1.0.0")]
impl fmt::Display for ParseFloatError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
#[allow(deprecated)]
self.description().fmt(f)
match self.kind {
FloatErrorKind::Empty => "cannot parse float from empty string",
FloatErrorKind::Invalid => "invalid float literal",
}
.fmt(f)
}
}

Expand Down
25 changes: 7 additions & 18 deletions library/core/src/num/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,13 @@ pub struct TryFromIntError(pub(crate) ());

#[stable(feature = "try_from", since = "1.34.0")]
impl fmt::Display for TryFromIntError {
fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
#[allow(deprecated)]
self.description().fmt(fmt)
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
"out of range integral type conversion attempted".fmt(f)
}
}

#[stable(feature = "try_from", since = "1.34.0")]
impl Error for TryFromIntError {
#[allow(deprecated)]
fn description(&self) -> &str {
"out of range integral type conversion attempted"
}
}
impl Error for TryFromIntError {}

#[stable(feature = "try_from", since = "1.34.0")]
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
Expand Down Expand Up @@ -128,21 +122,16 @@ impl ParseIntError {
#[stable(feature = "rust1", since = "1.0.0")]
impl fmt::Display for ParseIntError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
#[allow(deprecated)]
self.description().fmt(f)
}
}

#[stable(feature = "rust1", since = "1.0.0")]
impl Error for ParseIntError {
#[allow(deprecated)]
fn description(&self) -> &str {
match self.kind {
IntErrorKind::Empty => "cannot parse integer from empty string",
IntErrorKind::InvalidDigit => "invalid digit found in string",
IntErrorKind::PosOverflow => "number too large to fit in target type",
IntErrorKind::NegOverflow => "number too small to fit in target type",
IntErrorKind::Zero => "number would be zero for non-zero type",
}
.fmt(f)
}
}

#[stable(feature = "rust1", since = "1.0.0")]
impl Error for ParseIntError {}
Loading