From a4b7ed7a42c716ab9f05e351f003d589124fd55d Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:18:58 +0200 Subject: Adding upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- .../auxiliary/inference_unstable_iterator.rs | 35 ++++++++++++++++++++++ .../auxiliary/inference_unstable_itertools.rs | 25 ++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 tests/ui/inference/auxiliary/inference_unstable_iterator.rs create mode 100644 tests/ui/inference/auxiliary/inference_unstable_itertools.rs (limited to 'tests/ui/inference/auxiliary') diff --git a/tests/ui/inference/auxiliary/inference_unstable_iterator.rs b/tests/ui/inference/auxiliary/inference_unstable_iterator.rs new file mode 100644 index 000000000..04bc0b1a8 --- /dev/null +++ b/tests/ui/inference/auxiliary/inference_unstable_iterator.rs @@ -0,0 +1,35 @@ +#![feature(staged_api)] +#![feature(arbitrary_self_types)] + +#![stable(feature = "ipu_iterator", since = "1.0.0")] + +#[stable(feature = "ipu_iterator", since = "1.0.0")] +pub trait IpuIterator { + #[unstable(feature = "ipu_flatten", issue = "99999")] + fn ipu_flatten(&self) -> u32 { + 0 + } + + #[unstable(feature = "ipu_flatten", issue = "99999")] + fn ipu_by_value_vs_by_ref(self) -> u32 where Self: Sized { + 0 + } + + #[unstable(feature = "ipu_flatten", issue = "99999")] + fn ipu_by_ref_vs_by_ref_mut(&self) -> u32 { + 0 + } + + #[unstable(feature = "ipu_flatten", issue = "99999")] + fn ipu_by_mut_ptr_vs_by_const_ptr(self: *mut Self) -> u32 { + 0 + } + + #[unstable(feature = "assoc_const_ipu_iter", issue = "99999")] + const C: i32; +} + +#[stable(feature = "ipu_iterator", since = "1.0.0")] +impl IpuIterator for char { + const C: i32 = 42; +} diff --git a/tests/ui/inference/auxiliary/inference_unstable_itertools.rs b/tests/ui/inference/auxiliary/inference_unstable_itertools.rs new file mode 100644 index 000000000..fa1efbcfe --- /dev/null +++ b/tests/ui/inference/auxiliary/inference_unstable_itertools.rs @@ -0,0 +1,25 @@ +#![feature(arbitrary_self_types)] + +pub trait IpuItertools { + fn ipu_flatten(&self) -> u32 { + 1 + } + + fn ipu_by_value_vs_by_ref(&self) -> u32 { + 1 + } + + fn ipu_by_ref_vs_by_ref_mut(&mut self) -> u32 { + 1 + } + + fn ipu_by_mut_ptr_vs_by_const_ptr(self: *const Self) -> u32 { + 1 + } + + const C: i32; +} + +impl IpuItertools for char { + const C: i32 = 1; +} -- cgit v1.2.3