diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:11:28 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:11:28 +0000 |
commit | 94a0819fe3a0d679c3042a77bfe6a2afc505daea (patch) | |
tree | 2b827afe6a05f3538db3f7803a88c4587fe85648 /compiler/rustc_index/src | |
parent | Adding upstream version 1.64.0+dfsg1. (diff) | |
download | rustc-94a0819fe3a0d679c3042a77bfe6a2afc505daea.tar.xz rustc-94a0819fe3a0d679c3042a77bfe6a2afc505daea.zip |
Adding upstream version 1.66.0+dfsg1.upstream/1.66.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'compiler/rustc_index/src')
-rw-r--r-- | compiler/rustc_index/src/lib.rs | 4 | ||||
-rw-r--r-- | compiler/rustc_index/src/vec.rs | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/compiler/rustc_index/src/lib.rs b/compiler/rustc_index/src/lib.rs index 33c3c536f..23a4c1f06 100644 --- a/compiler/rustc_index/src/lib.rs +++ b/compiler/rustc_index/src/lib.rs @@ -1,7 +1,7 @@ +#![deny(rustc::untranslatable_diagnostic)] +#![deny(rustc::diagnostic_outside_of_impl)] #![feature(allow_internal_unstable)] -#![feature(bench_black_box)] #![feature(extend_one)] -#![feature(let_else)] #![feature(min_specialization)] #![feature(new_uninit)] #![feature(step_trait)] diff --git a/compiler/rustc_index/src/vec.rs b/compiler/rustc_index/src/vec.rs index 30ff36421..4172ce3bb 100644 --- a/compiler/rustc_index/src/vec.rs +++ b/compiler/rustc_index/src/vec.rs @@ -172,7 +172,9 @@ impl<I: Idx, T> IndexVec<I, T> { } #[inline] - pub fn indices(&self) -> impl DoubleEndedIterator<Item = I> + ExactSizeIterator + 'static { + pub fn indices( + &self, + ) -> impl DoubleEndedIterator<Item = I> + ExactSizeIterator + Clone + 'static { (0..self.len()).map(|n| I::new(n)) } |