Skip to content
Closed
Changes from 2 commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
ac67072
test: dont optimize to invalid bitcasts
workingjubilee Jun 24, 2024
4061fd9
Reduce merge conflicts from rustfmt's wrapping
kornelski Jun 28, 2024
cc7093f
impl FusedIterator and a size hint for the error sources iter
Sky9x Jun 28, 2024
c9f36f8
Only update `Eq` operands in GVN if you can update both sides
scottmcm Jun 29, 2024
03fce36
Fix x86_64 code being produced for bare-metal LoongArch targets' `com…
xen0n Jun 30, 2024
f694211
Add a GVN test for 127089 that doesn't optimize to a constant
scottmcm Jun 30, 2024
5527944
add `rustc_dump_def_parents` attribute
BoxyUwU Jun 30, 2024
af3d7f8
Update ip_addr.rs
danielhuang Jun 30, 2024
4c919ac
Ensure `out_of_scope_macro_calls` lint is registered
beetrees Jun 30, 2024
a410f4c
Rollup merge of #126923 - workingjubilee:regression-tests-for-simd-in…
matthiaskrgr Jul 1, 2024
90a2326
Rollup merge of #127090 - kornelski:wrap-conflicts, r=fee1-dead
matthiaskrgr Jul 1, 2024
dde0567
Rollup merge of #127091 - Sky9x:fused-error-sources-iter, r=dtolnay
matthiaskrgr Jul 1, 2024
8927a56
Rollup merge of #127105 - scottmcm:issue-127089, r=cjgillot
matthiaskrgr Jul 1, 2024
a423270
Rollup merge of #127150 - xen0n:issue125908, r=Kobzol
matthiaskrgr Jul 1, 2024
82a769b
Rollup merge of #127181 - BoxyUwU:dump_def_parents, r=compiler-errors
matthiaskrgr Jul 1, 2024
5d429f4
Rollup merge of #127182 - danielhuang:patch-4, r=Nilstrieb
matthiaskrgr Jul 1, 2024
fc90d13
Rollup merge of #127191 - beetrees:register-out-of-scope-macro-calls,…
matthiaskrgr Jul 1, 2024
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
11 changes: 11 additions & 0 deletions library/core/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1008,8 +1008,19 @@ impl<'a> Iterator for Source<'a> {
self.current = self.current.and_then(Error::source);
current
}

fn size_hint(&self) -> (usize, Option<usize>) {
if self.current.is_some() {
(1, None)
} else {
(0, Some(0))
}
}
}

#[unstable(feature = "error_iter", issue = "58520")]
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)]
Expand Down