diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:18:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:18:58 +0000 |
commit | a4b7ed7a42c716ab9f05e351f003d589124fd55d (patch) | |
tree | b620cd3f223850b28716e474e80c58059dca5dd4 /tests/ui/inference/auxiliary | |
parent | Adding upstream version 1.67.1+dfsg1. (diff) | |
download | rustc-a4b7ed7a42c716ab9f05e351f003d589124fd55d.tar.xz rustc-a4b7ed7a42c716ab9f05e351f003d589124fd55d.zip |
Adding upstream version 1.68.2+dfsg1.upstream/1.68.2+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/inference/auxiliary')
-rw-r--r-- | tests/ui/inference/auxiliary/inference_unstable_iterator.rs | 35 | ||||
-rw-r--r-- | tests/ui/inference/auxiliary/inference_unstable_itertools.rs | 25 |
2 files changed, 60 insertions, 0 deletions
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; +} |