summaryrefslogtreecommitdiffstats
path: root/src/test/ui/function-pointer/issue-102289.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:18:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:18:58 +0000
commita4b7ed7a42c716ab9f05e351f003d589124fd55d (patch)
treeb620cd3f223850b28716e474e80c58059dca5dd4 /src/test/ui/function-pointer/issue-102289.rs
parentAdding upstream version 1.67.1+dfsg1. (diff)
downloadrustc-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 'src/test/ui/function-pointer/issue-102289.rs')
-rw-r--r--src/test/ui/function-pointer/issue-102289.rs54
1 files changed, 0 insertions, 54 deletions
diff --git a/src/test/ui/function-pointer/issue-102289.rs b/src/test/ui/function-pointer/issue-102289.rs
deleted file mode 100644
index de394ca9a..000000000
--- a/src/test/ui/function-pointer/issue-102289.rs
+++ /dev/null
@@ -1,54 +0,0 @@
-// check-pass
-
-pub(crate) trait Parser: Sized {
- type Output;
- fn parse(&mut self, _input: &str) -> Result<(), ()> {
- loop {}
- }
- fn map<F, B>(self, _f: F) -> Map<Self, F>
- where
- F: FnMut(Self::Output) -> B,
- {
- todo!()
- }
-}
-
-pub(crate) struct Chainl1<P, Op>(P, Op);
-impl<P, Op> Parser for Chainl1<P, Op>
-where
- P: Parser,
- Op: Parser,
- Op::Output: FnOnce(P::Output, P::Output) -> P::Output,
-{
- type Output = P::Output;
-}
-pub(crate) fn chainl1<P, Op>(_parser: P, _op: Op) -> Chainl1<P, Op>
-where
- P: Parser,
- Op: Parser,
- Op::Output: FnOnce(P::Output, P::Output) -> P::Output,
-{
- loop {}
-}
-
-pub(crate) struct Map<P, F>(P, F);
-impl<A, B, P, F> Parser for Map<P, F>
-where
- P: Parser<Output = A>,
- F: FnMut(A) -> B,
-{
- type Output = B;
-}
-
-impl Parser for u32 {
- type Output = ();
-}
-
-pub fn chainl1_error_consume() {
- fn first<T, U>(t: T, _: U) -> T {
- t
- }
- let _ = chainl1(1, 1.map(|_| first)).parse("");
-}
-
-fn main() {}