From cf2dff2b1e3fa55fa5415d524200070d0d7aacfe Mon Sep 17 00:00:00 2001 From: Albert Larsan <74931857+albertlarsan68@users.noreply.github.com> Date: Thu, 5 Jan 2023 09:13:28 +0100 Subject: Move /src/test to /tests --- src/test/ui/function-pointer/issue-102289.rs | 54 ---------------------------- 1 file changed, 54 deletions(-) delete mode 100644 src/test/ui/function-pointer/issue-102289.rs (limited to 'src/test/ui/function-pointer/issue-102289.rs') 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 de394ca9ad6..00000000000 --- 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(self, _f: F) -> Map - where - F: FnMut(Self::Output) -> B, - { - todo!() - } -} - -pub(crate) struct Chainl1(P, Op); -impl Parser for Chainl1 -where - P: Parser, - Op: Parser, - Op::Output: FnOnce(P::Output, P::Output) -> P::Output, -{ - type Output = P::Output; -} -pub(crate) fn chainl1(_parser: P, _op: Op) -> Chainl1 -where - P: Parser, - Op: Parser, - Op::Output: FnOnce(P::Output, P::Output) -> P::Output, -{ - loop {} -} - -pub(crate) struct Map(P, F); -impl Parser for Map -where - P: Parser, - F: FnMut(A) -> B, -{ - type Output = B; -} - -impl Parser for u32 { - type Output = (); -} - -pub fn chainl1_error_consume() { - fn first(t: T, _: U) -> T { - t - } - let _ = chainl1(1, 1.map(|_| first)).parse(""); -} - -fn main() {} -- cgit 1.4.1-3-g733a5