diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:13 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:13 +0000 |
commit | 218caa410aa38c29984be31a5229b9fa717560ee (patch) | |
tree | c54bd55eeb6e4c508940a30e94c0032fbd45d677 /src/test/ui/closures/2229_closure_analysis/run_pass/issue-88431.rs | |
parent | Releasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip |
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/closures/2229_closure_analysis/run_pass/issue-88431.rs')
-rw-r--r-- | src/test/ui/closures/2229_closure_analysis/run_pass/issue-88431.rs | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/src/test/ui/closures/2229_closure_analysis/run_pass/issue-88431.rs b/src/test/ui/closures/2229_closure_analysis/run_pass/issue-88431.rs deleted file mode 100644 index 999620530..000000000 --- a/src/test/ui/closures/2229_closure_analysis/run_pass/issue-88431.rs +++ /dev/null @@ -1,59 +0,0 @@ -// edition:2021 -// check-pass - -use std::collections::HashMap; -use std::future::Future; -use std::pin::Pin; - -pub struct GameMode {} - -struct GameStateManager<'a> { - gamestate_stack: Vec<Box<dyn GameState<'a> + 'a>>, -} - -pub trait GameState<'a> {} - -async fn construct_gamestate_replay<'a>( - _gamemode: &GameMode, - _factory: &mut GameStateManager<'a>, -) -> Box<dyn GameState<'a> + 'a> { - unimplemented!() -} - -type FutureGameState<'a, 'b> = Pin<Box<dyn Future<Output = Box<dyn GameState<'a> + 'a>> + 'b>>; - -struct MenuOption<'a> { - command: Box<dyn for<'b> Fn(&'b mut GameStateManager<'a>) -> FutureGameState<'a, 'b> + 'a>, -} - -impl<'a> MenuOption<'a> { - fn new( - _command: impl for<'b> Fn(&'b mut GameStateManager<'a>) -> FutureGameState<'a, 'b> + 'a, - ) -> Self { - unimplemented!() - } -} - -struct MenuState<'a> { - options: Vec<MenuOption<'a>>, -} - -impl<'a> GameState<'a> for MenuState<'a> {} - -pub async fn get_replay_menu<'a>( - gamemodes: &'a HashMap<&str, GameMode>, -) -> Box<dyn GameState<'a> + 'a> { - let recordings: Vec<String> = vec![]; - let _ = recordings - .into_iter() - .map(|entry| { - MenuOption::new(move |f| { - Box::pin(construct_gamestate_replay(&gamemodes[entry.as_str()], f)) - }) - }) - .collect::<Vec<_>>(); - - todo!() -} - -fn main() {} |