TEST SUCCEED (WITH MIRI)

Changed files
+161 -19
futures-combinators
futures-compat
src
+108
futures-combinators/.DS_Store
··· 1 + :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::........:---=+--::::+-..:.:-::::--=---------=-=---------==++-==:::-====-:-++**++*=+:=****==--=+-*-+*+=-+#*:-=-==:-------::::::--------------------:::::::::::::::-::--------------- 2 + ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::....:=-=+---::--:::-::.::.:.--::---:-----=-=----:-----::-:-:::-=--+-=+==:--+----=**++**:=*+*++:=**---*+=:==+=--:::::::::::::------------::::::::::::::::::::::::::::::::::------ 3 + :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::....:----==---:--:::::::-:-::::.:::--==-:::---:=:-----=====+--::----:==++*+***:=-*+=***=-:*=+-==-+==:-===-:-+---:::::::::::::::----------:::::::::::::::::::::::::::::::::::::::: 4 + :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::--:::::::::::::::::::::::::::::::::::::::::.::--=-=-=---:-:----:::::::::-:..:::::::--:-----=-::-::-::::---::::-=-==:-:::-=--+**=*:::+:=:++-=-=:+-==---=--=::::::::::::::::-------:::::::::::::::::::::::::::::::::::::::::: 5 + ::::::::::::::::::::::::::::::-----------::::::::::::::::::::::::::::::::::::::::-----:::::::::::::::::::::::::::::::::::::::::---:--:-=--:--:::::..::--::--::::::::-------::::-=-:-::::-::::::--:::-=-++-=*=++*+#====*---+=----=-==:-=-----:::::::::::::::----::::::::::::::::::::::::::::::::::::::::::::: 6 + -:::::::::::::::::::::::::::-------------::::::::::::::::::::::::::::::::::-:------------:::::::::::::::::::::::::::::::::::::-::-----::--:-:::-::-:.::::.:.:---:--::-::-::::::---=-:-:::::-::-:-:::-:=++====--=*--=-:===-=-----:-=-:--::-=-::::::::::::::::-:-::::::::::::::::::::::::::::::::::::::::::::: 7 + -::::::::::::::::::::::::::----====-------:::::::::::::::::::::::::::::::::::------------::::::::::::::::::::::::::::::::::::--------:::::::--::::-::::::---:::--------:::::::::--::::-=-:::::----==-==+=----===+--::=*-=-=-::-+:-==--::--=-:::::::::::::::----::::::::::::::::::::::::::::::::::::::::::::: 8 + -:::::::::::::::::::::::-----==+++===------:::::::::--------:-:::::::::::::::---------------::::::::::::::::::::::::::::::::-:---:-:-::-:--::--:-::--:::.:--:--::------:-:-------==--=--=:====+===-=--==-:=-:=+=--:=:==-=:--:-=+-==---:::::::::::::::::::::::-:::::::::::::::::::::::::::::::::::::::::::::: 9 + -::::::::::::::::::::--------=++*+===-----:::::::::-----------:::::::::::::::-----------------:--:---:---:::::::::::::::::::---:---------=----::::::-::---+===-:--:--=-:===-====--=====-=======--:::--:----=---*:==+-=:-=:=::=---=--::-::::--::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 10 + ::::::::::::::::-::::::::---=++**++==----::::::::::-----------::::::::::::::::-------------------------------:---::::::::::-=----------=-==--::::::-======---:=--=-=-==+=====-==---==+=-----=---::----=---:=---*-=--==::::----:-:-:-.:-::::-:::::::::::::::--:--:::::::::::::::::::::::::::::::::::::::::::: 11 + ::::::::::::::---::::::::---=++**++=---::::::::::::::------::::::::::::::::::::::------------------------------------:-::::-==-====-====-==--====-=-===-==-=+=-=---====-=---------=---------:------=-=--=--====++:==--::::::-=:-:--:::-::::::::::::::::::::------::::::::::::::::::::::::::::::::::::::::::: 12 + :::::::::::::----:::::::::--=++*++=---::::::::::::::::::::::::::::::::::::::::::::------------------------------------------===---=======-==--=============--=========----=-----------------:--:----====+-=-=+=--+-+::-:::----:----::--:--:::::::::::::::::--------::::::::::::::::::::::::::::::::::::::::: 13 + :::::::::::::----:::::::::--==+++==--:::::.....::::::::::::::::::::::::::::::::::::::::::::-::::::::::::::::-:-::-:------:-====-----:-------=---==-====-=-=--=---=--------------------:-------------=-===---=+=*-==+:--:=::-=:-:--:::=:---:::::::::::::::::--------::-:::::::::::::::::::::::::::::::::::::: 14 + :::::::::::::----::::::::---==+++=---:::::......::::::::::::::::......:::::::::::::::::::::::::::::::::::::::::::::::::::--===--::---::-----------------=---:-:------------------------:::---:-:------=+-===+-===-==:-:-:::-::::--:-::--::::-::::::::::::::------------::::::::::::::::::::::::::::::::::::: 15 + :::::::::::::----::::::::---==+++=--:::::........::::::::::::::.......::::::::::::::::::::::::::::::::::::::::::::::::::--===------:---::::::-::::::---------::------:--------::::::::------:-----------=-========-:-:::--:--:-----:::-:-::-:::--::::::::::-----------------------------:::::::::::::::::::: 16 + :::::::::::::::::::::::::---=+++==--:::::.........:::::::::::.........:::::::::::::::::::::::::::::::::::::::::::::-:-----===----:::-------------:--:------:::::::--:::----------:-::::::=--::-:-----===---==-----:-:-:----:-::--:=:::-:-:-::::---::::::::::------------------------------:--:-:-::----::-:- 17 + ::::::::::::::::::::::::::--=+++==--:::::.............:..:............::::::::::::::::::::::::::::::::::::::::::::----:---==---:---------=--:.--:-----------------::::::::::-:---------:::::----::---==---======-=---=--:--:-:--::--:::-:-::::::--::::::::::------------------------------------------:----- 18 + :::::::::::::::::::::::::---=+++==--:::::.............................:::::::::::::::::::::::::::::::::::::::::-----------==----=-=--::::-:-:--:------:-:-------:::-:::::--------:::::----::.::-----:------==-=---===:::::---::-::--=:-::--::::::::::::::::::----------------------------------------------- 19 + :::::::::::::::::::::::::---=+++=---::::...............................::::::::::::::::::::::::::::::::::::::-------------==----:::::---:-----------------------:---------------------::::-----:::--------=---:-=--==-:--:=----=:---=::::-::::::::::::::::::-----------------------------:-----::----------- 20 + ::::::::::::::::::::::::::--=+++=--:::::..............................::::::::::::::::::::::::::::::::::::---------------===--:-:-::::::::::::-:-:----------==-----::::-:::-:------=-----:::.:-:--::---====--=---=---=:-=:---=:-:--=--:::-:::::::::::::::::------------------------------------------------- 21 + :::::::::::::::::::::::::---=+++=--:::::..............................::::::::::::::::::::::::::::::::::::---------------===---=----------:-:::-::---:::::-:::::::::::-::---:----::::::::-------:::-:---====-:--:-:=-:=--:-=-==---==-::-::::::::::::::::::-------------------------------------------------- 22 + :::::::::::::--::::::::::---=+++=--:::::...............................:::::::::::::::::::::::::::::::::-----------------=+=--::::::.::.::::=--------------::---------:--------------::--::...-------------=+==-=-:---=--:-=:-===-==--:--:::::::::::::::::-------------------------------------------------- 23 + :::::::::::::--:::::::::::--=++==--:::::................................:::::::::::::::::::::::::::::::------------------++=-:---:::::.::::::::::------------------:::-::--==-----==--------::::::--------===--=---:--=--:-==-+==-+=-:-=----:::::::::::::::------------------------------------------------- 24 + ::::::::::::::::::::::::::--=++==--:::::................................:::::::::::::::::::::::::::::--------------------=+=---:::-::..:::::.:::::::::::-:::-::::::::::::::::::::--:::.::-::-----::::----====-=--=-------:-=:=++==+=---------::::::::::::::------------------------------------------------- 25 + ::::::::::::::::::::::::::--=++==--:::::................................::::::::.::::::::::::::::::-----------------------=---::-:::--:-::::-:::::::::::::::-:::::::::::::::---------::-:::..::------------======-=-----==--+-*+=++--==--=-=-::::::::::::::------------------------------------------------- 26 + :::::::::::::::::::::::::--==++=---:::::...............................::::..:::::::::::.::::::::::-------------------------:----------------:::-::::::::-:-:--:::::::.::::::-------:::::-----::::--------===++++=+====-==--=-+=*++-=-==+=+=-::::::::::::::------------------------------------------------- 27 + :::::::::::::::::::::::::--==++=---:::::..............................:::::.::::::::::::::::::.::::::::--::::::---------:---==-==-----==-=-----------:-:--------:-:-:-::--------::::::::::.:-=---:::-----====+++++==++--=---====***+=-=+++=+=-:::::::::::::------------------------------------------------- 28 + :::::::::::::::::::::::::--==+==---:::::............................:::----=--::::::::::::---:::::::::---:::::::::::::::::-==+=+===+==========---------:------------:--:--------------==----::-------------==-=+*+++*===-===-==++++*=+++++=+=::::::::::::::------------------------------------------------- 29 + :::::::::::::::::::::::::--=+++=---:::::...........................:::----=+----:::::::::::=---::::::::------::::--=====-===+++********+++===========-------=----=-=--=-=================+---:::------------===-=+++++-*====+=+**#*+++#++*+=-::::::::::::::------------------------------------------------- 30 + ::::::::::::---::::::::::--=+++=---:::::..........................::---====*====-:::::::::::-=--:-::::------==--=+++++++##===+*+****#***+++++=+========================+=+++++++++++=++====+=---:-----------=====++++*+=*=++*+=*##***#***+=--:::::::::::::-------------------------------------------------- 31 + :::::::::::-----::::::::---=++==--::::::........................::----=====**++==--::::::::---=+--:::-:---=-=*++++******%#=++++*************+++++++++++==+=+===++===++=+++**+***+++++==++=====-----:------=---====++++*%##=*#*+**#####+=----==---::::::::::------------------------------------------------- 32 + :::::::::::-----:::::::::--=++==--::::::.......................::-:::----=++##*++=-:::---:-----#=--::--=+==-=*****######=--+***********************+++++++++++++++++++++++++++++++++=========--==----------=--=====##*#%##%#%%%#*++======-=======-:::::::::--------------:---------------------------------- 33 + :::::::::::----:::::::::--==++==--:::::::.................::::::::::::::=+++*##*+=+==---------=%*==-:-----===+@@@@@@@@@%%%%@%@%%%#%%%%%%#************+++*****+**++*+++++++*++++++++++=+===+===+=+==--------====*+**####%%%####**+==-=====++*****+=-::::::::---------------:--------------------------------- 34 + :::::::::::----:::::::::---=++==--::::::..............::::::::::::::::---*#########+=------=-==%@*==-:-----=++@@@@@@#**=::-=*##**+**%%%@@%%%%*#####********#*****+**+****+++***%%%%#**+++++=++=+++=-=-==--+#+#%%%###%%%*#*+*#*++=====+*+++++*****=-::::::::-------------:----------------------------------- 35 + ::::::::::::--::::::::::--=====---::::::.........:::::::::-:-:::---------+%%%%%%%%%+=----======#@@*==---:--===%@@@@##**##::=+**###+##%#*##**#@%@%@%%#**+++++++*#%%%@@%%@@@@@@@%##+===+#%%##*+++=+====++*#%%%%####%#***++=++***+=====***+====++**++--::::::---------------:---------------------------------- 36 + ::::::::::::--::::::::::--==++=---::::::.....::::::-----=----==-----:::--=#%%%%%%%@@===--=++=++%%@@*++=====+==##%@@*#**##-:=***#+**#%@@%##***###%@@@@%#-*#@@@@@********#############*===+*%@@@@%@%@*###%%%%%%##*++++++==--+*++====-=+========+**++=-:::::::-------------:----------------------------------- 37 + ::::::::::::--::::::::::--==+==---::::::...::--:---==++=++==+#===---:::::-+#####%%%%=+---==-=+*#%@%%%#***********%@%##*#*::=****==*#####*#*+**####@%@@@@@@@@@*************######@=#**=====+*+*@@@@@%#%%%%*#+++++===-+=+=:-=*+=======-==-----=+***+=-::::::-------------------------------------------------- 38 + :::::::::::---::::::::::--==+==---::::::..::------=--*#******#++==---:::---######%%%*==--==-==+#%%%%########++***#****-::::=*#+=++=--##%#*++**####@@%**#**@@%%******++=+%**#**###%#**====++==++@@@@%%%++++=++==----=-===--=++======++=-------=*++==-:::::----------------:---------------------------------- 39 + ::::::::::-----:::::::::--==+==--:::::::.:--::::-======*%%####*+==---::::--=######%%%+=+===-==+#%%%##**##**++**#=:=:=::::::=*#=+**+++++***++++++**@@**#*+**@@#++***+=++=++*****#####+++=--=====%%%#+++++===----------======++-=====*##+=====-=++===::::::--------------------------------------------------- 40 + :::::::::------:::::::::--==+==---::::::.----===--=++++++*#%%%%++===---::---##########*++=-===+%%###*#**++++***::::===::::-=*#***++*+******+*++++*#*+*----=+*++++*+++++++*****+=-=--=++++======%%#=======-------------==-==+-=====***#*++===--++=--:::::-----------------:---------------------------------- 41 + :::::::::------:::::::::--==+==--::::::..--=-::--*++++*****###%#+=-====----==######%%%%%****++*%###***++==+**:::::::=-::::-=+****++********++++++*+*+--:----=++=-+=++****++=+++=++=+=++++======-======---------------====+==-----=******+++=--+=--::::::---------------------------------------------------- 42 + :::::::::------:::::::::--==+==--::::::..---==------=%#########%%*==+++======##%%%%%%%%%%%%#######***+++++**::::::::::+-=-==*****+***+***********+*+-:::::--==+===--==++++==========-==========-====---:::-----------=-=-=------:-+******++=--+=--::::::---------------------:------------------------------ 43 + :::::::::------:::::::::--=++=---::::::..---===-------=+*%@%%%%%%++*++++++++*%%%%%%%###%#%**######*++==+*+*::::::::::::::=+++++-****++********++*+*-::::::---=+*=:------======-------====-========-----:---:----------=====--==---++++****+=-=+--::::::----------------------------------------------------- 44 + ::::::::::-----:::::::::--=++=---::::::.:--------------=++*#%%%%#*+******+++####%%%%%%%%%#+++**##**+====+*+::::::::::::::::+**+===-=-=-::....+:+=+=:::::::-:--++.+=:-------=++===------=======-=----:::::-------------=====-====--+++****+==-==-:::::::----------------------------------------------------- 45 + ::::::::::-----::::::::---=++=---:::::::------=---==---=+***###%#***+******%%%@@@%#*****#*++=+*#**+====++=:::::::::::::::::=****++++++++*+**++==++-::.::::::--==+=:.:-==--::--==--::...:---.===--:::--:--------------===----=+====+++***++=-==--:::::::----------------------------------------------------- 46 + :::::::::::----::::::::--==+==---:::::::-:-------===--==+**######*+**+**+**%%%%%%%%###**++++=++**+====++*::::::::::::::::::-**#+=----=========-==--::::-:---=-==+====----..:-=-==-----===-=----::::-----------------====---======+++++======+=-::::::::----------------------------------------------------- 47 + ::::::::::::---:::::::---==+==---::::::----:--==-::--==++#####%%%%*****++*#%%%%#%#####%*++======++====++-:::::::::::::::::::****++===--------====--::::--:-----=========---==----=========-------------------------=====---===-=++=-::--=++=--::::::::------------------------------------------------------ 48 + ::::::::::-----:::::::--==+++=---:::::------:-:::---==++*#########***+++++%%##%##***++#*++==--===+====++::::::::::::::::::::=*****++*++++++++++=---::-:::--------==========----==========------------------------=-===-=-=====-====-::-===---:-:::::::-------------------:---------------------------------- 49 + :::::::::-------::::::--==+++=---:::::--------------==++++************=++%###%#***++++*+===+--========+::::::::::::::::::::::*********+++***+++----::-:--:--:-----==+========-:::-====-----=--------=----=-----=-===-=----====----------------:::-::::------------------------------------------------------ 50 + :::::::::-------:::::---==++==---::::-------==--------======+*+*+**##**#%####*++++==-=#*===+===========::::::::::::::::::::::-*****+++++++===++----::::----------=+++==-========--:------------==-=---=---==---======-----==++======---::--------::::------------------------:------------------------------ 51 + :::::::::--------:::----==++==---::::--------==---============++++**#***++*#*+==+++===++=-=-+=========-:::::::::::::::::::::::+**+++++=+====++=-----:------------==++++==--=-==----------------=--===--===-=--===----==---===========----------------------------------------------------------------------- 52 + :::::::::------:::::----=++++=---:::----=-------=====-===========++*+**==++*+===++===---=---=++=======::::::::::::::::::::::::-***+++++===+++-----::-----==------=--=+*++===-=-----=------------=======-=======-----=----===--======------------------------------------------------------------------------ 53 + :::::::::-------:::::---=++++=---:::-----=-=-=-======================*=--=+*+==++=-----=-==-=-=======+:::::::::::::::::::::::::+***++++++++++-----::-:--:------------=**+++===-------==--=--==================-----------===-----=======-----------:-------------------------------------------------------- 54 + ::::::::::--------::----=+++==---:::=--=--==========================+=----==----------===-=-=====+=+++:::::::::::::::::::::::::-***+++++++**=--------::::-::--------==**+=+++===------===-=============---=--=-=---------+==-----=====---------------------------------------------------------------------- 55 + ::::::::::--------:-----=+++==---:::==========+=====================#------=---------========++=+++++:::::::::::::::::::::::::::***++++++***+---==-----------========+#*===++++===-------======-=======-====------------=*++=======------------------------=------------------------------------------------ 56 + ::::::::::-:--:---------=+++==---:::===-==+--================+=====+=-----==--------========+=+++++*::::::::::::::::::::::::::::=***+++*****+================+++++***#*++====+*+==-=----=====-=-===--===-==-------------===-----------=--------------------===---------------------------------------------- 57 + :::::::::---::::::::::---====----:::=====--=======================+#------==-----======-====++++**+:::::::::::::::::::::::::::::-**++++**#*+++=++++++++++++*####*#*++++++=====+*++=====-=====-====-=-==-----------------===----------==-------------------===----------------------------------------------- 58 + :::::::::--::::::::::::----=----::::==============================++----=-==----==========++++++*:::::::::::::::::::::::-:::::::-******##*+++++**********#####***+=+++++=====+=+*++=========-=-========-=------=--------===---------==-------------------======--------------------------------------------- 59 + ::::::::---::::::::::::---------::::====+++++=================--=+#=-----====--======++===+++++-::::::::::::::::::::::------:::::********++++++++*##########***++=++++=++======++**++========--====-===-------==-------===-----------=-------------------======--------------------------------------------- 60 + :::::::-----::::::::::::------:::::-=+++++++++++=++=========---==**=-----==========+++++++++++-::::::::::::::::::::::::::::::::::++*****+++**+*+++*#########**+***+=+++=++*==-===++*++=====-===-=--=-=-----------------===-----------=-------------------=====---------------------------------------------- 61 + :::::::----::::::::::::::----:::::--===-=-=-=+++++======+===--==+*==-----=======+=+++=++++++++:::::::::::::::::::::::::::::::::::=**+**#+*********+*##***###***++*+*+++++++======+=+#+++===---=--==-==-------=--------===-------------------------------=======--------------------------------------------- 62 + :::::::----:::::::::::::::::::::::-=======-=====================*+--=-=-=====++++++++++++++++::::::::::::::::::::::::::::::::::::-*********##****+*******#*#****+*++++++++++=+==+=+++#++====-----=-----------------=--====+=---------=-------------------====----------------------------------------------- 63 + ::::::-----::-:::::::::::::::::::---============================++--===-===+++++++++++++*++*::::::::::::::::::::::::::::::::::::::********###%%###**************+=+++++++++++++++====**+=====--=====-----------==-=-==---=#*+-------==------------------======---------------------------------------------- 64 + ::::::----------::::::::::::::::---===+=====+++=================++=========++++++**++++****:::::::::::::::::::::::::::::::::::::::+**++***##%#***##%%%%########*********+*++++++*+++==*==-==-====--=------============---+###+--------------------------====------------------------------------------------ 65 + --:-:---------------=##%%%###=----===++++++++++++++++++==+++===+*+=======+++++*+*+*******+:-::::::::::::::::::::::::::::::::::::::-*+**+*#%%#++*++++=++**#%#####**#*######%%#**+*++===+==========-==-----=============--=*###*-:-*+=-------------------------------:::::::::::::::::-::--------------------- 66 + ------------------*##%#%@%#@------===+++****+*++++++++++++++++++*+=++++++++++***********--------------::-:-::::::-:-:-------:::::::+****###++++++++++++++*++++================+%**++=++=-===========-==-========++=====-=*%##*-:-*@%#*+---------------------------:::::::::::::::::::::::::::::::::-::------ 67 + -----------------*%#%%@@@%#+-------=+++++++********+++++++++++++*++++++++*************+---------------------------------------:::::-*#####*+++++++=+++++*+*****+=======+=========***+=+=---=============-===+++++=====-==#%%#=::-+#@@%%#+=-----------------------:::::::::::::::::::::::::::::::::::::::::-: 68 + ---------------*%%#%%@%@%%##=------==++*****+++******+++++++++++*+++*+++***********#*-----------------------------------------------=####+**+**+++++++++++++*++++++==========-=-===**+=====================++++=+=======+#%%+-::-=*@@@@@%#+----------------------:::::::::::::::::::::::::::::::::::::::::-: 69 + -------===---###%%%%#%@@%@%%#==--======++++**++++++++++++++++**++++++********######=----------------------------=-======+++++*******#####*+++++*****++++++++*+++++++==============++==++========+=+=======+*+========-=-=%%=:::---+%@@@@@%#=--------------------:::::::::::::::::::::::::::::::::::::::::::: 70 + ------====-*%#%#%%@%%%@@@%%@%%#=====+====+++++++++++++++++++++*+++*********######--=----------------------------===++*##%@@@@@@@@@@@@@***++=++++++++++++++++++++++++++====+======+=++++++++++++++++=====+**+=============#+::::=--+#@@@@@%%*-------------------::::::::::::::::::::::::::::::::::::::::::::: 71 + -------==#%%%##%#@%%#%@@@%%%@@@%%===++++++++==++++++++++++++++++++++++***#*####------------------------------==++*#%@@@@@@@@@@@@@@@@@@@#++++++++++===+====+++*+*++++=+=++=+++++======++*******++=======**+++====+=======+=::::----+#%@@%%%%#=------------------::::::::::::::::::::::::::::::::::::::::::::: 72 + -------=%#%%%#%@%%@#@@@@@%%@@%@@@%%+=++++++++++++===++++++++++++*********###=------------------------------=+*#%@@@@@@@@@@@@@@@@@@@@@@@@#+++++========+=======-=+=++====++=+========++***++++=========*++================::::=-::=*#%%%%%%%%+-------------------::::::::::::::::::::::::::::::::::::::::::-- 73 + ------+%%%%%#%%%%%%%%@@@@@%@@@%%%@@%%+++++++++++++++++++++++****+*******##--------------------------------=*%@@@@@@@@@@@@@@@@@@@@@@@@@@@@%*+++++===+==+===-===--=====--===--===------===============+++++=============++-:::-=---=*#%%%%%%%%+--------------------------------------------------------------- 74 + ----=%#%%#@##%#%##%@%%@@@@@@@@@@@@%%@%%%++++++++**++++++++++************---------------------------------+*%%@@@@@@@@@@@@@@@@@@@@@@@@@@@@%#**++++++======-==----==-=========-==================++++++==++============+=::-------+**#%%%%%%%%*=-------------------------------------------------------------- 75 + ---#%%@%@%%#%%%#%%@@@@@@@@@@@@@@@@@%@%@@%%*+++++*********+**+**+******=---------------------------------+#%%%%%#%%%@@@@@@@@@@@@@%@@@@@@@%*+=**++++++========--==-===============++=+=+++++++++****+====++++========++=::::-+---=**#%%%##%%%%#+--------=----------------------------------------------------- 76 + --%%#%@%#%###%%%%@@@@@@@@@@@@%@@@@@%@@@@@@@@%***+++******+****+******:::-------------------------------+#%%%%%%%#%%#%%%%%%%%%%%%%%%@@@##*+=--***++**+++++=======================++**********#***++====++++==========----:-=---=++#%%%#%%%%%%%#=---=========------------------------------------------------- 77 + -%%%#%@%%%#%#%#@@@@%%%%@@@@@@@@@@@@@@@@@@@@@@@%%#***+++*+++++******=:::------------------=========---=+#%%@%%%%%%%%%%%#%%%%%%%%%%%@@%#*++=----+#*********+*++=======++++++=+++++++***#*#*******++++=====++========--:::-==---=*+*#%##%%%%%%%%%*=============------------------------------------------------ 78 + %%%%%@%%%%%#%@@#%@%@@%@%@@@@@%@@@@@@@@@@@@@@@@@@@%%*****+*++******::---------==++++*+++***************#@@@@%%%%%%%%%%%%%##%%%%%%%%@@#*++=-----=####*#*********+++++++***+*+++*+**************+++++++++==========-=+-::-===-:-+**#%#%%%%%%%%@@@#+=============----------------------------------------------- 79 + %%%%%@%%%%##%%%%%%%%%%%%%%@@@@@@@@@@@@@@@@@@@@@@@@@@@%#*********+:-------===+**######%###############%%@@@@%%%%%%%%%%#%%%%%%%%%%%%@%*+==------+##++#####**#*****************#**************+*++++++++++=======-:------=----=+++#%%%%%%%%%%%@%%%#=============----------------------------------------------- 80 + %@%%@%%%%%%%%%%#@%%#@@%%%%%%%@@%@%@@@@@@@@@@@@@@@@@@@@@@%@%###@@%----==+***#########################%%%@%%%%%%%%%%%%###%%%%%%%%%%%%#*===------=#%*++**######################*****************++++++++=++===++=-=-::-=+----=+++#%%%%%%%%%%%%%%@%#*+==============-------------------------------------------- 81 + @%%%@@#@%%%#%%%%@%%@%%%%%%@@%%%%@%%@@%@@@@@@@@@@@@@@@@@@@@@@%%%#=-=++*#############################%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*+=---=---+#%#+++**###############**#********+***********++++++++++==+=-::==-:--===--===*#%%%%%%%%%%%%%%%%%####*+==========--------------------------------------------- 82 + %%%@@@@%%%%%@@@@@@%@%%@@%@%@@%@%%%@@@@@@@@@@@@@@@@@@@@@@@@@@@@%==+*##%%%######%##%%%#%#%#########%%%%%%###%%%%%%%%%%%#%%#%%%%%%%%%%%*=---===-=*#%%*+++**###################*******************+++++++++*+-::-=--=-==--==+==+*%%%%%%%%%%%%%%%%###%###*+========---------------------------------------------- 83 + %@%@%%%%%@%%@@@%@@@@%%@%@%%%@%%%%%%%%@@@@@@@@@@@@@@@@@@@@@@@@@@#*##%%%%%%#####%%%%%%%%##%#######%%%%##%%%%#%%%##%%%%%###%#%%%%%%%@%%+--:-===--+*#@#*+++*####################******+********++++++++++**-:--+=::--+=----++==*%%%%%%%%%%%%###%#%#%%%%%##*+++====---------------------------------------------- 84 + @@%%%%@%%%%%%@@@@@@@@@@@%@@@@@@@@%@%%%#%%@@@@@@@@@@@@@@@@@@@@@@%###%%%#####%%%%%%%%%####%#%####%%%###%%%%%%%%%%%%%########%%%%%%%%%%*=--====--+*#%%#*++**#############**#####***+++++++=+=+==++++++**=:::-==----====-==--+*#%%%%%%%%%%###%%#%%%#%%%%%%%####*++==-------------------------------------------- 85 + @%@%%%%%%%#%%@@@@@@@@%@@@@@@@@%%%@@@%%%%%%@%%@@@@@@@@@@@@@@@@%@%####%##%#%%%%%%%%%%%%%#####%##%%%%%#%%%%%%%%%%%%%#########%%%%%%%%%#+-:--=====+**%%#*++***########*#*#******##**++===========+++++*+=--:-=-:-=-=---=+=--=+#%%%%%%%%%####%%%%%%%#%%%%%%%%#######*+=------------------------------------------ 86 + %@@@@%@%%@%%#@%@@@@@@@%@@@@%%@@@@@@%@@%%%@@@%@%%%@@@@@@@@@%%@@%####%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#%%%%%%%%%%%%%%%#####%#%%%%%%%%%%%#+---=====-==+#@%#**+****###****#***********+++=========+++++*=-:::-+=:-:--+=---++====+%%%%%%%%###%%#%%%%%%%%%%%%%%%%%%%##%%%##*+=--------------------------------------- 87 + @%@%#%%%%%%@%@@@%@@@@@@@@@@@%@@@@@@@@@@@%@@%@@@%@%@@@@@@%%@%%%%######%%%%%%%%%%%%%%%%%%%%%%%%%#######%%%%%%%%%%%%%%#####%%%%%%@@%%%#+===+===--=-=*%@%#*******###********++++++*++++======+++****-::::-=---::-=-===+--=++*##%%%%###%%%%#%##%#%#%%#%%%%%%%%%%%%%%%#####**+==---------------------------------- 88 + %%@@@@%%%%%@%@@@%%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%@@@@@@@@@%%#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%##%######%%%%%%%%%#%%#%%%#%%%%@@@@@%@#*===+==---+==*#%%#********##********++*++++*++++++++******-:---:==:::-===---++---==###%#%####%%#%%#%%#%%#%#%%##%%%%%%%%%%%%###############*+=--------------------------- 89 + %@@%%%@%%@#@@%@@@%@@@@@@@@@@@@%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#%#%#%#%######%%####%%%%%%%%@%%%%%%%%*+++=-==++*+=+*%@%**##****#*********+++++++*++++++******+:::::-+=::::-++---=+==-=++*#%%#%%%%%#%%%%%%%#%%%%#%%%#%%%%%%%%%%%%%%%%%%%%##%%%%%%#*+=------------------------- 90 + %@@@%@@%@@%@@%@@@@%@@@@@@%@@@@@@@@@@@@@@@@@@@@@@@%@@@@@@@@@@%%%%%%%%%%%%%%%%%%%%%%@%%%%%%%%%%%%%%%%%####%%####%#%%%%%%%%%%%%%%%%%%@%%*+=+*#%@@@@%*+#@%#**##*************+++++++++++++******=--.::-=----:-=--====-=+++==*##%%%%%%%%%%##%%%%%%#%%%%@%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%###*+=---------------------- 91 + %@@%#@%%@@%@@@@@@@@%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%%%%%%%%%%%%%%%%%%%%%%%@%@%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#%%%%%%%%%%%@%%%%%%#+=+#%@@@@@%%%*+#@%#####*####*************+++*****##+=::-----=:::--+=----*=--=+*++*%%%%%%%%%%%%%%#%%%%#%%%+#@%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%##%%#*+==------------------ 92 + @@@@%@%@@%%@%@%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%%%%%%%%%%%%%%%%%%%%%%%%%@@@@%%%%%%%%%@%@@%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#**%@@@@@@@%%*+*-=#%####***#####**********####**##+=-:::::-+=:::::=+=---+=+==*+=*#%%%%%%%%#%#%%%%%%%%%%##%@@%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%####**+=--------------- 93 + @@@%%@%%%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%%%%%%%%%%%%%%%%%%%%%%%%%@@@@@%%%%##%%@@@@%@%%%%%@%%@@%@@%%%%%%%%%%#%%%@@@@@@@@%%%#%@%#*====+#%##******##########*#######*==+=--:::--:---:-=-:-==+--=+*==*#%%%%%%#%%%%%%%%#%%#%##@@%%%%%%%%@%%@%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#####*+==----------- 94 + @@%%%@@%#@@%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%%%%%%%%%%%%%%%%@%%%%%%%%%%@@@@@%%%*+++#%%%%%@@@@@@@@@%@@@%@@%%%%%%%%%%%@@@@@%%%########*++=*++#%#*+*****############****-+**#**+=-=-:::::=+--:-++---+****%%%%@%%%%%%%%%#%%%%#%@@%%%@%%@%%%%@@@%@%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#######*++=------- 95 + @@%%%@%%@@@@@@@@@%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%%%%%%%%%%%%%%@@%@%%%%%%%%%%@@@@@@@@%%%*===+*%%@@@@%@@@@@@@%%%%%%%%%%%%@@@%%%@@%######**##*++##+=###*+*****###########*+=-=+#*##*####*+--:-=----====-+++#%##%%%%%%%%%#%%%%%#%@@@%%%%%@%@%@@%%%%@%@%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#%%#%######*+=--:: 96 + %@@@@@@@%@@%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%@%%%%%%%%%%%%%@@@%%%%%%%%%%%%%@@@@@@@@%@@@@@%#++++*#%%@@@%@@@@@%%%#%%%%%@@%%%%%%%%#+=+++####*#%##***###**++**#**######+:-*#**++*#%#****#%%%#*-:-==---=*+*##%%%%%%%%%%%%%%%%@@@@@%%%@@%@%@%%@@@@@@@%@%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%######*=- 97 + %@@%%@@@%@@%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%%%%%%%%%@@@@@@@%%%%%%%%%@%@@@@@@@@@@@@@@@@@@%*+++*##%%%@@%%%%%%%%@@%%%%%%%%%%%%*+==+*########*++####*+******##*+-=*+***++***##***#%%%%#%%%+*+---+*###%%%%%%%%%##%%%@@@%%%%%%%%@%%%@@%@@@%@@%%%%@%@%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#%%%%####* 98 + @@%@%@@%%@@@%%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%%@@@%%%%%%%%%@@@@@%%%%@%%%%%@%@%@@@@@@@@%@%@@@@@@@@@@@@%*++**%%%%%@@%@%%%%%%%%%%%%%%%#*==+*******##**+##******+***+-+*=+**#*++++++*###**##%%%%%%%%*=++*#%%%%%%%%###%@@@@@%@%@@@@%@@%@@@@@@%%@@%@@@@@@%%@%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%## 99 + @@@@@@@@@@@@@%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%@@@@@@@%%@@@%%%%%%%%%@@@@@@@%%%%%%%%@%%%%@@@@@@@@%%@@@@@@@@@@@@@@@@@@%#+===*#%%%%%%%%%%%%%%%%%%%#++**+******##*#%#****++*+++*+++*==++**=+*####*###%%##%%###%@###%%%%%##%@@@@@@@%@@@%@@%@@%@@@@@%@@@@@%@@%@@%@%%%@@@%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%# 100 + %@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%%@@@@@%%%%%%%%@@@@@@@@@%%%%%%@@@@@@@@@@@@@%%%@@@@@@@@@@@@@@@@@@@@@@@@%####%%%%%%%%%%%%%%%@%******##**##*#*##++*++**==--+*-==++###*++**####%#%######%%%%%%#%%%@@@@@@@@@@@@@@@@@@@@@@@@@%@%%%%@%@@%@@@@%@%@%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 101 + @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%%@%@@@@@@%%%@%@@@@@@@@%%%%%@@@@%%@%%@@@@@@@%%%%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%%%%%%%%%%%%%%*==+*#########****+****==+*=++=+**+**+++**#%##**##%%%%%%##%@@@@%%%@@@@@@@@@@@@%@@@@@@@%@@%@@@@@%@@@@@%@%%@%%%@%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 102 + @@@@@@@@@@@@@@@@@@@@@@@@@@@@@%@@@%@@@@%@@@@@@@@@%%%%%@@@@@@%%%%%%@@@@@@@@%%%%%%%@@@%%%%@%@@@@@%@%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%%%%%%%%%%#+==***+***++*##+++*****+=====+---=+*=+*%%#*+++*%%%#*%@@@@@%%%@@@@@@@@@@@@@@@@@@@@@@@@@@@%@@@@@%%%%@@@@@%%%%%%%%%%%%%%@%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 103 + @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%@@@@@@@@@@@@%%%%%%%@@@@@@%@%%%%@@@@@@@@%@%%%@@@@@@%%%%@@@@@@@%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%%%%%%%%*++*++++*++++*##*+**==++====*+==+###%%%%***#%##%@@@@@@%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%@@@%@@@@@@%%%@%@@%@%%%%@%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 104 + @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%@@@@@@@@@@%@@@%@%%%%@@@@@@%%@@@@@@@@@@%%@@@@@@@@@%%@%%%@@@@@@%%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%%%%%+-=+***##***######*=-++----===+*%%%###**##%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%@@@%@@@%%%%%%%%%@%@@%@@%%@%%%%%@%%%%%@%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 105 + @@%%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%@@@@@@@@@@%@%@%@%@@@@%@%@@@@@@%@@%@@%%%%@@@@@@@@@@@@@@@%%%%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%%%%%+=====++++++*+**##-::=:--=**##%##%%**#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%@@@@@%@@%%%%@@%@%%%@%@@%%@%%@%@@@%@%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 106 + @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%@@@@%@@%@@@@@@@@@@@@%@@@@@@@@@@@@@@%@@@%@@@%@%%%@@@@@@@@@@@@%%%%%%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%*%%#+===++====++=+*#=--+-=+*%########%@@@%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%@%@%@%@@@@%%%%%%%@@%%@%%@@@@@%@@@@%%@@%@%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 107 + @@@@%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%@@@@@@@@@@@@@@@@@@@%@@@%@@@@@@@@@@@@@%%%%%@@%%%@@@@@@@@@@@@@@@@%%%%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%@@*#%+---=+==-=+===+--+***#%#######%@@@%%%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%%@@%%@%%%@%@@@%@%%%%%%%%%%@@%%@@%@@%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 108 + @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%@@@@@@@@@@%@@@@@@@@@@@@@@@@@@@@@@@@@@%%@@@@@%%%%%%@@@@@@@@@@@@%%%%%@@@@@@@@@@@@@@@@@@@%@@@@@@@@@@@@@@@@@%%@###=::-=++++**=---==**###***##%@@%%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%@@%%@%%@@%%@%%%%%%%@%%@@@@@%%@%@@%%@%%%@%@%%@%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+4 -4
futures-combinators/src/join.rs
··· 74 74 // this is safe because futures_core::Future are isolated 75 75 // from core::future::Future impls and guaranteed to have 76 76 // their cx.wakers represented in the nonstandard format 77 - unsafe { wake_array.register_parent(futures_compat::waker_to_guard(cx.waker())) } 77 + wake_array.register_parent(unsafe { futures_compat::waker_to_guard(cx.waker()) }); 78 78 79 79 let mut ready = true; 80 80 ··· 86 86 87 87 // ready if MaybeDone is Done or just completed (converted to Done) 88 88 // unsafe / against Future api contract to poll after Gone/Future is finished 89 - ready &= if unsafe { wake_array.take_woken(index).unwrap_unchecked() } { 89 + ready &= if unsafe { dbg!(wake_array.take_woken(index).unwrap_unchecked()) } { 90 90 $F.as_mut().poll(&mut child_cx).is_ready() 91 91 } else { 92 92 $F.is_terminated() ··· 150 150 use crate::wake::{DummyWaker, wake_bespoke_waker}; 151 151 152 152 use super::*; 153 - use std::cell::Cell; 153 + 154 154 use std::future::poll_fn; 155 155 use std::pin; 156 156 use std::ptr::NonNull; ··· 189 189 ) 190 190 } 191 191 .join(); 192 - let mut pinned = unsafe { Pin::new_unchecked(&mut join) }; 192 + let mut pinned = pin::pin!(join); 193 193 for _ in 0..4 { 194 194 assert_eq!(pinned.as_mut().poll(&mut cx), Poll::Pending); 195 195 }
+15 -12
futures-combinators/src/wake.rs
··· 1 - use std::{ 2 - array, cell::Cell, marker::PhantomPinned, pin::Pin, ptr::NonNull, 3 - task::Context, 4 - }; 1 + use std::{array, cell::Cell, marker::PhantomPinned, pin::Pin, ptr::NonNull}; 5 2 6 3 use futures_compat::WakePtr; 7 4 use futures_core::Wake; ··· 11 8 parent: RefGuard<WakePtr>, 12 9 children: [ValueGuard<WakePtr>; N], 13 10 stores: [WakeStore; N], 14 - marker: PhantomPinned, 11 + _marker: PhantomPinned, 15 12 } 16 13 17 14 impl<const N: usize> WakeArray<N> { ··· 20 17 parent: RefGuard::new(), 21 18 children: array::from_fn(|_| ValueGuard::new(None)), 22 19 stores: array::from_fn(|_| WakeStore::new()), 23 - marker: PhantomPinned, 20 + _marker: PhantomPinned, 24 21 } 25 22 } 26 23 ··· 42 39 return None; 43 40 } 44 41 42 + let wake_store = unsafe { self.stores.get(index).unwrap_unchecked() }; 43 + wake_store.set_parent(&self.parent); 44 + 45 45 let wake_store = unsafe { 46 - NonNull::new_unchecked(self.stores.get(index).unwrap_unchecked() 47 - as *const dyn Wake 48 - as *mut dyn Wake) 46 + NonNull::new_unchecked( 47 + wake_store as *const dyn Wake as *mut dyn Wake, 48 + ) 49 49 }; 50 + 50 51 let child_guard = 51 52 unsafe { self.get_ref().children.get(index).unwrap_unchecked() }; 52 - 53 53 child_guard.set(Some(wake_store)); 54 54 55 55 Some(unsafe { Pin::new_unchecked(child_guard) }) ··· 69 69 pub fn new() -> Self { 70 70 Self { 71 71 wake_parent: Cell::new(None), 72 - activated: Cell::new(false), 72 + activated: Cell::new(true), 73 73 } 74 74 } 75 75 ··· 84 84 85 85 impl Wake for WakeStore { 86 86 fn wake(&self) { 87 + dbg!("awake?"); 87 88 self.activated.set(true); 88 89 if let Some(parent) = self 89 90 .wake_parent ··· 109 110 pub struct DummyWaker; 110 111 111 112 impl Wake for DummyWaker { 112 - fn wake(&self) {} 113 + fn wake(&self) { 114 + dbg!("awake!"); 115 + } 113 116 }
+34 -3
futures-compat/src/lib.rs
··· 2 2 //! with an executor/reactor intended for bcsc::Future is strictly unsound. 3 3 4 4 use std::{ 5 + mem::ManuallyDrop, 5 6 pin::Pin, 6 7 ptr::NonNull, 7 8 task::{Context, Poll, RawWaker, RawWakerVTable, Waker}, ··· 23 24 /// `core::future::Future` 24 25 /// 25 26 /// Any usage or storage of the resulting `Waker` is undefined behavior. 26 - pub unsafe fn guard_to_waker(guard: Pin<&ValueGuard<WakePtr>>) -> Waker { 27 - unsafe { 27 + pub unsafe fn guard_to_waker( 28 + guard: Pin<&ValueGuard<WakePtr>>, 29 + ) -> ManuallyDrop<Waker> { 30 + ManuallyDrop::new(unsafe { 28 31 Waker::from_raw(RawWaker::new( 29 32 guard.get_ref() as *const ValueGuard<WakePtr> as *const (), 30 33 &EVIL_VTABLE, 31 34 )) 32 - } 35 + }) 33 36 } 34 37 pub unsafe fn atomic_guard_to_waker( 35 38 guard: Pin<&AtomicValueGuard<WakePtr>>, ··· 96 99 unsafe { self.map_unchecked_mut(|this| &mut this.0).poll(cx) } 97 100 } 98 101 } 102 + 103 + #[cfg(test)] 104 + mod test { 105 + use std::pin; 106 + 107 + use super::*; 108 + use futures_core::Wake; 109 + 110 + #[derive(Debug)] 111 + struct DummyWake; 112 + impl Wake for DummyWake { 113 + fn wake(&self) {} 114 + } 115 + 116 + #[test] 117 + fn waker_conversion() { 118 + let dummy = DummyWake; 119 + let guard = pin::pin!(ValueGuard::new(NonNull::new( 120 + &dummy as *const dyn Wake as *mut dyn Wake 121 + ))); 122 + let waker = unsafe { guard_to_waker(guard.as_ref()) }; 123 + let guard = unsafe { waker_to_guard(&waker) }; 124 + assert_eq!( 125 + guard.get().unwrap().as_ptr(), 126 + &dummy as *const dyn Wake as *mut dyn Wake 127 + ); 128 + } 129 + }