├── .gitattributes ├── .github ├── actions │ └── build │ │ └── action.yml └── workflows │ ├── autofix.yml │ ├── labeler.yml │ └── main.yml ├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── LICENSE-APACHE ├── LICENSE-MIT ├── README.md ├── autofix ├── Cargo.toml └── src │ ├── fix.rs │ ├── github.rs │ └── main.rs ├── fixed ├── 100075.rs ├── 100103.rs ├── 100114.rs ├── 100143.sh ├── 100183.rs ├── 100187.sh ├── 100463.rs ├── 100550.sh ├── 100612.sh ├── 100672.rs ├── 100689.rs ├── 100771.sh ├── 100772.sh ├── 100778.sh ├── 100783.sh ├── 100818.rs ├── 100878.rs ├── 101001.sh ├── 101020.rs ├── 101036.rs ├── 101076.sh ├── 101243.sh ├── 101297.rs ├── 101465.rs ├── 101518-1.sh ├── 101518-2.sh ├── 101660-1.rs ├── 101660-2.rs ├── 101665.rs ├── 101667.rs ├── 101696-1.rs ├── 101696-2.rs ├── 101852.rs ├── 101940.rs ├── 101964.rs ├── 102089.rs ├── 102105.rs ├── 102114-1.rs ├── 102114-2.rs ├── 102117.rs ├── 102124.sh ├── 102140.rs ├── 102154.sh ├── 102156.rs ├── 102172.rs ├── 102173.rs ├── 102209.rs ├── 102219.rs ├── 102363.sh ├── 102383-1.sh ├── 102383-2.sh ├── 102446.rs ├── 102465.rs ├── 103507.rs ├── 103666.rs ├── 104172.rs ├── 104196.rs ├── 104367.rs ├── 104368.rs ├── 104631.rs ├── 104685.rs ├── 104736.sh ├── 104779.rs ├── 104817.rs ├── 104827.rs ├── 104843.sh ├── 105047.rs ├── 105209.sh ├── 105228.rs ├── 105231.rs ├── 105273.sh ├── 105305.rs ├── 105321.rs ├── 105334.sh ├── 105631.rs ├── 105700.rs ├── 105709.rs ├── 105742.sh ├── 105777.rs ├── 105819.rs ├── 105821.rs ├── 105952-1.sh ├── 105952-2.sh ├── 105969.rs ├── 106030.rs ├── 106077.rs ├── 106079.sh ├── 106238.rs ├── 106423.rs ├── 106444.sh ├── 106473.rs ├── 106874.rs ├── 107228.sh ├── 107409.rs ├── 108329.rs ├── 108334.sh ├── 108399.rs ├── 108498.rs ├── 108580.rs ├── 108683.rs ├── 108952.rs ├── 108957.rs ├── 109020.rs ├── 109054.rs ├── 109059.rs ├── 109066.rs ├── 109071.rs ├── 109072.rs ├── 109090.rs ├── 109129.rs ├── 109141.rs ├── 109143.rs ├── 109144.rs ├── 109147.rs ├── 109148.rs ├── 109152.rs ├── 109153.rs ├── 109178.rs ├── 109188.rs ├── 109191.rs ├── 109239.rs ├── 109281.rs ├── 109298.rs ├── 109299.rs ├── 109300.rs ├── 109304.rs ├── 109343.rs ├── 109505.rs ├── 109523.rs ├── 109759.rs ├── 109790.rs ├── 109815.rs ├── 109853.rs ├── 109869.rs ├── 109962.rs ├── 110106.rs ├── 110453.rs ├── 110696.rs ├── 111176.rs ├── 111353.rs ├── 111433.rs ├── 111470.rs ├── 112047.rs ├── 112574.rs ├── 112623.rs ├── 112631.rs ├── 112822.rs ├── 112824.rs ├── 112832.rs ├── 113016.rs ├── 113017.rs ├── 113021.rs ├── 113133.rs ├── 113272.rs ├── 113279.rs ├── 113326.rs ├── 113375.rs ├── 113378.rs ├── 113381.rs ├── 113434.rs ├── 113462.rs ├── 113481.rs ├── 113610.rs ├── 13368.rs ├── 13727.rs ├── 15402.rs ├── 15694.rs ├── 16229.sh ├── 16812-1.rs ├── 16812-2.rs ├── 17987.rs ├── 18027.rs ├── 19064.rs ├── 19397.rs ├── 20046.rs ├── 20108.rs ├── 20318.rs ├── 20319.rs ├── 20433.rs ├── 20753.rs ├── 20847.rs ├── 20875.rs ├── 21073.rs ├── 21139.rs ├── 22565.rs ├── 22566.rs ├── 22603.rs ├── 22781.rs ├── 22789.rs ├── 22872.rs ├── 22874.rs ├── 22894.rs ├── 22919.rs ├── 23032.rs ├── 23175.rs ├── 23189.rs ├── 23278.rs ├── 23281.rs ├── 23311.rs ├── 23406.rs ├── 23458.rs ├── 23513.rs ├── 23524.rs ├── 23600.rs ├── 23707.rs ├── 23958.rs ├── 23992.rs ├── 24204.rs ├── 24424.rs ├── 24561.rs ├── 24599.rs ├── 24732.rs ├── 24810.rs ├── 24819.rs ├── 24947.rs ├── 24957.rs ├── 24972.rs ├── 25050.rs ├── 25051.rs ├── 25145.rs ├── 25385.rs ├── 25386.rs ├── 25579.rs ├── 25693.rs ├── 25733.rs ├── 25793.rs ├── 25810.rs ├── 26049.rs ├── 26093.rs ├── 26094.rs ├── 26095.rs ├── 26166.rs ├── 26201.rs ├── 26237.rs ├── 26263.rs ├── 26406.rs ├── 26459.rs ├── 26480.rs ├── 26483.rs ├── 26510.rs ├── 26989.rs ├── 26997.rs ├── 27078.rs ├── 27092.rs ├── 27119.rs ├── 27249.rs ├── 27316.rs ├── 27430.rs ├── 27455.rs ├── 27480.rs ├── 27819.rs ├── 27844.rs ├── 27874.rs ├── 27895.rs ├── 27901.rs ├── 27918.rs ├── 27925.rs ├── 27954.rs ├── 27985.rs ├── 27987.rs ├── 28089.rs ├── 28104.rs ├── 28172.rs ├── 28189.rs ├── 28288.rs ├── 28308.rs ├── 28324.rs ├── 28347.rs ├── 28410.rs ├── 28502.rs ├── 28575.rs ├── 28586.rs ├── 28600.rs ├── 28604.rs ├── 28625.rs ├── 28751.rs ├── 28804.rs ├── 28946.rs ├── 28971.rs ├── 29115.rs ├── 29161.rs ├── 29184.rs ├── 29191.rs ├── 29276.rs ├── 29466.rs ├── 29595.rs ├── 29914.rs ├── 29924.rs ├── 30276.rs ├── 30386.rs ├── 41073.rs ├── 43037.rs ├── 43408.rs ├── 43924.rs ├── 44861.rs ├── 45814.rs ├── 46511.rs ├── 47814.rs ├── 49362.rs ├── 51173.rs ├── 51388.sh ├── 51506.rs ├── 51892.rs ├── 52334.sh ├── 52808.rs ├── 52843.rs ├── 52893.rs ├── 53092.rs ├── 53448.rs ├── 53475.rs ├── 54038.rs ├── 54108.rs ├── 54840.rs ├── 54895.rs ├── 55414.rs ├── 56229.rs ├── 56445-1.rs ├── 56445-2.rs ├── 56445-3.rs ├── 56445-4.rs ├── 57200.rs ├── 57201.rs ├── 57404.rs ├── 57739.rs ├── 58094.rs ├── 58355.rs ├── 58504.rs ├── 58956.rs ├── 58987-1.rs ├── 58987-2.rs ├── 58987-3.rs ├── 58987-4.rs ├── 59191.sh ├── 59311.rs ├── 59324.rs ├── 59353.rs ├── 59435.rs ├── 59494.rs ├── 59956-1.rs ├── 59956-2.rs ├── 59996.rs ├── 60473.rs ├── 60619.rs ├── 60814.rs ├── 61335.rs ├── 61368.rs ├── 61455.rs ├── 61747.rs ├── 61774.rs ├── 61936.rs ├── 62046.rs ├── 62200.rs ├── 62222.rs ├── 62456.rs ├── 62480.rs ├── 62504.rs ├── 62521-1.rs ├── 62521-2.rs ├── 62521-3.rs ├── 62524-1.rs ├── 62524-2.rs ├── 62529-01.rs ├── 62529-02.rs ├── 62529-03.rs ├── 62529-04.rs ├── 62529-05.rs ├── 62529-06.rs ├── 62529-07.rs ├── 62529-08.rs ├── 62529-09.rs ├── 62529-10.rs ├── 62529-12.rs ├── 62529-13.rs ├── 62579.rs ├── 62708.rs ├── 62742.rs ├── 62767.rs ├── 62879.rs ├── 63031.rs ├── 63116.rs ├── 63154-2.rs ├── 63154.rs ├── 63263.rs ├── 63279.rs ├── 63300.rs ├── 63322.rs ├── 63355.rs ├── 63695.rs ├── 63900.sh ├── 64173.rs ├── 64537.rs ├── 64755.rs ├── 64784.rs ├── 64848.rs ├── 65025.rs ├── 65035.rs ├── 65159.rs ├── 65348.rs ├── 65383.rs ├── 65394.rs ├── 65462.rs ├── 65466.rs ├── 65561.rs ├── 65581.rs ├── 65673.rs ├── 65679.rs ├── 65774.rs ├── 65918.rs ├── 65934.rs ├── 66152.rs ├── 66205.rs ├── 66270.rs ├── 66340.rs ├── 66357.rs ├── 66367.sh ├── 66371.sh ├── 66387.rs ├── 66473.rs ├── 66500.rs ├── 66501-1.rs ├── 66501-2.rs ├── 66580.rs ├── 66693.rs ├── 66695.rs ├── 66696.rs ├── 66706-1.rs ├── 66706-2.rs ├── 66906.rs ├── 66930-1.rs ├── 66930-2.sh ├── 66962.rs ├── 67019.sh ├── 67158.rs ├── 67166.rs ├── 67375.rs ├── 67377.rs ├── 67405.rs ├── 67424.rs ├── 67498.rs ├── 67514.rs ├── 67552.rs ├── 67558.sh ├── 67684.sh ├── 67739.rs ├── 67830.rs ├── 67844.rs ├── 67856.rs ├── 67858.rs ├── 67883.rs ├── 67945-1.rs ├── 67945-2.rs ├── 67945-3.rs ├── 67945-4.rs ├── 67981.rs ├── 68013.rs ├── 68025.rs ├── 68060.rs ├── 68090.rs ├── 68091.rs ├── 68092.rs ├── 68130.rs ├── 68205.rs ├── 68295.rs ├── 68296.sh ├── 68368.rs ├── 68393.rs ├── 68394.rs ├── 68396.rs ├── 68398.rs ├── 68532.rs ├── 68538.rs ├── 68542.rs ├── 68543.rs ├── 68550.rs ├── 68596.rs ├── 68621.sh ├── 68643.rs ├── 68644.rs ├── 68645.rs ├── 68648.rs ├── 68649.rs ├── 68650.rs ├── 68652.rs ├── 68653.rs ├── 68656.sh ├── 68684-1.rs ├── 68684-2.rs ├── 68841.sh ├── 68868.rs ├── 68875.rs ├── 68890.rs ├── 69092.rs ├── 69130.rs ├── 69136.rs ├── 69191.rs ├── 69204.rs ├── 69239.rs ├── 69296.rs ├── 69307.rs ├── 69378.rs ├── 69396.rs ├── 69398.sh ├── 69401.rs ├── 69414.sh ├── 69415.sh ├── 69487-1.rs ├── 69487-2.rs ├── 69487-3.rs ├── 69490.rs ├── 69654.rs ├── 69840.rs ├── 69913.rs ├── 69970.rs ├── 70114.rs ├── 70120.rs ├── 70121.rs ├── 70217.rs ├── 70292.rs ├── 70303.rs ├── 70304.rs ├── 70381.rs ├── 70507.rs ├── 70586.rs ├── 70624.rs ├── 70723.rs ├── 70746.rs ├── 70877.rs ├── 70934.rs ├── 70971.rs ├── 70972.rs ├── 71036.rs ├── 71042.rs ├── 71113.rs ├── 71169.rs ├── 71176.rs ├── 71202.rs ├── 71212.rs ├── 71297.rs ├── 71316.sh ├── 71344.rs ├── 71348.rs ├── 71381.rs ├── 71382.rs ├── 71443-1.rs ├── 71443-2.rs ├── 71471.rs ├── 71516.rs ├── 71546-2.rs ├── 71546.rs ├── 71611.rs ├── 71659.rs ├── 71699.rs ├── 71793.sh ├── 71798.rs ├── 71805.rs ├── 71922.rs ├── 71955.rs ├── 72076.rs ├── 72105.sh ├── 72113.rs ├── 72181.sh ├── 72267.sh ├── 72278.rs ├── 72285.sh ├── 72293.rs ├── 72352.rs ├── 72372.sh ├── 72554.rs ├── 72565.rs ├── 72651.sh ├── 72679.sh ├── 72680.rs ├── 72793.rs ├── 72819.rs ├── 72845.rs ├── 72911.rs ├── 73021.sh ├── 73035.rs ├── 73109.sh ├── 73229.rs ├── 73249.rs ├── 73252.rs ├── 73260.sh ├── 73327.sh ├── 73375.rs ├── 73541.rs ├── 73626.sh ├── 73663.rs ├── 73727.rs ├── 73730.rs ├── 73860.sh ├── 73980.rs ├── 73993.rs ├── 74018.rs ├── 74047.rs ├── 74199.rs ├── 74244.rs ├── 74255.rs ├── 74261.rs ├── 74280.rs ├── 74282.rs ├── 74298.rs ├── 74358.sh ├── 74447.rs ├── 74599.rs ├── 74608.rs ├── 74634.rs ├── 74702.rs ├── 74713.rs ├── 74761.rs ├── 74816.rs ├── 74906.rs ├── 74918.rs ├── 75053.sh ├── 75153.rs ├── 75158.rs ├── 75229.sh ├── 75299.sh ├── 75323.rs ├── 75415.rs ├── 75682.rs ├── 75707.rs ├── 75883.rs ├── 75889.rs ├── 75961.rs ├── 75962.sh ├── 75983.rs ├── 76013.rs ├── 76064.rs ├── 76168.rs ├── 76202.rs ├── 76375.sh ├── 76510.rs ├── 76535.rs ├── 76826.rs ├── 77179.rs ├── 77218.rs ├── 77320.rs ├── 77323.rs ├── 77329.rs ├── 77357.rs ├── 77475.rs ├── 77647.sh ├── 77696.rs ├── 77708.sh ├── 77735.rs ├── 77910.rs ├── 77911.sh ├── 77919.rs ├── 77987.rs ├── 77993.sh ├── 78174.rs ├── 78180.sh ├── 78246.rs ├── 78336.rs ├── 78441.sh ├── 78442.sh ├── 78450.rs ├── 78456.rs ├── 78459.rs ├── 78520.sh ├── 78561.rs ├── 78628.sh ├── 78632.sh ├── 78651.sh ├── 78652.rs ├── 78653.rs ├── 78671.rs ├── 78721.rs ├── 78722.rs ├── 78922.rs ├── 79099.sh ├── 79224.rs ├── 79422.rs ├── 79461.sh ├── 79463.rs ├── 79466.sh ├── 79494.sh ├── 79495.sh ├── 79496.sh ├── 79518.rs ├── 79537.rs ├── 79565.sh ├── 79566.sh ├── 79569.sh ├── 79628.rs ├── 79636.rs ├── 79666.rs ├── 79669.rs ├── 79674.rs ├── 79690.rs ├── 79699.rs ├── 79768.rs ├── 79787.rs ├── 79949.rs ├── 80060.sh ├── 80062.rs ├── 80074.sh ├── 80077.rs ├── 80125.rs ├── 80134.rs ├── 80207.rs ├── 80228.sh ├── 80229.sh ├── 80230.sh ├── 80231.sh ├── 80291.rs ├── 80351.rs ├── 80371.rs ├── 80409.rs ├── 80433.rs ├── 80447.sh ├── 80531.rs ├── 80561.rs ├── 80664.sh ├── 80678.rs ├── 80706.rs ├── 80742.rs ├── 80767.rs ├── 80772.rs ├── 80779.rs ├── 80956.rs ├── 81006.rs ├── 81193.rs ├── 81199.rs ├── 81208.rs ├── 81270.rs ├── 81403.sh ├── 81708.rs ├── 81712.rs ├── 81786.sh ├── 81800.rs ├── 81804.rs ├── 81806.rs ├── 81809.rs ├── 81827.rs ├── 81845.rs ├── 81899.rs ├── 82034.sh ├── 82079.rs ├── 82126.rs ├── 82139.rs ├── 82156.rs ├── 82268.rs ├── 82290.rs ├── 82325.sh ├── 82326.sh ├── 82327.sh ├── 82328.sh ├── 82329.sh ├── 82335.rs ├── 82438.rs ├── 82455.rs ├── 82470.rs ├── 82504.rs ├── 82518.rs ├── 82610.rs ├── 82772.rs ├── 82792.rs ├── 82830.rs ├── 82836.rs ├── 82865.rs ├── 82866.rs ├── 82869.rs ├── 82880.rs ├── 82909.rs ├── 82926.rs ├── 82927.rs ├── 82952.rs ├── 82954.sh ├── 82956.sh ├── 82981.rs ├── 83017.rs ├── 83048.sh ├── 83085-1.sh ├── 83085-2.sh ├── 83107.rs ├── 83117.sh ├── 83120.rs ├── 83138.sh ├── 83175.rs ├── 83176.rs ├── 83182.rs ├── 83190.sh ├── 83249.rs ├── 83253.rs ├── 83288.rs ├── 83309.rs ├── 83340.rs ├── 83394.rs ├── 83466.rs ├── 83471-1.rs ├── 83471-2.rs ├── 83472.rs ├── 83474.rs ├── 83475.rs ├── 83479.rs ├── 83494.rs ├── 83499.rs ├── 83505.rs ├── 83512.rs ├── 83531.rs ├── 83539.rs ├── 83613.rs ├── 83621.rs ├── 83630.rs ├── 83641.sh ├── 83691.rs ├── 83693.rs ├── 83697.rs ├── 83704.rs ├── 83737.rs ├── 83753.rs ├── 83764.rs ├── 83765.rs ├── 83801.rs ├── 83836.rs ├── 83837.rs ├── 83893.rs ├── 83907.rs ├── 83919.rs ├── 83921.rs ├── 83937.sh ├── 83938.rs ├── 83993.rs ├── 84020.sh ├── 84073.rs ├── 84104.rs ├── 84108.rs ├── 84148.rs ├── 84149.rs ├── 84399.rs ├── 84408.rs ├── 84434.rs ├── 84632.rs ├── 84659.rs ├── 84737.sh ├── 84768.rs ├── 84789.rs ├── 84841.rs ├── 84919.rs ├── 84957.rs ├── 85031-1.sh ├── 85031-2.sh ├── 85103.rs ├── 85113.rs ├── 85350.rs ├── 85447.rs ├── 85455.rs ├── 85552.sh ├── 85635.rs ├── 85680.rs ├── 85713.rs ├── 85848.rs ├── 85855.rs ├── 85871.sh ├── 85907.rs ├── 85955.sh ├── 86017.sh ├── 86033.rs ├── 86053.rs ├── 86082.rs ├── 86085.rs ├── 86132.rs ├── 86188.rs ├── 86193.rs ├── 86201.rs ├── 86238.rs ├── 86351.rs ├── 86528.sh ├── 86535.rs ├── 86642.rs ├── 86703.sh ├── 86719.rs ├── 86756.rs ├── 86784.sh ├── 86800.rs ├── 86820.rs ├── 86850.rs ├── 86953.sh ├── 87142.sh ├── 87219.sh ├── 87258.rs ├── 87308.sh ├── 87340.rs ├── 87490.rs ├── 87496.rs ├── 87542.rs ├── 87549.sh ├── 87558.rs ├── 87573.rs ├── 87750.rs ├── 87762.rs ├── 87771.rs ├── 87793.rs ├── 87802.rs ├── 87813.sh ├── 87877.rs ├── 88212.rs ├── 88236.rs ├── 88360.rs ├── 88384.rs ├── 88434.rs ├── 88446.rs ├── 88468.rs ├── 88536.sh ├── 88586.rs ├── 88595.rs ├── 88599.rs ├── 88643.rs ├── 88770.rs ├── 88778.rs ├── 88876.rs ├── 88997.rs ├── 89022-1.rs ├── 89022-2.rs ├── 89066.sh ├── 89189.rs ├── 89271.sh ├── 89290.rs ├── 89304.rs ├── 89312.rs ├── 89333.rs ├── 89682-1.rs ├── 89682-2.rs ├── 89765.rs ├── 89864.rs ├── 89868.rs ├── 90150.rs ├── 90177.rs ├── 90318.rs ├── 90319.rs ├── 90400-1.rs ├── 90400-2.rs ├── 90409-1.rs ├── 90409-2.rs ├── 90654.rs ├── 90691.rs ├── 90847.rs ├── 90871-1.rs ├── 90871-2.rs ├── 90873.rs ├── 91069.rs ├── 91139.rs ├── 91267.rs ├── 91370.rs ├── 91434.rs ├── 91461.rs ├── 91502.rs ├── 91594.rs ├── 91603.rs ├── 91614.rs ├── 91633.rs ├── 91636.rs ├── 91745.sh ├── 91801-0.rs ├── 91801-1.rs ├── 91803.rs ├── 91816.rs ├── 91827-0.rs ├── 91827-1.rs ├── 92004.rs ├── 92054-1.rs ├── 92054-2.rs ├── 92074.rs ├── 92100-0.rs ├── 92100-1.rs ├── 92114.rs ├── 92128.rs ├── 92148.rs ├── 92157.rs ├── 92267.rs ├── 92305.sh ├── 92407.rs ├── 92464.rs ├── 92470.rs ├── 92481.rs ├── 92495.sh ├── 92537.sh ├── 92577.sh ├── 92626.rs ├── 92637.rs ├── 92893.rs ├── 92954.rs ├── 93008-1.sh ├── 93008-2.sh ├── 93022.rs ├── 9307.sh ├── 93117.sh ├── 93141.rs ├── 93182.rs ├── 93242-1.rs ├── 93242-2.rs ├── 93248.rs ├── 93282.rs ├── 93340.rs ├── 93411.sh ├── 93470.sh ├── 93553.rs ├── 93578.sh ├── 93622.rs ├── 93646.rs ├── 93647-1.sh ├── 93647-2.rs ├── 93688.sh ├── 93760.rs ├── 93775.rs ├── 93788.rs ├── 93835.rs ├── 93842.sh ├── 93871.sh ├── 93882.sh ├── 93946.sh ├── 93955.rs ├── 93997.rs ├── 94073.sh ├── 94291.rs ├── 94380.rs ├── 94382.rs ├── 94429.rs ├── 94432.rs ├── 94599.rs ├── 94627.rs ├── 94629.rs ├── 94662.rs ├── 94680.rs ├── 94822-1.rs ├── 94822-2.rs ├── 94835.rs ├── 94846.rs ├── 94903.sh ├── 94923.sh ├── 94953.sh ├── 94961.sh ├── 94998.sh ├── 94999.rs ├── 95023.rs ├── 95034.sh ├── 95134.sh ├── 95151.rs ├── 95163.rs ├── 95271.sh ├── 95272.rs ├── 95307.rs ├── 95310.sh ├── 95311.rs ├── 95327.rs ├── 95421.rs ├── 95540.rs ├── 95628.rs ├── 95640.sh ├── 95647-1.rs ├── 95647-2.rs ├── 95665.rs ├── 95823.rs ├── 95829.rs ├── 96114.sh ├── 96169.sh ├── 96170.sh ├── 96172.rs ├── 96223.rs ├── 96225.rs ├── 96258.rs ├── 96259.rs ├── 96287.sh ├── 96288.sh ├── 96299.sh ├── 96335.rs ├── 96395.sh ├── 96512.sh ├── 96525.sh ├── 96572-2.rs ├── 96572.rs ├── 96583.rs ├── 96594.rs ├── 96631.rs ├── 96638.rs ├── 96818.rs ├── 96847.rs ├── 96954.rs ├── 97007.rs ├── 97047-1.rs ├── 97047-2.rs ├── 97098.rs ├── 97099-1.rs ├── 97099-2.rs ├── 97193.rs ├── 97194.rs ├── 97197.rs ├── 97226.rs ├── 97378-1.sh ├── 97378-2.sh ├── 97381.rs ├── 97484.rs ├── 97490.rs ├── 97491.rs ├── 97534-1.rs ├── 97534-2.rs ├── 97625.sh ├── 97634.rs ├── 97695.sh ├── 97698.rs ├── 97706.rs ├── 97728.sh ├── 97806.rs ├── 97836.rs ├── 97898.rs ├── 97946.rs ├── 97986.sh ├── 98002.sh ├── 98003.sh ├── 98006.sh ├── 98007.sh ├── 98009.sh ├── 98010.rs ├── 98016.rs ├── 98170.rs ├── 98250.sh ├── 98432.rs ├── 98476-1.sh ├── 98476-2.sh ├── 98594.sh ├── 98598.rs ├── 98604.sh ├── 98702.rs ├── 98813.rs ├── 98821.sh ├── 98842.sh ├── 98897.rs ├── 98932.rs ├── 99073.rs ├── 99228.sh ├── 99318.sh ├── 99319.sh ├── 99325.sh ├── 99331.sh ├── 99348.rs ├── 99363.rs ├── 99387.rs ├── 99566.rs ├── 99575.rs ├── 99641.sh ├── 99642.rs ├── 99647.sh ├── 99662.sh ├── 99665-1.rs ├── 99665-2.rs ├── 99734.sh ├── 99777-1.rs ├── 99777-2.rs ├── 99777-3.rs ├── 99820.rs ├── 99828.rs ├── 99866.rs ├── 99914.rs ├── 99945.rs └── _23189 │ └── 23189.rs ├── ices ├── 100041.rs ├── 101557.rs ├── 101962.rs ├── 102047.rs ├── 102252.rs ├── 103708.rs ├── 103899.rs ├── 105238-1.rs ├── 105238-2.rs ├── 105249.sh ├── 105488.rs ├── 106298.sh ├── 108271-1.rs ├── 108271-2.rs ├── 108814.rs ├── 109681.rs ├── 110378.rs ├── 110534.rs ├── 110630.rs ├── 110726.rs ├── 111709.rs ├── 111742.rs ├── 111906-1.rs ├── 111906-3.rs ├── 111911.rs ├── 112201.rs ├── 112347.rs ├── 112630.rs ├── 113280.rs ├── 113379.rs ├── 34127.sh ├── 54888.rs ├── 57276.rs ├── 74299.rs ├── 74451.rs ├── 79409.rs ├── 79468.sh ├── 79590.rs ├── 82320.sh ├── 83056.rs ├── 83961.sh ├── 84727.rs ├── 86720.rs ├── 87577.rs ├── 88296.rs ├── 90110.rs ├── 91380.sh ├── 91985.rs ├── 93237.rs ├── 94379.rs ├── 95134.rs ├── 96304.rs ├── 97006.sh ├── 97501.rs ├── 98322.rs ├── 98372.rs └── 99173.sh ├── labeler ├── Cargo.toml └── src │ ├── github.rs │ └── main.rs └── src ├── lib.rs └── main.rs /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto eol=lf 2 | *.rs whitespace=tab-in-indent,trailing-space,tabwidth=4 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | **/*.rs.bk 3 | -------------------------------------------------------------------------------- /fixed/100103.rs: -------------------------------------------------------------------------------- 1 | #![feature(let_else)] 2 | fn main() { 3 | let Some(x) = Some(()) else { 4 | match Err(()) { 5 | Err(()) => return (), 6 | Ok(val) => val, 7 | } 8 | }; 9 | } 10 | -------------------------------------------------------------------------------- /fixed/100114.rs: -------------------------------------------------------------------------------- 1 | #![allow(warnings)] 2 | #![feature(never_type)] 3 | #![allow(const_err)] 4 | 5 | use std::mem::MaybeUninit; 6 | 7 | const fn never() -> ! { 8 | unsafe { MaybeUninit::uninit().assume_init() } 9 | } 10 | 11 | const NEVER: ! = never(); 12 | 13 | fn main() {} 14 | -------------------------------------------------------------------------------- /fixed/100183.rs: -------------------------------------------------------------------------------- 1 | struct Struct { 2 | y: (typeof("hey"),), 3 | } 4 | 5 | pub fn main() {} 6 | -------------------------------------------------------------------------------- /fixed/100187.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rustc "-Zsave-analysis" - <<'EOF' 4 | 5 | trait Pattern<'a> {} 6 | 7 | async fn named_trait<'a, 'b>(foo: impl Pattern<'a>) -> impl Pattern<'b> {} 8 | 9 | EOF 10 | 11 | -------------------------------------------------------------------------------- /fixed/100463.rs: -------------------------------------------------------------------------------- 1 | struct Foo { 2 | inner: Vec, 3 | } 4 | 5 | impl Foo { 6 | fn get(&self) -> impl Iterator { 7 | self.inner.iter() 8 | } 9 | } 10 | 11 | fn main() { 12 | let foo: Foo<()> = Foo { inner: Vec::new() }; 13 | let vals: Vec<_> = foo.get(); 14 | } 15 | -------------------------------------------------------------------------------- /fixed/100772.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rustc -Clto -Zsanitizer=cfi - <<'EOF' 4 | 5 | #![feature(allocator_api)] 6 | 7 | fn main() { 8 | Box::new_in(&[0, 1], &std::alloc::Global); 9 | } 10 | 11 | EOF 12 | -------------------------------------------------------------------------------- /fixed/100878.rs: -------------------------------------------------------------------------------- 1 | #![crate_type = "lib"] 2 | pub fn get_u16_from_unaligned_manual(data: [u8; 1]) -> u8 { 3 | data[0] << 8 4 | } 5 | 6 | -------------------------------------------------------------------------------- /fixed/101001.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rustc --crate-type lib -Zmeta-stats - <<'EOF' 4 | 5 | pub fn a() {} 6 | 7 | EOF 8 | 9 | -------------------------------------------------------------------------------- /fixed/101036.rs: -------------------------------------------------------------------------------- 1 | #![feature(generic_const_exprs)] 2 | 3 | const fn t() -> u8 { 4 | N as u8 5 | } 6 | 7 | #[repr(u8)] 8 | enum T::A as u8 + T::<0>::B as u8 }> 9 | where 10 | [(); N as usize]: 11 | { 12 | A = t::() as u8, B 13 | } 14 | -------------------------------------------------------------------------------- /fixed/101297.rs: -------------------------------------------------------------------------------- 1 | fn ice() -> impl AsRef { 2 | todo!() 3 | } 4 | 5 | pub fn main() {} 6 | -------------------------------------------------------------------------------- /fixed/101660-1.rs: -------------------------------------------------------------------------------- 1 | #![feature(anonymous_lifetime_in_impl_trait)] 2 | 3 | trait Foo { 4 | fn bar(self, baz: T); 5 | } 6 | 7 | fn qux(foo: impl Foo<&str>) { 8 | |baz: &str| foo.bar(baz); 9 | } 10 | 11 | pub fn main() {} 12 | -------------------------------------------------------------------------------- /fixed/101660-2.rs: -------------------------------------------------------------------------------- 1 | #![feature(anonymous_lifetime_in_impl_trait)] 2 | 3 | trait Foo { 4 | fn bar(self, baz: T); 5 | } 6 | 7 | fn qux(foo: impl Foo<&str>, baz: &str) { 8 | foo.bar(baz); 9 | } 10 | 11 | pub fn main() {} 12 | -------------------------------------------------------------------------------- /fixed/101665.rs: -------------------------------------------------------------------------------- 1 | #![feature(return_position_impl_trait_in_trait)] 2 | #![allow(incomplete_features)] 3 | 4 | use core::fmt::Debug; 5 | 6 | trait Foo { 7 | async fn baz()-> impl Debug{} 8 | } 9 | 10 | fn main(){} 11 | -------------------------------------------------------------------------------- /fixed/101852.rs: -------------------------------------------------------------------------------- 1 | pub fn ice( 2 | x: impl AsRef, 3 | ) -> impl IntoIterator { 4 | vec![].append(&mut ice(x.as_ref())); 5 | 6 | Vec::new() 7 | } 8 | 9 | fn main() {} 10 | -------------------------------------------------------------------------------- /fixed/102105.rs: -------------------------------------------------------------------------------- 1 | #![crate_type = "lib"] 2 | #![feature(rustc_attrs)] 3 | 4 | #[rustc_allocator] 5 | pub fn allocator() -> *const i8 { 6 | std::ptr::null() 7 | } 8 | -------------------------------------------------------------------------------- /fixed/102114-1.rs: -------------------------------------------------------------------------------- 1 | trait A{type B<'b>;} 2 | struct C; 3 | impl A for C { 4 | type B =impl; 5 | fn a() -> Self::B<'a>; 6 | } 7 | -------------------------------------------------------------------------------- /fixed/102114-2.rs: -------------------------------------------------------------------------------- 1 | trait A { 2 | type B<'b>; 3 | fn a() -> Self::B<'static>; 4 | } 5 | 6 | struct C; 7 | 8 | struct Wrapper(T); 9 | 10 | impl A for C { 11 | type B = Wrapper; 12 | fn a() -> Self::B<'static> {} 13 | } 14 | -------------------------------------------------------------------------------- /fixed/102156.rs: -------------------------------------------------------------------------------- 1 | #![feature(allocator_api)] 2 | 3 | #![feature(const_trait_impl)] 4 | use core::convert::{From, TryFrom}; 5 | use std::pin::Pin; 6 | use std::alloc::Allocator; 7 | impl const From> for Pin> 8 | where 9 | A: 'static, 10 | {} 11 | 12 | pub fn main() {} 13 | -------------------------------------------------------------------------------- /fixed/102172.rs: -------------------------------------------------------------------------------- 1 | #![feature(dyn_star)] 2 | #![allow(incomplete_features)] 3 | 4 | use std::fmt::Debug; 5 | 6 | fn main() { 7 | let i = 42 as &dyn* Debug; 8 | } 9 | -------------------------------------------------------------------------------- /fixed/102173.rs: -------------------------------------------------------------------------------- 1 | #![feature(dyn_star)] 2 | #![allow(incomplete_features)] 3 | 4 | use std::fmt::Debug; 5 | 6 | fn main() { 7 | let i = [1, 2, 3, 4] as dyn* Debug; 8 | 9 | dbg!(i); 10 | } 11 | -------------------------------------------------------------------------------- /fixed/102219.rs: -------------------------------------------------------------------------------- 1 | #![crate_type = "lib"] 2 | #![feature(async_fn_in_trait)] 3 | trait T { 4 | async fn foo(); 5 | } 6 | -------------------------------------------------------------------------------- /fixed/102363.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cat > out.rs << EOF 4 | #![feature(no_core)] 5 | #![no_core] 6 | 7 | #[doc(primitive = "usize")] 8 | /// This is the built-in type `usize`. 9 | mod usize { 10 | } 11 | EOF 12 | 13 | rustdoc --document-private-items -Zunstable-options --output-format=json out.rs 14 | -------------------------------------------------------------------------------- /fixed/102446.rs: -------------------------------------------------------------------------------- 1 | #![feature(inline_const)] 2 | #![feature(generic_const_exprs)] 3 | #![allow(incomplete_features)] 4 | 5 | use std::mem; 6 | 7 | pub union AsBytes { 8 | pub value: mem::ManuallyDrop, 9 | pub as_bytes: [u8; const { mem::size_of::() }], 10 | } 11 | 12 | fn main() {} 13 | -------------------------------------------------------------------------------- /fixed/103666.rs: -------------------------------------------------------------------------------- 1 | #![feature(type_alias_impl_trait)] 2 | 3 | type Tait<'b> = impl Sized; 4 | 5 | fn foo(f: &dyn Fn(Tait)) {} 6 | 7 | fn main() {} 8 | -------------------------------------------------------------------------------- /fixed/104172.rs: -------------------------------------------------------------------------------- 1 | #![allow(dead_code)] 2 | 3 | const N: usize = { 4 | struct U; 5 | ! let y = 42; 6 | 3 7 | }; 8 | 9 | struct S { 10 | x: [(); N] 11 | } 12 | 13 | fn main() {} 14 | -------------------------------------------------------------------------------- /fixed/104367.rs: -------------------------------------------------------------------------------- 1 | #[derive(A)] 2 | struct S { 3 | d: [u32; { 4 | #![cfg] { 5 | #![w,) 6 | 7 | fn main() {} 8 | -------------------------------------------------------------------------------- /fixed/104368.rs: -------------------------------------------------------------------------------- 1 | struct S { 2 | d: [u32; { 3 | #![cfg_attr(not(X),Y) Z] 4 | } 5 | } 6 | 7 | fn main() {} 8 | -------------------------------------------------------------------------------- /fixed/104685.rs: -------------------------------------------------------------------------------- 1 | #![feature(extern_types)] 2 | 3 | extern "C" { 4 | pub type ExternType; 5 | } 6 | 7 | extern "C" { 8 | pub static EXTERN: ExternType; 9 | } 10 | 11 | pub static EMPTY: () = unsafe { 12 | &EXTERN; 13 | }; 14 | 15 | fn main() {} 16 | -------------------------------------------------------------------------------- /fixed/104827.rs: -------------------------------------------------------------------------------- 1 | #![feature(try_trait_v2)] 2 | 3 | use std::ops::FromResidual; 4 | 5 | struct MySnafu; 6 | 7 | fn test_function() { 8 | impl FromResidual for MySnafu { 9 | fn from_residual(s: Self) -> Self { 10 | todo!() 11 | } 12 | } 13 | } 14 | 15 | fn main() {} 16 | -------------------------------------------------------------------------------- /fixed/105047.rs: -------------------------------------------------------------------------------- 1 | #![feature(raw_ref_op)] 2 | 3 | const RCZ: *const i32 = &raw const *&0; 4 | 5 | const fn f() { 6 | if let RCZ = &raw const *&0 {} 7 | } 8 | 9 | fn main() {} 10 | -------------------------------------------------------------------------------- /fixed/105209.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rustc -Zunpretty=ast-tree - << EOF 4 | #![c={#![c[)x 5 | EOF 6 | -------------------------------------------------------------------------------- /fixed/105228.rs: -------------------------------------------------------------------------------- 1 | #![feature(cfg_eval)] 2 | #![feature(stmt_expr_attributes)] 3 | 4 | #[cfg_eval] 5 | fn main() { 6 | #[cfg_eval] 7 | let _ = #[cfg(FALSE)] 0; 8 | //~^ ERROR removing an expression is not supported in this position 9 | } 10 | -------------------------------------------------------------------------------- /fixed/105231.rs: -------------------------------------------------------------------------------- 1 | struct A(B); 2 | struct B(A>); 3 | trait Foo {} 4 | impl Foo for T where T: Send {} 5 | impl Foo for B {} 6 | fn main() {} 7 | -------------------------------------------------------------------------------- /fixed/105273.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rustc "-Zunpretty=ast-tree" - <<'EOF' 4 | 5 | #![c = ({(while ""))(); 6 | 7 | EOF 8 | -------------------------------------------------------------------------------- /fixed/105305.rs: -------------------------------------------------------------------------------- 1 | #![feature(inherent_associated_types)] 2 | #![allow(incomplete_features)] 3 | 4 | struct S(T); 5 | 6 | impl S { // Also repros with any other lifetimes such as '_ ,switching order to 'a, T also repros. 7 | type P = T; 8 | } 9 | 10 | fn main() { 11 | type A = S<()>::P; 12 | } 13 | -------------------------------------------------------------------------------- /fixed/105321.rs: -------------------------------------------------------------------------------- 1 | fn hof(_: F) 2 | where 3 | F: FnMut() -> (), 4 | { 5 | } 6 | 7 | fn f() -> _ { 8 | hof(f); 9 | } 10 | 11 | fn main() {} 12 | -------------------------------------------------------------------------------- /fixed/105334.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cat > out.rs <<'EOF' 4 | 5 | impl Vec< br##"*.."## > {} 6 | 7 | fn main() {} 8 | 9 | EOF 10 | 11 | rustdoc out.rs 12 | -------------------------------------------------------------------------------- /fixed/105631.rs: -------------------------------------------------------------------------------- 1 | #![feature(generic_const_exprs)] 2 | 3 | struct A; 4 | 5 | fn main() {} 6 | -------------------------------------------------------------------------------- /fixed/105700.rs: -------------------------------------------------------------------------------- 1 | #![recursion_limit="4"] 2 | #![k1] 3 | #![k2] 4 | #![k3] 5 | #![k4] 6 | #![k5] 7 | 8 | fn main() {} 9 | -------------------------------------------------------------------------------- /fixed/105709.rs: -------------------------------------------------------------------------------- 1 | #![feature(generic_const_exprs)] 2 | #![feature(inline_const)] 3 | #![allow(incomplete_features)] 4 | 5 | pub struct ConstDefaultUnstable; 6 | 7 | fn main() {} 8 | -------------------------------------------------------------------------------- /fixed/105777.rs: -------------------------------------------------------------------------------- 1 | #![feature(dyn_star)] 2 | 3 | const _: dyn* Send = &(); 4 | // static V: dyn* Send = Sync = &(); 5 | 6 | fn main() {} 7 | -------------------------------------------------------------------------------- /fixed/105969.rs: -------------------------------------------------------------------------------- 1 | #![feature(dyn_star)] 2 | #![allow(incomplete_features)] 3 | 4 | use core::fmt::Debug; 5 | 6 | const FOO: () = { 7 | let foo = &3; 8 | let i = foo as dyn* Debug; 9 | }; 10 | 11 | fn main() {} 12 | -------------------------------------------------------------------------------- /fixed/106030.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | unknown(1, |glhf| { 3 | let actual = glhf; 4 | }); 5 | } 6 | -------------------------------------------------------------------------------- /fixed/106077.rs: -------------------------------------------------------------------------------- 1 | #![feature(associated_type_bounds)] 2 | 3 | struct Bug(T); 4 | 5 | impl Bug> {} 6 | 7 | fn main() {} 8 | -------------------------------------------------------------------------------- /fixed/106238.rs: -------------------------------------------------------------------------------- 1 | #![feature(trait_alias)] 2 | use core::ops::Add; 3 | 4 | pub trait DoSome {} 5 | 6 | // Trait alias causes compiler panic 7 | pub trait Cell> = DoSome; 8 | 9 | struct _Container { 10 | pub cells: dyn Cell, 11 | } 12 | 13 | fn main() {} 14 | -------------------------------------------------------------------------------- /fixed/106444.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rustc -Zmir-opt-level=3 --crate-type=lib - <<'EOF' 4 | pub trait A { 5 | type B; 6 | } 7 | 8 | pub struct S(T::B); 9 | 10 | pub fn foo(p: *mut S) { 11 | unsafe { core::ptr::drop_in_place(p) }; 12 | } 13 | 14 | EOF 15 | -------------------------------------------------------------------------------- /fixed/106473.rs: -------------------------------------------------------------------------------- 1 | #![feature(generic_const_exprs)] 2 | #![allow(incomplete_features)] 3 | 4 | const DEFAULT: u32 = 1; 5 | 6 | struct V 7 | where 8 | [(); U]:; 9 | 10 | trait Tr {} 11 | 12 | impl Tr for V {} 13 | 14 | fn main() {} 15 | -------------------------------------------------------------------------------- /fixed/108498.rs: -------------------------------------------------------------------------------- 1 | #![feature(type_alias_impl_trait)] 2 | type Opaque = impl Sized; 3 | 4 | fn get_rpit() -> impl Clone {} 5 | 6 | fn query(_: impl FnOnce() -> Opaque) {} 7 | 8 | fn test() -> Opaque { 9 | query(get_rpit); 10 | get_rpit() 11 | } 12 | 13 | fn main() { 14 | test(); 15 | } 16 | -------------------------------------------------------------------------------- /fixed/108683.rs: -------------------------------------------------------------------------------- 1 | fn example(var: i32) { 2 | || { 3 | let 0 = var; 4 | }; 5 | } 6 | 7 | fn main() {} 8 | -------------------------------------------------------------------------------- /fixed/108952.rs: -------------------------------------------------------------------------------- 1 | #![allow(incomplete_features)] 2 | #![feature(adt_const_params)] 3 | 4 | struct LifetimeGeneric<'a>(&'a ()); 5 | 6 | struct UwU<'b, const T: LifetimeGeneric>(&'b ()); 7 | 8 | fn main() {} 9 | -------------------------------------------------------------------------------- /fixed/108957.rs: -------------------------------------------------------------------------------- 1 | #![feature(inherent_associated_types)] 2 | #![allow(incomplete_features)] 3 | 4 | struct Choose(T); 5 | 6 | impl Choose { 7 | type Result = Vec; 8 | } 9 | 10 | fn main() { 11 | let _: Choose<&str>::Result = vec!["..."]; 12 | } 13 | -------------------------------------------------------------------------------- /fixed/109059.rs: -------------------------------------------------------------------------------- 1 | #![allow(incomplete_features)] 2 | #![feature(adt_const_params)] 3 | #![allow(dead_code)] 4 | 5 | #[derive(PartialEq, Eq)] 6 | struct S; 7 | 8 | trait T {} 9 | 10 | fn foo(t: impl T) -> impl T { 11 | t 12 | } 13 | 14 | fn main() {} 15 | -------------------------------------------------------------------------------- /fixed/109066.rs: -------------------------------------------------------------------------------- 1 | #![doc(test(""))] 2 | -------------------------------------------------------------------------------- /fixed/109071.rs: -------------------------------------------------------------------------------- 1 | struct Windows {} 2 | 3 | impl Windows { 4 | type Item = &[T]; 5 | 6 | fn next() -> Option {} 7 | } 8 | 9 | impl Windows { 10 | fn T() -> Option {} 11 | } 12 | -------------------------------------------------------------------------------- /fixed/109072.rs: -------------------------------------------------------------------------------- 1 | trait Lt<'_> { 2 | type T = (); 3 | } 4 | impl<'f> Lt<'a> for () { 5 | type T = (); 6 | } 7 | 8 | fn main() { 9 | let v: <() as Lt<'_>>::T = (); 10 | } 11 | -------------------------------------------------------------------------------- /fixed/109090.rs: -------------------------------------------------------------------------------- 1 | #![feature(non_lifetime_binders)] 2 | 3 | pub trait Bt { 4 | type C; 5 | } 6 | 7 | pub struct A; 8 | 9 | impl Bt for A { 10 | type C = A; 11 | } 12 | 13 | pub fn oopsie() 14 | where 15 | for<'a, B> >::Bt: Bt, {} 16 | 17 | 18 | fn main() {} -------------------------------------------------------------------------------- /fixed/109129.rs: -------------------------------------------------------------------------------- 1 | extern crate proc_macro; 2 | 3 | trait Project { 4 | type Assoc; 5 | } 6 | 7 | #[proc_macro] 8 | fn uwu() -> <() as Project>::Assoc {} 9 | -------------------------------------------------------------------------------- /fixed/109141.rs: -------------------------------------------------------------------------------- 1 | #![feature(generic_const_exprs)] 2 | 3 | impl EntriesBuffer { 4 | fn a(&self) -> impl Iterator { 5 | self.0.iter_mut() 6 | } 7 | } 8 | 9 | struct EntriesBuffer(Box<[[u8; HashesEntryLEN]; 5]>); 10 | 11 | fn main() {} 12 | -------------------------------------------------------------------------------- /fixed/109143.rs: -------------------------------------------------------------------------------- 1 | struct Bar S<'a>)>; 2 | -------------------------------------------------------------------------------- /fixed/109144.rs: -------------------------------------------------------------------------------- 1 | #![crate_type = "lib"] 2 | #[link(kind = "static", modifiers = "+whole-archive,+bundle")] 3 | extern "C" {} 4 | -------------------------------------------------------------------------------- /fixed/109147.rs: -------------------------------------------------------------------------------- 1 | use rustfmt::skip::Cell; 2 | 3 | fn f(f: (Cell)) -> i32 { 4 | f 5 | } 6 | 7 | fn main() {} 8 | -------------------------------------------------------------------------------- /fixed/109148.rs: -------------------------------------------------------------------------------- 1 | #[std( = )] 2 | extern crate blah as std; 3 | use std::arch; 4 | 5 | fn main() {} 6 | -------------------------------------------------------------------------------- /fixed/109152.rs: -------------------------------------------------------------------------------- 1 | fn _y() { 2 | vec![42].iter().map(drop); 3 | } 4 | 5 | fn main() {} 6 | -------------------------------------------------------------------------------- /fixed/109153.rs: -------------------------------------------------------------------------------- 1 | use foo::*; 2 | 3 | mod foo { 4 | pub mod bar { 5 | pub mod bar { 6 | pub mod bar {} 7 | } 8 | } 9 | } 10 | 11 | use bar::bar; 12 | use bar::*; 13 | 14 | fn main() {} 15 | -------------------------------------------------------------------------------- /fixed/109178.rs: -------------------------------------------------------------------------------- 1 | #![feature(adt_const_params, generic_const_exprs)] 2 | 3 | struct Changes 4 | where 5 | [(); CHANGES.len()]:, {} 6 | 7 | impl Changes where [(); CHANGES.len()]: {} 8 | 9 | fn main() {} 10 | -------------------------------------------------------------------------------- /fixed/109188.rs: -------------------------------------------------------------------------------- 1 | enum Either { 2 | One(X), 3 | Two(X), 4 | } 5 | 6 | struct X(Y); 7 | 8 | struct Y; 9 | 10 | fn move_into_fnmut() { 11 | let x = move_into_fnmut(); 12 | 13 | consume_fnmut(|| { 14 | X(_t) = x; 15 | 16 | Either::Two(_t) = x; 17 | }); 18 | } 19 | 20 | fn main() {} 21 | -------------------------------------------------------------------------------- /fixed/109191.rs: -------------------------------------------------------------------------------- 1 | trait Foo: { 2 | fn bar() -> ((), ); 3 | } 4 | 5 | impl Foo<> () { 6 | fn bar( s: _) -> _ {} 7 | } 8 | 9 | fn main() {} -------------------------------------------------------------------------------- /fixed/109239.rs: -------------------------------------------------------------------------------- 1 | #![allow(incomplete_features)] 2 | #![feature(return_position_impl_trait_in_trait)] 3 | 4 | trait Trait { 5 | type Type; 6 | 7 | fn method(&self) -> impl Trait + '_>; 8 | } 9 | 10 | fn main() {} 11 | -------------------------------------------------------------------------------- /fixed/109281.rs: -------------------------------------------------------------------------------- 1 | #![feature(type_alias_impl_trait)] 2 | struct S; 3 | type ReturnType<'a> = impl Eq + 'a; 4 | impl std::ops::Deref for S { 5 | type Target = dyn Fn(&()) -> ReturnType; 6 | fn deref() -> &'static Self::Target {} 7 | } 8 | 9 | fn main() {} 10 | -------------------------------------------------------------------------------- /fixed/109298.rs: -------------------------------------------------------------------------------- 1 | fn arr_by_ref(mut x: [(); 3]) { 2 | let f = || { 3 | let [ref y, ref mut z @ ..] = x; 4 | }; 5 | f(); 6 | } 7 | 8 | fn main() {} 9 | -------------------------------------------------------------------------------- /fixed/109299.rs: -------------------------------------------------------------------------------- 1 | trait Document { 2 | fn cursor(&self) -> Lexer::Cursor<'_>; 3 | } 4 | 5 | struct Lexer<'d> { 6 | cursor: (), 7 | _phantom: std::marker::PhantomData<&'d ()>, 8 | } 9 | 10 | impl<'cursor> Lexer<'d> { 11 | type Cursor<'a> = DocCursorImpl<'a>; 12 | } 13 | 14 | fn main() {} 15 | -------------------------------------------------------------------------------- /fixed/109300.rs: -------------------------------------------------------------------------------- 1 | #![feature(generic_const_exprs)] 2 | trait B { 3 | type U; 4 | } 5 | 6 | fn f = ()>>() {} 7 | 8 | fn main() {} 9 | -------------------------------------------------------------------------------- /fixed/109343.rs: -------------------------------------------------------------------------------- 1 | #![crate_type = "lib"] 2 | extern crate f; 3 | 4 | pub use inner::f; 5 | 6 | /// [mod@std::env] [g] 7 | pub use f as g; 8 | 9 | 10 | fn main() {} -------------------------------------------------------------------------------- /fixed/109523.rs: -------------------------------------------------------------------------------- 1 | enum Either { 2 | One(X), 3 | Two(X), 4 | } 5 | 6 | struct X; 7 | 8 | fn move_into_fnmut() { 9 | let x = Either::One(X); 10 | let y = || { 11 | let Either::Two(a) = x; 12 | }; 13 | } 14 | 15 | fn main() { } -------------------------------------------------------------------------------- /fixed/109790.rs: -------------------------------------------------------------------------------- 1 | #![feature(inherent_associated_types)] 2 | 3 | struct Foo(T); 4 | 5 | impl<'a> Foo { 6 | type Assoc = &'a (); 7 | } 8 | 9 | trait Other {} 10 | impl Other for u32 {} 11 | 12 | fn bar(_: for<'a> fn(Foo::Assoc)) {} 13 | 14 | 15 | fn main() {} -------------------------------------------------------------------------------- /fixed/109815.rs: -------------------------------------------------------------------------------- 1 | #![crate_type="lib"] 2 | #![feature(min_specialization)] 3 | 4 | trait X {} 5 | trait Y: X {} 6 | trait Z { 7 | type Assoc: Y; 8 | } 9 | struct A(T); 10 | 11 | impl Z for A {} 12 | 13 | impl From< as Z>::Assoc> for T {} 14 | 15 | 16 | fn main() {} -------------------------------------------------------------------------------- /fixed/109853.rs: -------------------------------------------------------------------------------- 1 | use clippy::time::Instant; 2 | 3 | fn main() { 4 | let prev_instant = Instant::now(); 5 | 6 | let duration = prev_instant.elapsed(); 7 | } -------------------------------------------------------------------------------- /fixed/109962.rs: -------------------------------------------------------------------------------- 1 | mod foo { 2 | pub mod bar { 3 | pub mod bar { 4 | pub mod bar { 5 | pub mod bar {} 6 | } 7 | } 8 | } 9 | } 10 | use foo::*; 11 | use bar::bar::bar; 12 | use bar::*; 13 | 14 | fn main() {} -------------------------------------------------------------------------------- /fixed/110453.rs: -------------------------------------------------------------------------------- 1 | pub struct B; 2 | pub fn a() -> B { 3 | B 4 | } 5 | 6 | mod handlers { 7 | pub struct C(B); 8 | pub fn c() -> impl Fn() -> C { 9 | let a1 = (); 10 | || C((crate::a(), a1).into()) 11 | } 12 | } 13 | 14 | fn main() {} 15 | -------------------------------------------------------------------------------- /fixed/111353.rs: -------------------------------------------------------------------------------- 1 | #![feature(unsized_fn_params)] 2 | pub fn f(mut x: [i32]) { 3 | x[0] = 1; 4 | } 5 | 6 | fn main() {} 7 | -------------------------------------------------------------------------------- /fixed/111433.rs: -------------------------------------------------------------------------------- 1 | #![feature(generic_const_exprs)] 2 | #![allow(incomplete_features)] 3 | 4 | const fn inner<'a>() -> usize where &'a (): Sized { 5 | 3 6 | } 7 | 8 | fn test<'a>() { 9 | let _: [u8; inner::<'a>()]; 10 | let _ = [0; inner::<'a>()]; 11 | } 12 | 13 | fn main() { 14 | test(); 15 | } 16 | -------------------------------------------------------------------------------- /fixed/112574.rs: -------------------------------------------------------------------------------- 1 | #![feature(non_lifetime_binders)] 2 | 3 | pub fn bar() 4 | where 5 | for V: IntoIterator 8 | { 9 | } 10 | 11 | fn main() { 12 | bar(); 13 | } 14 | 15 | -------------------------------------------------------------------------------- /fixed/112631.rs: -------------------------------------------------------------------------------- 1 | #![feature(inherent_associated_types)] 2 | #![allow(incomplete_features)] 3 | 4 | struct Foo(T); 5 | 6 | impl<'a> Foo { 7 | type Assoc = &'a (); 8 | } 9 | 10 | fn bar(_: for<'a> fn(Foo::Assoc)>::Assoc)) {} 11 | 12 | fn main() {} 13 | -------------------------------------------------------------------------------- /fixed/113016.rs: -------------------------------------------------------------------------------- 1 | #![feature(non_lifetime_binders)] 2 | 3 | trait Trait {} 4 | 5 | fn main(x: impl for Trait<'_, Assoc = impl Trait + '_>) {} 6 | -------------------------------------------------------------------------------- /fixed/113017.rs: -------------------------------------------------------------------------------- 1 | #![feature(generic_const_exprs)] 2 | 3 | pub fn String(elem) 4 | where 5 | V: 'a, 6 | for V: 'a, 7 | for <&str as IntoIterator>::Item: 'static, 8 | {} 9 | 10 | -------------------------------------------------------------------------------- /fixed/113021.rs: -------------------------------------------------------------------------------- 1 | #![feature(generic_const_exprs)] 2 | 3 | pub async fn something(path: &[[usize; N_ISLANDS]; PrivateStruct]) -> usize { 4 | match path { 5 | [] | _ => 0, 6 | } 7 | } 8 | 9 | pub fn main() {} 10 | 11 | -------------------------------------------------------------------------------- /fixed/113133.rs: -------------------------------------------------------------------------------- 1 | #![allow(incomplete_features)] 2 | #![feature(generic_const_exprs, non_lifetime_binders)] 3 | 4 | pub fn foo() 5 | where 6 | for ():, 7 | {} 8 | 9 | fn main() {} 10 | -------------------------------------------------------------------------------- /fixed/113272.rs: -------------------------------------------------------------------------------- 1 | trait Trait { 2 | type RefTarget; 3 | } 4 | 5 | impl Trait for () where Missing: Trait {} 6 | 7 | struct Other { 8 | data: <() as Trait>::RefTarget, 9 | } 10 | 11 | fn main() { 12 | unsafe { 13 | std::mem::transmute::, Option<&Other>>(None); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /fixed/113375.rs: -------------------------------------------------------------------------------- 1 | #![feature(effects)] 2 | 3 | struct Bar(T); 4 | 5 | impl Bar { 6 | const fn value() -> usize { 7 | 42 8 | } 9 | } 10 | 11 | struct Foo::value()]>; 12 | 13 | fn main() {} 14 | -------------------------------------------------------------------------------- /fixed/113378.rs: -------------------------------------------------------------------------------- 1 | #![feature(const_trait_impl)] 2 | #![feature(effects)] 3 | 4 | trait Value {} 5 | 6 | impl const Value for T { 7 | const fn value() -> u32 { 8 | 0 9 | } 10 | } 11 | 12 | fn main() {} 13 | -------------------------------------------------------------------------------- /fixed/113381.rs: -------------------------------------------------------------------------------- 1 | #![feature(const_closures, const_trait_imp, effects)] 2 | #![allow(incomplete_features)] 3 | 4 | trait Foo { 5 | fn foo(&self); 6 | } 7 | 8 | impl Foo for () { 9 | fn foo(&self) {} 10 | } 11 | 12 | fn main() { 13 | (const || { (()).foo() })(); 14 | } 15 | -------------------------------------------------------------------------------- /fixed/113434.rs: -------------------------------------------------------------------------------- 1 | #![feature(return_position_impl_trait_in_trait)] 2 | 3 | struct Wrapper(T); 4 | 5 | trait Foo { 6 | fn bar() -> Wrapper; 7 | } 8 | -------------------------------------------------------------------------------- /fixed/113462.rs: -------------------------------------------------------------------------------- 1 | #[derive(Default)] 2 | struct NonGeneric<'a, const N: NonGeneric> {} 3 | -------------------------------------------------------------------------------- /fixed/113481.rs: -------------------------------------------------------------------------------- 1 | trait Foo { 2 | type Bar<'x> 3 | where 4 | Self: 'x; 5 | } 6 | 7 | fn baz() -> impl for<'y> Foo = impl ToString> { 8 | 42 9 | } 10 | 11 | impl Foo for i32 { 12 | type Bar<'x> = &'x str; 13 | } 14 | -------------------------------------------------------------------------------- /fixed/113610.rs: -------------------------------------------------------------------------------- 1 | fn test5() { 2 | let t = (String::new(), Default::default()); 3 | } 4 | -------------------------------------------------------------------------------- /fixed/13368.rs: -------------------------------------------------------------------------------- 1 | #![feature(asm)] 2 | 3 | fn main() { 4 | let arr: [u8; 16]; 5 | unsafe { asm!("" : "=m"(arr)); } 6 | println!("{:?}", arr); 7 | } 8 | -------------------------------------------------------------------------------- /fixed/13727.rs: -------------------------------------------------------------------------------- 1 | fn test(val: u8) { 2 | match val { 3 | 256 => print!("0b1110\n"), 4 | 512 => print!("0b1111\n"), 5 | _ => print!("fail\n"), 6 | } 7 | } 8 | 9 | fn main() { 10 | test(1); 11 | } 12 | -------------------------------------------------------------------------------- /fixed/15402.rs: -------------------------------------------------------------------------------- 1 | #![feature(asm)] 2 | 3 | pub struct Wrapper(u32); 4 | 5 | fn main() { 6 | let mut value: Wrapper = Wrapper(7); 7 | unsafe { 8 | asm!("mov %eax, $0" : "+r"(value)); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /fixed/15694.rs: -------------------------------------------------------------------------------- 1 | #![feature(intrinsics)] 2 | 3 | use std::mem; 4 | 5 | fn main() { 6 | let _: unsafe extern "rust-intrinsic" fn(isize) -> usize = mem::transmute; 7 | } 8 | -------------------------------------------------------------------------------- /fixed/16812-1.rs: -------------------------------------------------------------------------------- 1 | enum Foo { 2 | Bar(u32, [u32]), 3 | } 4 | 5 | fn main() { 6 | // Either of these lines can cause the ICE 7 | let _x: &(u32, [u32]); 8 | let _y: &Foo; 9 | } 10 | -------------------------------------------------------------------------------- /fixed/17987.rs: -------------------------------------------------------------------------------- 1 | enum Foo {} 2 | impl Drop for Foo { 3 | fn drop(&mut self) {} 4 | } 5 | 6 | fn main() { 7 | unsafe { std::ptr::read(&1u8 as *const u8 as *const Foo) }; 8 | } 9 | -------------------------------------------------------------------------------- /fixed/18027.rs: -------------------------------------------------------------------------------- 1 | #![feature(slice_patterns)] 2 | fn main() { 3 | match "".as_bytes() { 4 | b"" => (), 5 | [] => (), 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /fixed/19064.rs: -------------------------------------------------------------------------------- 1 | struct Foo(pub str); 2 | 3 | impl Foo { 4 | fn print(&self) { 5 | match self { 6 | &Foo(ref s) => println!("f\"{}\"", s), 7 | } 8 | } 9 | } 10 | 11 | fn main() {} 12 | -------------------------------------------------------------------------------- /fixed/19397.rs: -------------------------------------------------------------------------------- 1 | #![feature(unboxed_closures)] 2 | 3 | trait Foo { 4 | extern "rust-call" fn foo(); 5 | } 6 | 7 | impl Foo for () { 8 | extern "rust-call" fn foo() {} 9 | } 10 | 11 | fn main() {} 12 | -------------------------------------------------------------------------------- /fixed/20318.rs: -------------------------------------------------------------------------------- 1 | #![feature(core_intrinsics)] 2 | fn main() { 3 | let _f = std::intrinsics::offset::; 4 | } 5 | -------------------------------------------------------------------------------- /fixed/20319.rs: -------------------------------------------------------------------------------- 1 | #![feature(core_intrinsics)] 2 | fn main() { 3 | let _f = std::intrinsics::assume; 4 | } 5 | -------------------------------------------------------------------------------- /fixed/20433.rs: -------------------------------------------------------------------------------- 1 | fn main() {} 2 | 3 | struct The; 4 | 5 | impl The { 6 | fn iceman(c: Vec<[i32]>) {} 7 | } 8 | -------------------------------------------------------------------------------- /fixed/20753.rs: -------------------------------------------------------------------------------- 1 | macro_rules! a { () => ($crate) } 2 | a!(); 3 | 4 | fn main() {} 5 | -------------------------------------------------------------------------------- /fixed/20847.rs: -------------------------------------------------------------------------------- 1 | #![feature(core, unboxed_closures)] 2 | use std::ops::Fn; 3 | fn say(x: u32, y: u32) { 4 | println!("{} {}", x, y); 5 | } 6 | fn main() { 7 | Fn::call(&say, (1, 2)); 8 | } 9 | -------------------------------------------------------------------------------- /fixed/20875.rs: -------------------------------------------------------------------------------- 1 | #![feature(no_core,lang_items)] 2 | #![no_core] 3 | 4 | #[lang="sized"] 5 | struct Bar {field: T} 6 | 7 | fn main() {} 8 | -------------------------------------------------------------------------------- /fixed/21073.rs: -------------------------------------------------------------------------------- 1 | const TAG: &'static [u8] = b"ABCD"; 2 | 3 | fn main() { 4 | match &[][..] { 5 | TAG => println!("Yes."), 6 | _ => println!("No."), 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /fixed/22566.rs: -------------------------------------------------------------------------------- 1 | #![feature(unboxed_closures)] 2 | #![allow(dead_code)] 3 | extern "rust-call" fn a() {} 4 | fn main(){} 5 | -------------------------------------------------------------------------------- /fixed/22603.rs: -------------------------------------------------------------------------------- 1 | #![feature(unboxed_closures,core)] 2 | 3 | pub struct Foo; 4 | 5 | impl FnOnce<(A,)> for Foo { 6 | type Output = (); 7 | extern "rust-call" fn call_once(self, (_,): (A,)) { 8 | } 9 | } 10 | 11 | pub fn main() { 12 | println!("{:?}", Foo("bar")); 13 | } 14 | -------------------------------------------------------------------------------- /fixed/22789.rs: -------------------------------------------------------------------------------- 1 | #![feature(core)] 2 | #![feature(unboxed_closures)] 3 | 4 | fn main() { 5 | let k = |x: i32| { x + 1 }; 6 | Fn::call(&k, (0,)); 7 | } 8 | -------------------------------------------------------------------------------- /fixed/22874.rs: -------------------------------------------------------------------------------- 1 | trait Foo {} 2 | fn main() { 3 | let _a: [Foo; 0]; 4 | } 5 | -------------------------------------------------------------------------------- /fixed/22894.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | (*"abc").len(); 3 | } 4 | -------------------------------------------------------------------------------- /fixed/23032.rs: -------------------------------------------------------------------------------- 1 | static BAR: u32 = *&FOO; 2 | static FOO: u32 = 0; 3 | 4 | fn main() {} 5 | -------------------------------------------------------------------------------- /fixed/23189.rs: -------------------------------------------------------------------------------- 1 | mod _23189; 2 | 3 | fn main() { 4 | let _ = _23189 { x: 0 }; 5 | } 6 | -------------------------------------------------------------------------------- /fixed/23278.rs: -------------------------------------------------------------------------------- 1 | extern "Rust" { 2 | fn foo(); 3 | } 4 | 5 | fn main() { 6 | unsafe { foo() }; 7 | } 8 | 9 | -------------------------------------------------------------------------------- /fixed/23281.rs: -------------------------------------------------------------------------------- 1 | pub struct Struct; 2 | 3 | impl Struct { 4 | pub fn function(funs: Vec ()>) {} 5 | } 6 | 7 | fn main() {} 8 | 9 | -------------------------------------------------------------------------------- /fixed/23311.rs: -------------------------------------------------------------------------------- 1 | #![feature(slice_patterns)] 2 | 3 | fn main() { 4 | match "foo".as_bytes() { 5 | b"food" => println!("nom nom"), 6 | [b'f', ..] => println!("f!"), 7 | _ => () 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /fixed/23406.rs: -------------------------------------------------------------------------------- 1 | trait Inner { 2 | type T; 3 | } 4 | 5 | impl<'a> Inner for &'a i32 { 6 | type T = i32; 7 | } 8 | 9 | fn f<'a>(x: &'a i32) -> <&'a i32 as Inner>::T { 10 | *x 11 | } 12 | 13 | fn main() {} 14 | -------------------------------------------------------------------------------- /fixed/23458.rs: -------------------------------------------------------------------------------- 1 | #![feature(asm)] 2 | 3 | fn main() { 4 | unsafe { 5 | asm!("int $3"); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /fixed/23513.rs: -------------------------------------------------------------------------------- 1 | enum E { A, } 2 | 3 | const C: [u32; 1] = [1]; 4 | 5 | fn main() { 6 | let a = C[E::A as usize]; 7 | } 8 | -------------------------------------------------------------------------------- /fixed/23600.rs: -------------------------------------------------------------------------------- 1 | static V1: [u8; 0xffff_ffff] = [0u8; 0xffff_ffff]; 2 | fn main() { V1[0]; } 3 | -------------------------------------------------------------------------------- /fixed/23992.rs: -------------------------------------------------------------------------------- 1 | trait Foo { 2 | type Bar; 3 | fn foo(self) -> Self::Bar; 4 | } 5 | 6 | impl Foo for Box { 7 | type Bar = ::Bar; 8 | fn foo(self) -> ::Bar { 9 | (*self).foo() 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /fixed/24424.rs: -------------------------------------------------------------------------------- 1 | trait Trait1<'l0, T0> {} 2 | trait Trait0<'l0> {} 3 | 4 | impl <'l0, 'l1, T0> Trait1<'l0, T0> for bool where T0 : Trait0<'l0>, T0 : Trait0<'l1> {} 5 | 6 | fn main() {} 7 | -------------------------------------------------------------------------------- /fixed/24599.rs: -------------------------------------------------------------------------------- 1 | #![crate_type="rlib"] 2 | fn test() -> (u8,) { 3 | (-1.0 as u8,) 4 | } 5 | -------------------------------------------------------------------------------- /fixed/24732.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | let x = T {f: Box::new([None])}; 3 | } 4 | 5 | struct T { 6 | f: Box<[Option; 1]> 7 | } 8 | -------------------------------------------------------------------------------- /fixed/24810.rs: -------------------------------------------------------------------------------- 1 | use std::ops::Add; 2 | 3 | trait T: Add { 4 | } 5 | 6 | impl T { 7 | } 8 | 9 | fn main() { 10 | } 11 | -------------------------------------------------------------------------------- /fixed/24819.rs: -------------------------------------------------------------------------------- 1 | use std::collections::HashSet; 2 | 3 | fn main() { 4 | let mut v = Vec::new(); 5 | foo(&mut v); 6 | } 7 | 8 | fn foo(h: &mut HashSet) { 9 | } 10 | -------------------------------------------------------------------------------- /fixed/24957.rs: -------------------------------------------------------------------------------- 1 | pub enum BsonValue { 2 | A([u8]), 3 | B([BsonValue]), 4 | } 5 | 6 | pub fn set_value(_v:&BsonValue) { 7 | } 8 | 9 | fn main() { 10 | } 11 | -------------------------------------------------------------------------------- /fixed/25050.rs: -------------------------------------------------------------------------------- 1 | pub trait NBTTypeHelper where Self: NBTType { 2 | type Tagtype = Self; 3 | } 4 | 5 | pub trait NBTType { 6 | } 7 | 8 | impl NBTTypeHelper for NBTType { 9 | type Tagtype = ::Tagtype; 10 | } 11 | 12 | fn main() {} 13 | -------------------------------------------------------------------------------- /fixed/25051.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | let chunk_type: [u8; 4] = [73, 72, 68, 82]; 3 | match &chunk_type { 4 | b"IHDR" => () 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /fixed/25385.rs: -------------------------------------------------------------------------------- 1 | macro_rules! foo { 2 | ($e:expr) => { $e.foo() } 3 | } 4 | 5 | fn main() { 6 | let (a,) = 1i32.foo(); 7 | foo!(a); 8 | } 9 | -------------------------------------------------------------------------------- /fixed/25386.rs: -------------------------------------------------------------------------------- 1 | macro_rules! check_ptr_exist { 2 | ($var:expr, $member:ident) => ( 3 | (*$var.c_object).$member.is_some() 4 | ); 5 | } 6 | -------------------------------------------------------------------------------- /fixed/25733.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | let x = [5; 100]; 3 | foo(x); 4 | } 5 | 6 | fn foo(x: X) { let _ = bar(x); } 7 | 8 | fn bar(x: X) { let _ = x.clone(); } 9 | -------------------------------------------------------------------------------- /fixed/26093.rs: -------------------------------------------------------------------------------- 1 | macro_rules! not_an_lvalue { 2 | ($thing:expr) => { 3 | $thing = 42; 4 | } 5 | } 6 | 7 | fn main() { 8 | not_an_lvalue!(99); 9 | } 10 | -------------------------------------------------------------------------------- /fixed/26094.rs: -------------------------------------------------------------------------------- 1 | macro_rules! some_macro { 2 | ($other: expr) => ({ 3 | $other(None) 4 | }) 5 | } 6 | 7 | fn some_function() { 8 | } 9 | 10 | fn main() { 11 | some_macro!(some_function); 12 | } 13 | -------------------------------------------------------------------------------- /fixed/26166.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | enum Msg { 3 | Start(usize), 4 | Measure([u8]), 5 | } 6 | 7 | 8 | let _ = Msg::Start; 9 | } 10 | -------------------------------------------------------------------------------- /fixed/26201.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | { 3 | extern "C" fn foo() { } 4 | } 5 | { 6 | extern "C" fn foo() { } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /fixed/26237.rs: -------------------------------------------------------------------------------- 1 | macro_rules! macro_panic { 2 | ($not_a_function:expr, $some_argument:ident) => { 3 | $not_a_function($some_argument) 4 | } 5 | } 6 | 7 | fn main() { 8 | let mut value_a = 0; 9 | let mut value_b = 0; 10 | macro_panic!(value_a, value_b); 11 | } 12 | -------------------------------------------------------------------------------- /fixed/26263.rs: -------------------------------------------------------------------------------- 1 | static mut TEST: [isize; 1] = [1]; 2 | static mut TEST2: &'static mut [isize] = unsafe { &mut TEST }; 3 | fn main() { 4 | println!("{}", unsafe { TEST2[0] }); 5 | } 6 | -------------------------------------------------------------------------------- /fixed/26459.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | match 'a' { 3 | char{ch} => true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /fixed/26480.rs: -------------------------------------------------------------------------------- 1 | macro_rules! jerry( 2 | ($name:expr) => { 3 | pub static NAME: *mut u8 = $name as *mut u8; 4 | } 5 | ); 6 | 7 | fn main() { 8 | jerry!(b"Kiwi\0"); 9 | } 10 | -------------------------------------------------------------------------------- /fixed/26483.rs: -------------------------------------------------------------------------------- 1 | struct Apple; 2 | 3 | enum Delicious { 4 | ApplePie = Apple::PIE, 5 | } 6 | 7 | fn main() {} 8 | -------------------------------------------------------------------------------- /fixed/26510.rs: -------------------------------------------------------------------------------- 1 | #![feature(slice_patterns)] 2 | fn main() { 3 | let buf = [0u8; 4]; 4 | match &buf { 5 | &[0, 1, 0, 0] => (), 6 | b"true" => (), 7 | _ => () 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /fixed/26989.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | match (0, 0) { 3 | (0, ref _a) => {} 4 | (_, 0) => {} 5 | _ => {} 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /fixed/26997.rs: -------------------------------------------------------------------------------- 1 | pub struct Foo { 2 | x: isize, 3 | y: isize 4 | } 5 | 6 | impl Foo { 7 | pub extern fn foo_new() -> Foo { 8 | Foo { x: 21, y: 33 } 9 | } 10 | } 11 | 12 | fn main() { 13 | } 14 | -------------------------------------------------------------------------------- /fixed/27078.rs: -------------------------------------------------------------------------------- 1 | #![feature(associated_consts)] 2 | trait Foo { const BAR: i32; fn foo(self) -> &'static i32 { &::BAR }} 3 | fn main() {} 4 | -------------------------------------------------------------------------------- /fixed/27249.rs: -------------------------------------------------------------------------------- 1 | const FOO: u32 = 5; 2 | 3 | fn main() { 4 | FOO; 5 | } 6 | -------------------------------------------------------------------------------- /fixed/27316.rs: -------------------------------------------------------------------------------- 1 | trait A : B {} 2 | trait B : A {} 3 | 4 | fn main() {} 5 | -------------------------------------------------------------------------------- /fixed/27430.rs: -------------------------------------------------------------------------------- 1 | #![feature(associated_consts, const_fn)] 2 | struct A(u32); 3 | 4 | impl A { 5 | const fn new() -> A { A(0) } 6 | const TEST: A = A::new(); 7 | } 8 | 9 | fn main() { 10 | match A(1) { 11 | A::TEST => (), 12 | _ => () 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /fixed/27455.rs: -------------------------------------------------------------------------------- 1 | trait SomeTrait {} 2 | impl SomeTrait for i32 {} 3 | struct Component(T); 4 | fn main() { 5 | let ref c = Component(42); 6 | let &Component(ref data) = c as &Component; 7 | } 8 | -------------------------------------------------------------------------------- /fixed/27874.rs: -------------------------------------------------------------------------------- 1 | trait Foo {type S;} 2 | trait Hack: Foo {} 3 | fn takes_hack(x: &Hack) {} 4 | fn main() {} 5 | -------------------------------------------------------------------------------- /fixed/27895.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | let i = 5; 3 | let index = 6; 4 | 5 | match i { 6 | 0...index => println!("winner"), 7 | _ => println!("hello"), 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /fixed/27901.rs: -------------------------------------------------------------------------------- 1 | trait Stream { type Item; } 2 | impl<'a> Stream for &'a str { type Item = char; } 3 | fn f<'s>(_: &'s str) -> (&'s str, <&'s str as Stream>::Item) { loop {}} 4 | fn main() { 5 | f as for<'t> fn(&'t str) -> (&'t str, <&'t str as Stream>::Item); 6 | } 7 | -------------------------------------------------------------------------------- /fixed/27987.rs: -------------------------------------------------------------------------------- 1 | pub struct S; 2 | impl S { 3 | pub fn f<'a>(&self, f: &'a f32) where u32: PartialEq<&'a f32> { 4 | 4==f; 5 | } 6 | } 7 | fn main() {} 8 | -------------------------------------------------------------------------------- /fixed/28089.rs: -------------------------------------------------------------------------------- 1 | #![feature(plugin)] 2 | #![plugin(docopt_macros)] 3 | 4 | docopt!(Args, " 5 | Usage: foo (--help | --version) 6 | 7 | Options: 8 | -h, --help Show this message 9 | --version Show the version of foo 10 | "); 11 | -------------------------------------------------------------------------------- /fixed/28104.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | std::u8::MAX; 3 | } 4 | 5 | -------------------------------------------------------------------------------- /fixed/28189.rs: -------------------------------------------------------------------------------- 1 | struct S(T) where [T; (||{}, 1).1]: Copy; 2 | fn main() {} 3 | -------------------------------------------------------------------------------- /fixed/28308.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | assert!("test"); 3 | } 4 | -------------------------------------------------------------------------------- /fixed/28324.rs: -------------------------------------------------------------------------------- 1 | extern { 2 | static error_message_count: u32; // anything will do 3 | } 4 | pub static BAZ: u32 = *&error_message_count; 5 | fn main() {} 6 | -------------------------------------------------------------------------------- /fixed/28347.rs: -------------------------------------------------------------------------------- 1 | use std::rc::Rc; 2 | use std::cell::RefCell; 3 | 4 | fn main() { 5 | let mut a = 0; 6 | let fs = vec![Rc::new(RefCell::new(Box::new(|| a = 4 )))]; 7 | 8 | fs.iter().map(|f| { 9 | let mut closure = f.borrow_mut(); 10 | (&mut *closure)() 11 | }); 12 | } 13 | -------------------------------------------------------------------------------- /fixed/28502.rs: -------------------------------------------------------------------------------- 1 | pub struct Handle { 2 | pub ptr: *const u32, 3 | } 4 | 5 | pub struct ObjectOpResult; 6 | impl ObjectOpResult { 7 | pub extern "C" fn test(_obj: Handle) { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /fixed/28575.rs: -------------------------------------------------------------------------------- 1 | extern { pub static FOO: extern "rust-intrinsic" fn(); } 2 | fn main() { FOO() } 3 | -------------------------------------------------------------------------------- /fixed/28600.rs: -------------------------------------------------------------------------------- 1 | struct Test; 2 | 3 | impl Test { 4 | pub extern fn test(val: &str) { 5 | 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /fixed/28604.rs: -------------------------------------------------------------------------------- 1 | #![feature(asm)] 2 | 3 | #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] 4 | fn get_timer() -> i32 { 5 | let tsc: i32; 6 | unsafe { 7 | asm!("nop": "=a"(tsc)); 8 | } 9 | tsc 10 | } 11 | 12 | fn main() { 13 | println!("Val: {}", get_timer()); 14 | } 15 | -------------------------------------------------------------------------------- /fixed/28751.rs: -------------------------------------------------------------------------------- 1 | struct DataType { 2 | data: *mut (), 3 | } 4 | 5 | unsafe impl Sync for DataType {} 6 | 7 | static mut EXTRA_DATA: () = (); 8 | 9 | static DATA : DataType = DataType { 10 | data: unsafe { &mut EXTRA_DATA } 11 | }; 12 | 13 | fn main() { 14 | } 15 | -------------------------------------------------------------------------------- /fixed/28804.rs: -------------------------------------------------------------------------------- 1 | extern { 2 | fn f(_: &(::std::any::Any + Send)); 3 | } 4 | fn main() { } 5 | -------------------------------------------------------------------------------- /fixed/28971.rs: -------------------------------------------------------------------------------- 1 | enum Foo { 2 | Bar(u8) 3 | } 4 | fn main(){ 5 | foo(|| { 6 | match Foo::Bar(1) { 7 | Foo::Baz(..) => (), //~ ERROR no associated 8 | _ => (), 9 | } 10 | }); 11 | } 12 | 13 | fn foo(f: F) where F: FnMut() { 14 | f(); 15 | } 16 | -------------------------------------------------------------------------------- /fixed/29115.rs: -------------------------------------------------------------------------------- 1 | extern "Rust" { 2 | fn foo(); 3 | } 4 | 5 | pub extern fn bar() { 6 | unsafe { 7 | foo(); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /fixed/29161.rs: -------------------------------------------------------------------------------- 1 | mod a { 2 | struct A; 3 | 4 | impl Default for A { 5 | pub fn default() -> A { 6 | A; 7 | } 8 | } 9 | } 10 | 11 | 12 | fn main() { 13 | a::A::default(); 14 | } 15 | -------------------------------------------------------------------------------- /fixed/29184.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | let x: typeof(92) = 92; 3 | } 4 | -------------------------------------------------------------------------------- /fixed/29191.rs: -------------------------------------------------------------------------------- 1 | enum Binding {} 2 | 3 | fn main() { 4 | |binding: Binding| { 5 | if let Binding::None = binding {}; 6 | }; 7 | } 8 | -------------------------------------------------------------------------------- /fixed/29276.rs: -------------------------------------------------------------------------------- 1 | struct S([u8; {struct Z; 0 }]); 2 | 3 | fn main() {} 4 | -------------------------------------------------------------------------------- /fixed/29595.rs: -------------------------------------------------------------------------------- 1 | #![feature(associated_consts)] 2 | 3 | trait Tr { 4 | const C: Self; 5 | } 6 | 7 | fn main() { 8 | let a: u8 = Tr::C; 9 | } 10 | -------------------------------------------------------------------------------- /fixed/29914.rs: -------------------------------------------------------------------------------- 1 | const ARR: [usize; 5] = [5, 4, 3, 2, 1]; 2 | 3 | fn main() { 4 | println!("{}", ARR[ARR[3]]); 5 | } 6 | -------------------------------------------------------------------------------- /fixed/29924.rs: -------------------------------------------------------------------------------- 1 | #![feature(const_fn, associated_consts)] 2 | 3 | trait Trait { 4 | const N: usize; 5 | } 6 | 7 | impl Trait { 8 | const fn n() -> usize { Self::N } 9 | } 10 | 11 | fn main() { 12 | } 13 | -------------------------------------------------------------------------------- /fixed/30276.rs: -------------------------------------------------------------------------------- 1 | struct Test([i32]); 2 | fn main() { 3 | let x = Test; 4 | } 5 | -------------------------------------------------------------------------------- /fixed/30386.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | let _ = &*"string"; 3 | } 4 | -------------------------------------------------------------------------------- /fixed/43408.rs: -------------------------------------------------------------------------------- 1 | #![feature(const_fn)] 2 | pub const fn sof() -> usize { 3 | 10 4 | } 5 | 6 | pub fn to_byte_array() -> [u8; sof::()] { 7 | panic!() 8 | } 9 | 10 | fn main() {} 11 | -------------------------------------------------------------------------------- /fixed/45814.rs: -------------------------------------------------------------------------------- 1 | #![feature(specialization)] 2 | 3 | pub trait Trait { } 4 | 5 | default impl Trait for U { } 6 | 7 | impl Trait<::Item> for T { } 8 | 9 | fn main() { } 10 | -------------------------------------------------------------------------------- /fixed/46511.rs: -------------------------------------------------------------------------------- 1 | struct Foo<'a> 2 | { 3 | a: [u8; std::mem::size_of::<&'a mut u8>()] 4 | } 5 | -------------------------------------------------------------------------------- /fixed/47814.rs: -------------------------------------------------------------------------------- 1 | struct ArpIPv4<'a> { 2 | s: &'a u8 3 | } 4 | 5 | impl<'a> ArpIPv4<'a> { 6 | const LENGTH: usize = 20; 7 | 8 | pub fn to_buffer() -> [u8; Self::LENGTH] { 9 | unimplemented!() 10 | } 11 | } 12 | 13 | fn main() {} 14 | -------------------------------------------------------------------------------- /fixed/49362.rs: -------------------------------------------------------------------------------- 1 | #![feature(generic_associated_types)] 2 | 3 | struct S; 4 | 5 | trait Trait { 6 | type Associated<'a>; 7 | } 8 | 9 | impl Trait for S { 10 | type Associated<'a> = &'a (); 11 | } 12 | 13 | fn main() {} 14 | -------------------------------------------------------------------------------- /fixed/51173.rs: -------------------------------------------------------------------------------- 1 | macro_rules! bug { 2 | ( $doc:expr ) => { #[doc = $doc] enum Bug {} } 3 | } 4 | 5 | bug! { (stringify!(bug)) } 6 | 7 | fn main() {} 8 | -------------------------------------------------------------------------------- /fixed/51892.rs: -------------------------------------------------------------------------------- 1 | #![feature(specialization)] 2 | 3 | pub trait Trait { 4 | type Type; 5 | } 6 | 7 | impl Trait for T { 8 | default type Type = [u8; 1]; 9 | } 10 | 11 | impl Trait for *const T { 12 | type Type = [u8; std::mem::size_of::<::Type>()]; 13 | } 14 | -------------------------------------------------------------------------------- /fixed/52334.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | rustc -Z mir-opt-level=0 - << EOF 4 | type Foo = extern "C" fn(::std::ffi::CStr); 5 | extern "C" { 6 | fn meh(blah: Foo); 7 | } 8 | 9 | fn main() { 10 | meh as usize; 11 | } 12 | EOF 13 | -------------------------------------------------------------------------------- /fixed/52808.rs: -------------------------------------------------------------------------------- 1 | struct Foo<'a> { x: &'a () } 2 | 3 | impl<'a> Foo<'a> { 4 | const X: usize = 0; 5 | 6 | fn foo(_: [u8; Self::X]) {} 7 | } 8 | 9 | 10 | fn main() {} 11 | -------------------------------------------------------------------------------- /fixed/52843.rs: -------------------------------------------------------------------------------- 1 | #![feature(type_alias_impl_trait)] 2 | 3 | type Foo = impl Default; 4 | 5 | #[allow(unused)] 6 | fn foo(t: T) -> Foo { 7 | t 8 | } 9 | 10 | struct NotDefault; 11 | 12 | fn main() { 13 | let _ = Foo::::default(); 14 | } 15 | -------------------------------------------------------------------------------- /fixed/53448.rs: -------------------------------------------------------------------------------- 1 | #![feature(unboxed_closures)] 2 | 3 | trait Lt<'a> { 4 | type T; 5 | } 6 | impl<'a> Lt<'a> for () { 7 | type T = (); 8 | } 9 | 10 | fn main() { 11 | let v:<() as Lt<'_>>::T = (); 12 | let f:&mut FnMut<(_,),Output=()> = &mut |_:<() as Lt<'_>>::T|{}; 13 | f(v); 14 | } 15 | -------------------------------------------------------------------------------- /fixed/53475.rs: -------------------------------------------------------------------------------- 1 | #![feature(coerce_unsized)] 2 | 3 | use std::ops::CoerceUnsized; 4 | use std::any::Any; 5 | 6 | struct Foo { 7 | data: Box 8 | } 9 | 10 | impl CoerceUnsized> for Foo {} 11 | 12 | fn main() {} 13 | -------------------------------------------------------------------------------- /fixed/54038.rs: -------------------------------------------------------------------------------- 1 | struct Foo<'a> { 2 | data: &'a [u8], 3 | } 4 | 5 | impl<'a> Foo<'a> { 6 | const LEN: usize = 4; 7 | fn bar(buf: &mut [u8; Self::LEN]) { 8 | unimplemented!() 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /fixed/54840.rs: -------------------------------------------------------------------------------- 1 | #![feature(impl_trait_in_bindings)] 2 | 3 | use std::ops::Add; 4 | 5 | fn main() { 6 | let i: i32 = 0; 7 | let j: &impl Add = &i; 8 | } 9 | -------------------------------------------------------------------------------- /fixed/54895.rs: -------------------------------------------------------------------------------- 1 | trait Trait<'a> { 2 | type Out; 3 | } 4 | impl<'a> Trait<'a> for () { 5 | type Out = (); 6 | } 7 | fn main() -> impl for<'a> Trait<'a, Out = impl ?Sized + 'a> { 8 | () 9 | } 10 | -------------------------------------------------------------------------------- /fixed/56445-1.rs: -------------------------------------------------------------------------------- 1 | struct OnDiskDirEntry<'a> { _s: &'a usize } 2 | 3 | impl<'a> OnDiskDirEntry<'a> { 4 | const LFN_FRAGMENT_LEN: usize = 2; 5 | 6 | fn lfn_contents(&self) -> [char; Self::LFN_FRAGMENT_LEN] { loop { } } 7 | } 8 | 9 | fn main() {} 10 | -------------------------------------------------------------------------------- /fixed/56445-2.rs: -------------------------------------------------------------------------------- 1 | #![feature(const_generics)] 2 | #![crate_type = "lib"] 3 | 4 | use core::marker::PhantomData; 5 | 6 | struct Bug<'a, const S: &'a str>(PhantomData<&'a ()>); 7 | 8 | impl Bug<'_, ""> {} 9 | -------------------------------------------------------------------------------- /fixed/56445-3.rs: -------------------------------------------------------------------------------- 1 | #![crate_type = "lib"] 2 | 3 | pub struct Memory<'rom> { 4 | rom: &'rom [u8], 5 | ram: [u8; Self::SIZE], 6 | } 7 | 8 | impl<'rom> Memory<'rom> { 9 | pub const SIZE: usize = 0x8000; 10 | } 11 | -------------------------------------------------------------------------------- /fixed/57200.rs: -------------------------------------------------------------------------------- 1 | #![feature(impl_trait_in_bindings)] 2 | 3 | fn bug<'a, 'b, T>() 4 | where 5 | 'a: 'b, 6 | { 7 | let f: impl Fn(&'a T) -> &'b T = |x| x; 8 | } 9 | 10 | 11 | fn main() {} 12 | -------------------------------------------------------------------------------- /fixed/57201.rs: -------------------------------------------------------------------------------- 1 | #![feature(impl_trait_in_bindings)] 2 | 3 | fn bug<'a, 'b, T>() 4 | where 5 | 'a: 'b, 6 | { 7 | let f: &impl Fn(&'a T) -> &'b T = &|x| x; 8 | } 9 | 10 | fn main() {} 11 | -------------------------------------------------------------------------------- /fixed/57404.rs: -------------------------------------------------------------------------------- 1 | #![feature(unboxed_closures)] 2 | #![feature(fn_traits)] 3 | 4 | fn main() { 5 | let handlers: Option FnMut<&'a mut (), Output=()>>> = None; 6 | handlers.unwrap().as_mut().call_mut(&mut ()); 7 | } 8 | -------------------------------------------------------------------------------- /fixed/58094.rs: -------------------------------------------------------------------------------- 1 | #[Ѕ -------------------------------------------------------------------------------- /fixed/58355.rs: -------------------------------------------------------------------------------- 1 | #![crate_type = "lib"] 2 | 3 | pub fn foo(callback: fn() -> ToString) { 4 | let mut x: Option ToString>> = None; 5 | x = Some(Box::new(callback)); 6 | } 7 | -------------------------------------------------------------------------------- /fixed/58956.rs: -------------------------------------------------------------------------------- 1 | #![feature(impl_trait_in_bindings)] 2 | 3 | trait Lam {} 4 | 5 | pub struct B; 6 | impl Lam for B {} 7 | pub struct Wrap(T); 8 | 9 | const _A: impl Lam = { 10 | let x: Wrap = Wrap(B); 11 | x.0 12 | }; 13 | 14 | fn main() {} 15 | -------------------------------------------------------------------------------- /fixed/58987-1.rs: -------------------------------------------------------------------------------- 1 | use std::mem; 2 | 3 | fn foo(t: T) { 4 | let _ = [(); 0 - !(mem::size_of::<&T>() == mem::size_of::<[usize; 2]>()) as usize]; 5 | } 6 | 7 | fn main() {} 8 | -------------------------------------------------------------------------------- /fixed/58987-2.rs: -------------------------------------------------------------------------------- 1 | struct A { 2 | field: [u8; f::<&T>()], 3 | } 4 | fn f() -> usize { 0 } 5 | 6 | fn main() {} 7 | -------------------------------------------------------------------------------- /fixed/58987-3.rs: -------------------------------------------------------------------------------- 1 | #![feature(const_generics)] 2 | 3 | struct NibblePack ([u8; N / 1]); 4 | 5 | fn main() {} 6 | -------------------------------------------------------------------------------- /fixed/58987-4.rs: -------------------------------------------------------------------------------- 1 | pub struct Matrix { 2 | inner: [T; R * C] 3 | } 4 | 5 | fn main() {} 6 | -------------------------------------------------------------------------------- /fixed/59353.rs: -------------------------------------------------------------------------------- 1 | pub struct Node>(NodeRef); 2 | 3 | pub struct Foo(Node); 4 | 5 | fn main() {} 6 | -------------------------------------------------------------------------------- /fixed/59956-2.rs: -------------------------------------------------------------------------------- 1 | struct Bug; 2 | impl Bug {} 3 | 4 | fn main() {} 5 | -------------------------------------------------------------------------------- /fixed/59996.rs: -------------------------------------------------------------------------------- 1 | const FOO: &&&u32 = &&&42; 2 | 3 | fn main() { 4 | match unimplemented!() { 5 | &&&42 => {}, 6 | FOO => {}, 7 | _ => {}, 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /fixed/60473.rs: -------------------------------------------------------------------------------- 1 | #![feature(impl_trait_in_bindings)] 2 | 3 | struct A<'a>(&'a ()); 4 | 5 | trait Trait { 6 | } 7 | 8 | impl Trait for () { 9 | } 10 | 11 | fn main() { 12 | let x: impl Trait = (); 13 | } 14 | -------------------------------------------------------------------------------- /fixed/60619.rs: -------------------------------------------------------------------------------- 1 | pub struct Foo { 2 | buf: [u8; {LEN * 2}] 3 | } 4 | 5 | fn main() {} 6 | -------------------------------------------------------------------------------- /fixed/60814.rs: -------------------------------------------------------------------------------- 1 | #![feature(const_generics)] 2 | 3 | pub fn function_with_str<'a, const STRING: &'a str>() { 4 | } 5 | 6 | pub fn use_it() { 7 | function_with_str::<"Hello, world!">() 8 | } 9 | 10 | fn main() {} 11 | -------------------------------------------------------------------------------- /fixed/61335.rs: -------------------------------------------------------------------------------- 1 | #![feature(async_await)] 2 | #![feature(unsized_locals)] 3 | 4 | async fn f() {} 5 | 6 | async fn g(x: Box) { 7 | let _x = *x; 8 | f().await; 9 | } 10 | 11 | fn main() { 12 | let _a = g(Box::new(5)); 13 | } 14 | -------------------------------------------------------------------------------- /fixed/61368.rs: -------------------------------------------------------------------------------- 1 | #![feature(const_generics)] 2 | 3 | struct Stack { 4 | stack: [u64; N / 8], 5 | } 6 | 7 | fn main() {} 8 | -------------------------------------------------------------------------------- /fixed/61455.rs: -------------------------------------------------------------------------------- 1 | #![feature(const_generics)] 2 | #![feature(const_compare_raw_pointers)] 3 | 4 | use std::mem::transmute; 5 | 6 | struct Bug; 7 | 8 | fn main() { 9 | let x = Bug::<{ 10 | unsafe { transmute(|x: u8| {}) } 11 | 12 | }>; 13 | } 14 | -------------------------------------------------------------------------------- /fixed/61747.rs: -------------------------------------------------------------------------------- 1 | #![feature(const_generics)] 2 | 3 | struct Const; 4 | 5 | impl Const<{C}> { 6 | fn successor() -> Const<{C + 1}> { 7 | Const 8 | } 9 | } 10 | 11 | fn main() { 12 | Const::<1>::successor(); 13 | } 14 | -------------------------------------------------------------------------------- /fixed/61774.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | let _: [_; unsafe { std::mem::transmute(|| {}) }]; 3 | } 4 | -------------------------------------------------------------------------------- /fixed/62200.rs: -------------------------------------------------------------------------------- 1 | pub trait SIterator {} 2 | 3 | pub trait Ty<'a> { 4 | type V; 5 | } 6 | 7 | struct FilterMap(F); 8 | 9 | impl SIterator for FilterMap 10 | where 11 | F: FnOnce(>::V) -> Option<>::V> 12 | {} 13 | 14 | fn main() {} 15 | -------------------------------------------------------------------------------- /fixed/62480.rs: -------------------------------------------------------------------------------- 1 | #![feature(label_break_value)] 2 | 3 | fn main() { 4 | 'a: { 5 | || break 'a 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /fixed/62521-1.rs: -------------------------------------------------------------------------------- 1 | #![crate_type = "lib"] 2 | 3 | #![feature(generic_associated_types)] 4 | trait Iterator { 5 | type Item<'a>: 'a; 6 | } 7 | -------------------------------------------------------------------------------- /fixed/62521-2.rs: -------------------------------------------------------------------------------- 1 | #![crate_type = "lib"] 2 | 3 | #![feature(generic_associated_types)] 4 | trait Foo { 5 | type PublicKey<'a> : From<&'a [u8]>; 6 | } 7 | -------------------------------------------------------------------------------- /fixed/62521-3.rs: -------------------------------------------------------------------------------- 1 | #![crate_type = "lib"] 2 | 3 | #![feature(generic_associated_types)] 4 | struct Foo; 5 | 6 | impl Iterator for Foo { 7 | type Item<'b> = &'b Foo; 8 | 9 | fn next(&mut self) -> Option { 10 | None 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /fixed/62524-1.rs: -------------------------------------------------------------------------------- 1 | fn main((ؼ -------------------------------------------------------------------------------- /fixed/62524-2.rs: -------------------------------------------------------------------------------- 1 | y![ 2 | Ϥ, -------------------------------------------------------------------------------- /fixed/62529-10.rs: -------------------------------------------------------------------------------- 1 | trait Mirror { type Image; } 2 | impl Mirror for T { type Image = T; } 3 | 4 | fn test(l: L) where L: FnOnce(Option<<&T as Mirror>::Image>), 5 | for<'a> &'a T: Mirror 6 | { l(None); } 7 | fn main() { 8 | test::<_,u8>(|_| {}); 9 | } 10 | -------------------------------------------------------------------------------- /fixed/62579.rs: -------------------------------------------------------------------------------- 1 | #![feature(const_generics)] 2 | struct NoMatch; 3 | 4 | fn foo() -> bool { 5 | return true 6 | } 7 | 8 | fn main() { 9 | foo::<{NoMatch}>(); 10 | } 11 | -------------------------------------------------------------------------------- /fixed/62708.rs: -------------------------------------------------------------------------------- 1 | pub struct MultiDriver { 2 | d: [std::marker::PhantomData; MultiDriver::::MAX_DRIVERS], 3 | } 4 | 5 | impl MultiDriver { 6 | const MAX_DRIVERS: usize = 10; 7 | } 8 | -------------------------------------------------------------------------------- /fixed/62767.rs: -------------------------------------------------------------------------------- 1 | mod foo { 2 | pub enum Foo { 3 | Foo(i32), 4 | } 5 | } 6 | use foo::*; 7 | use Foo::Foo; 8 | -------------------------------------------------------------------------------- /fixed/62879.rs: -------------------------------------------------------------------------------- 1 | #![feature(const_generics)] 2 | 3 | fn foo() {} 4 | 5 | fn bar() { 6 | foo::<1, {[1]}>(); 7 | } 8 | 9 | fn main() {} 10 | -------------------------------------------------------------------------------- /fixed/63116.rs: -------------------------------------------------------------------------------- 1 | impl W impl Into<<() as Trait>::Assoc> {} 10 | 11 | pub fn ice() { 12 | Into::into(unit()); 13 | } 14 | 15 | fn main() {} 16 | -------------------------------------------------------------------------------- /fixed/63263.rs: -------------------------------------------------------------------------------- 1 | #![feature(type_alias_impl_trait)] 2 | 3 | pub type Closure = impl FnOnce(); 4 | 5 | fn main() { 6 | || -> Closure { || () }; 7 | } 8 | -------------------------------------------------------------------------------- /fixed/63279.rs: -------------------------------------------------------------------------------- 1 | #![feature(type_alias_impl_trait)] 2 | 3 | type Closure = impl FnOnce(); 4 | 5 | fn c() -> Closure { 6 | || -> Closure { || () } 7 | } 8 | 9 | fn main() {} 10 | -------------------------------------------------------------------------------- /fixed/63300.rs: -------------------------------------------------------------------------------- 1 | trait Functor { 2 | type HigherSelf: Functor; 3 | } 4 | -------------------------------------------------------------------------------- /fixed/63322.rs: -------------------------------------------------------------------------------- 1 | #![feature(const_generics)] 2 | 3 | trait A {} 4 | struct B; 5 | impl A for B {} 6 | 7 | fn test() { 8 | unimplemented!() 9 | } 10 | 11 | fn main() { 12 | test::<{ &B }>(); 13 | } 14 | -------------------------------------------------------------------------------- /fixed/63900.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo 'include!(""); pub fn main(){}' | rustc - 4 | -------------------------------------------------------------------------------- /fixed/64173.rs: -------------------------------------------------------------------------------- 1 | use std::mem::size_of; 2 | 3 | struct Bug<'s> { 4 | array: [(); size_of::<&Self>()], 5 | } 6 | 7 | fn main() {} 8 | -------------------------------------------------------------------------------- /fixed/64537.rs: -------------------------------------------------------------------------------- 1 | #![feature(const_generics)] 2 | 3 | struct S; 4 | 5 | impl S { 6 | pub fn x() {} 7 | pub fn y() { 8 | Self::x::<{3usize}>(); 9 | } 10 | } 11 | 12 | fn main() {} 13 | -------------------------------------------------------------------------------- /fixed/64755.rs: -------------------------------------------------------------------------------- 1 | struct Foo; 2 | 3 | trait MyTrait { 4 | type Item; 5 | } 6 | 7 | impl MyTrait for Foo { 8 | type Item = T; 9 | } 10 | -------------------------------------------------------------------------------- /fixed/64784.rs: -------------------------------------------------------------------------------- 1 | #![feature(decl_macro)] 2 | 3 | pub macro m($i:ident, $j:ident) { 4 | mod $i { 5 | pub use crate::$j::*; 6 | pub struct A; 7 | } 8 | } 9 | 10 | m!(x, y); 11 | m!(y, x); 12 | -------------------------------------------------------------------------------- /fixed/65025.rs: -------------------------------------------------------------------------------- 1 | unsafe fn setup_boostrap_code(args: &A) { 2 | extern "C" { 3 | static xxx: *const A; 4 | } 5 | // Arguments 6 | let arg1_pointer_new: *const u64 = core::mem::transmute(&xxx); 7 | } 8 | 9 | fn main() {} 10 | -------------------------------------------------------------------------------- /fixed/65035.rs: -------------------------------------------------------------------------------- 1 | fn _f() { 2 | extern "C" { 3 | static _a: *const T; 4 | } 5 | } 6 | 7 | fn main() {} 8 | -------------------------------------------------------------------------------- /fixed/65159.rs: -------------------------------------------------------------------------------- 1 | async fn copy() -> Result<()> 2 | { 3 | Ok(()) 4 | } 5 | 6 | 7 | fn main() {} 8 | -------------------------------------------------------------------------------- /fixed/65348.rs: -------------------------------------------------------------------------------- 1 | struct ArrayType(T); 2 | 3 | impl ArrayType { 4 | const ARRAY: [T; 0] = []; 5 | } 6 | 7 | pub const fn bug() -> &'static T { 8 | &ArrayType::::ARRAY[0] 9 | } 10 | 11 | fn main() { 12 | bug::(); 13 | } 14 | -------------------------------------------------------------------------------- /fixed/65383.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | 'lab: loop { 3 | || { 4 | break 'lab; 5 | }; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /fixed/65394.rs: -------------------------------------------------------------------------------- 1 | const _: Vec = { 2 | let x = Vec::::new(); 3 | let r = &mut x; 4 | let y = x; 5 | y 6 | }; 7 | 8 | fn main() {} 9 | -------------------------------------------------------------------------------- /fixed/65462.rs: -------------------------------------------------------------------------------- 1 | enum Empty {} 2 | enum Enum { 3 | Empty( Empty ) 4 | } 5 | 6 | fn foobar() -> Option< Enum > { 7 | let value: Option< Empty > = None; 8 | Some( Enum::Empty( value? ) ) 9 | } 10 | 11 | fn main() { 12 | foobar(); 13 | } 14 | -------------------------------------------------------------------------------- /fixed/65561.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | test(); 3 | } 4 | 5 | fn test() -> impl TraitA { 6 | test() 7 | } 8 | 9 | trait TraitA {} 10 | -------------------------------------------------------------------------------- /fixed/65679.rs: -------------------------------------------------------------------------------- 1 | #![feature(type_alias_impl_trait)] 2 | 3 | type Fut = impl std::future::Future; 4 | 5 | fn take(_: fn() -> Fut) {} 6 | 7 | fn main() { 8 | take(|| {}); 9 | take(|| {}); 10 | } 11 | -------------------------------------------------------------------------------- /fixed/66152.rs: -------------------------------------------------------------------------------- 1 | fn main() {} 2 | 3 | const fn foo() -> usize { 0 } 4 | 5 | struct S<'a> { 6 | beta: [(); foo::<&'a ()>()], 7 | } 8 | -------------------------------------------------------------------------------- /fixed/66205.rs: -------------------------------------------------------------------------------- 1 | #![feature(const_generics)] 2 | 3 | fn fact() { 4 | fact::<{ N - 1 }>(); 5 | } 6 | 7 | fn main() {} 8 | -------------------------------------------------------------------------------- /fixed/66270.rs: -------------------------------------------------------------------------------- 1 | struct Bug { 2 | incorrect_field: 0, 3 | } 4 | 5 | struct Empty {} 6 | 7 | fn main() { 8 | let Bug { 9 | any_field: Empty {}, 10 | } = Bug {}; 11 | } 12 | -------------------------------------------------------------------------------- /fixed/66340.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | println!("main."); 3 | foo(); // remove this line for compiler output A 4 | } 5 | 6 | #[deprecated(note=test)] 7 | fn foo(){ 8 | println!("Hello, world"); 9 | } 10 | -------------------------------------------------------------------------------- /fixed/66357.rs: -------------------------------------------------------------------------------- 1 | fn f() { |[](* } 2 | -------------------------------------------------------------------------------- /fixed/66367.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | mkdir temp 4 | cd temp 5 | touch lib.rs 6 | rustc +nightly lib.rs --crate-type=lib -C incremental=incr 7 | rustc +nightly lib.rs --crate-type=lib -C incremental=incr -C save-temps 8 | -------------------------------------------------------------------------------- /fixed/66371.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | mkdir temp 4 | cd temp 5 | touch lib.rs 6 | rustc +nightly lib.rs --crate-type=lib -C incremental=incr -C lto=thin 7 | rustc +nightly lib.rs --crate-type=lib -C incremental=incr -C lto=thin 8 | -------------------------------------------------------------------------------- /fixed/66387.rs: -------------------------------------------------------------------------------- 1 | async fn f() -> i32 { 2 | if true { 3 | return 0; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /fixed/66473.rs: -------------------------------------------------------------------------------- 1 | #͈ 2 | 6 -------------------------------------------------------------------------------- /fixed/66500.rs: -------------------------------------------------------------------------------- 1 | union U<'a> { 2 | x: &'a String, 3 | } 4 | 5 | fn f(u: U<'_>) -> String { 6 | unsafe { *u.x } 7 | } 8 | 9 | fn main() {} 10 | -------------------------------------------------------------------------------- /fixed/66501-1.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | const CONST: &[(); 1] = &[()]; 3 | match &[()] { 4 | &[()] => {} 5 | CONST => {} 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /fixed/66501-2.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | const CONST: &[Option<()>; 1] = &[Some(())]; 3 | match &[Some(())] { 4 | &[None] => {} 5 | CONST => {} 6 | &[Some(())] => {} 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /fixed/66580.rs: -------------------------------------------------------------------------------- 1 | #![feature(type_alias_impl_trait)] 2 | 3 | type Closure = impl FnOnce(); 4 | 5 | fn closure() -> Closure { 6 | || {} 7 | } 8 | 9 | struct Wrap { f: T } 10 | 11 | impl Wrap {} 12 | 13 | impl Wrap {} 14 | 15 | fn main() {} 16 | -------------------------------------------------------------------------------- /fixed/66693.rs: -------------------------------------------------------------------------------- 1 | #![feature(const_panic)] 2 | 3 | const C: () = { 4 | panic!(1234); 5 | }; 6 | 7 | fn main() {} 8 | -------------------------------------------------------------------------------- /fixed/66695.rs: -------------------------------------------------------------------------------- 1 | #![crate_type = "lib"] 2 | 3 | static CODEGEN: &[()] = &[]; 4 | 5 | async fn manual() { 6 | CODEGEN[async { 0 }.await]; 7 | } 8 | -------------------------------------------------------------------------------- /fixed/66696.rs: -------------------------------------------------------------------------------- 1 | // This is ICE deliberately. 2 | 3 | #![feature(unboxed_closures)] 4 | fn main() { 5 | unsafe { std::mem::transmute::(5); } 6 | } 7 | -------------------------------------------------------------------------------- /fixed/66706-1.rs: -------------------------------------------------------------------------------- 1 | fn bug() { 2 | [0; [|&_: _ &_| {}; 0 ].len()] 3 | } 4 | 5 | fn main() {} 6 | -------------------------------------------------------------------------------- /fixed/66706-2.rs: -------------------------------------------------------------------------------- 1 | fn bug() { 2 | [0; match [|f @ &ref _| () ] {} ] 3 | } 4 | 5 | fn main() {} 6 | -------------------------------------------------------------------------------- /fixed/66930-1.rs: -------------------------------------------------------------------------------- 1 | #![crate_type = "lib"] 2 | 3 | static UTF8_CHAR_WIDTH: [u8; 0] = []; 4 | 5 | pub fn utf8_char_width(b: u8) -> usize { 6 | UTF8_CHAR_WIDTH[b as usize] as usize 7 | } 8 | -------------------------------------------------------------------------------- /fixed/66930-2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rustc --emit mir --crate-type lib - << END 4 | static UTF8_CHAR_WIDTH: [u8; 0] = []; 5 | 6 | pub fn utf8_char_width(b: u8) -> usize { 7 | UTF8_CHAR_WIDTH[b as usize] as usize 8 | } 9 | END 10 | -------------------------------------------------------------------------------- /fixed/66962.rs: -------------------------------------------------------------------------------- 1 | #![feature(const_generics)] 2 | 3 | #[derive(PartialEq, Eq)] 4 | struct Config { 5 | arr_size: usize 6 | } 7 | 8 | struct B { 9 | arr: [u8; {CFG.arr_size}] 10 | } 11 | 12 | fn main() {} 13 | -------------------------------------------------------------------------------- /fixed/67019.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rustc +nightly --edition 2018 -Z mir-opt-level=3 - << EOF 4 | fn test(this: ((u8, u8),)) { 5 | assert!((this.0).1 == 0); 6 | } 7 | fn main() { 8 | test(((1, 2),)); 9 | } 10 | 11 | EOF 12 | -------------------------------------------------------------------------------- /fixed/67158.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | async { yield print!(":C") }; 3 | } 4 | -------------------------------------------------------------------------------- /fixed/67166.rs: -------------------------------------------------------------------------------- 1 | #![feature(impl_trait_in_bindings)] 2 | 3 | #[allow(dead_code)] 4 | fn run() { 5 | let _foo: Box = Box::new(()); 6 | } 7 | 8 | fn main() {} 9 | -------------------------------------------------------------------------------- /fixed/67375.rs: -------------------------------------------------------------------------------- 1 | struct Bug { 2 | inner: [(); { [|_: &T| {}; 0].len() }], 3 | } 4 | 5 | fn main() {} 6 | -------------------------------------------------------------------------------- /fixed/67377.rs: -------------------------------------------------------------------------------- 1 | use std::marker::PhantomData; 2 | 3 | enum Bug { 4 | V = [PhantomData; { [ () ].len() ].len() as isize, 5 | // ^ 6 | // + ---- this brace is never closed!!! 7 | } 8 | 9 | fn main() {} 10 | -------------------------------------------------------------------------------- /fixed/67405.rs: -------------------------------------------------------------------------------- 1 | struct Bug { 2 | inner: [(); match || 1 { 3 | n => n(), 4 | }], 5 | } 6 | 7 | fn main() {} 8 | -------------------------------------------------------------------------------- /fixed/67424.rs: -------------------------------------------------------------------------------- 1 | trait Trait1 { 2 | type A; 3 | } 4 | 5 | trait Trait2 { 6 | type Type1: Trait1; 7 | } 8 | 9 | fn main() {} 10 | -------------------------------------------------------------------------------- /fixed/67514.rs: -------------------------------------------------------------------------------- 1 | #![feature(or_patterns)] 2 | 3 | fn foo((Some(_) | None): Option) {} 4 | 5 | fn main() {} 6 | -------------------------------------------------------------------------------- /fixed/67558.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rustc --emit=mir - << END 4 | 5 | // run-pass 6 | 7 | struct S; 8 | 9 | impl S { 10 | const N: usize = 3; 11 | } 12 | 13 | static STUFF: [u8; S::N] = [0; S::N]; 14 | 15 | fn main() { 16 | assert_eq!(STUFF, [0; 3]); 17 | } 18 | 19 | END 20 | -------------------------------------------------------------------------------- /fixed/67844.rs: -------------------------------------------------------------------------------- 1 | trait WithAssoc { type AssocType; } 2 | 3 | trait WithParam {} 4 | 5 | type Return = impl WithAssoc>; 6 | 7 | fn my_fun() -> Return<()> {} 8 | 9 | fn main() {} 10 | -------------------------------------------------------------------------------- /fixed/67858.rs: -------------------------------------------------------------------------------- 1 | #![feature(const_generics)] 2 | #![allow(incomplete_features)] 3 | 4 | pub trait Trait { 5 | type Associated; 6 | } 7 | 8 | pub struct Foo::Associated, const N: u8>(T, A); 9 | 10 | impl Foo { 11 | } 12 | 13 | fn main() {} 14 | -------------------------------------------------------------------------------- /fixed/67945-1.rs: -------------------------------------------------------------------------------- 1 | // original reproducer by DutchGhost 2 | use std::marker::PhantomData; 3 | 4 | use std::mem::{self, MaybeUninit}; 5 | 6 | struct Bug { 7 | A: [(); { 8 | let x: S = MaybeUninit::uninit(); 9 | let b = &*(&x as *const _ as *const S); 10 | 0 11 | }], 12 | } 13 | -------------------------------------------------------------------------------- /fixed/67945-2.rs: -------------------------------------------------------------------------------- 1 | // reduced version by Centril 2 | enum Bug { 3 | Var = { 4 | let x: S = 0; 5 | 0 6 | }, 7 | } 8 | -------------------------------------------------------------------------------- /fixed/67945-3.rs: -------------------------------------------------------------------------------- 1 | // Note: Centril asked in the issue to 2 | // include all variants in a regression test. 3 | 4 | // even more reduced version by Centril 5 | #![feature(type_ascription)] 6 | 7 | enum Bug { 8 | Var = 0: S, 9 | } 10 | -------------------------------------------------------------------------------- /fixed/67945-4.rs: -------------------------------------------------------------------------------- 1 | // reproducer by nikomatsakis 2 | use std::marker::PhantomData; 3 | 4 | use std::mem::{self, MaybeUninit}; 5 | 6 | struct Bug { 7 | A: [(); { 8 | let x: Option> = None; 9 | 0 10 | }], 11 | } 12 | -------------------------------------------------------------------------------- /fixed/67981.rs: -------------------------------------------------------------------------------- 1 | #![feature(unsized_fn_params)] 2 | 3 | fn main() { 4 | let f: fn([u8]) = |_| {}; 5 | 6 | let slice: Box<[u8]> = Box::new([1; 8]); 7 | 8 | f(*slice); 9 | } 10 | -------------------------------------------------------------------------------- /fixed/68025.rs: -------------------------------------------------------------------------------- 1 | // https://github.com/rust-lang/rust/issues/68025 2 | // simplified by Centril 3 | fn foo(_: G, _: Box) 4 | where 5 | F: Fn(), 6 | G: Fn(Box), 7 | { 8 | } 9 | 10 | fn main() { 11 | foo(|f| (*f)(), Box::new(|| {})); 12 | } 13 | -------------------------------------------------------------------------------- /fixed/68060.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | (0..) 3 | .map( 4 | #[target_feature(enable = "")] 5 | |_| (), 6 | ) 7 | .next(); 8 | } 9 | -------------------------------------------------------------------------------- /fixed/68090.rs: -------------------------------------------------------------------------------- 1 | pub fn main() { 2 | |_: ARef| (); 3 | } 4 | 5 | type ARef<'a> = &'a <() as ArrayLength>::ArrayType; 6 | 7 | trait ArrayLength { 8 | type ArrayType; 9 | } 10 | 11 | impl ArrayLength for () { 12 | type ArrayType = u8; 13 | } 14 | -------------------------------------------------------------------------------- /fixed/68091.rs: -------------------------------------------------------------------------------- 1 | macro_rules! x { 2 | ($($c:tt)*) => { 3 | $($c)ö* {} 4 | }; 5 | } 6 | 7 | fn main() { 8 | x!(if); 9 | } 10 | -------------------------------------------------------------------------------- /fixed/68092.rs: -------------------------------------------------------------------------------- 1 | macro_rules! x { 2 | ($($c:tt)*) => { 3 | $($c)ö* 4 | }; 5 | } 6 | 7 | fn main() { 8 | x!(!); 9 | } 10 | -------------------------------------------------------------------------------- /fixed/68296.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rustc -Zmir-opt-level=3 - << END 4 | const FOO: *const u32 = { //~ ERROR any use of this value will cause an error 5 | let x = 42; 6 | &x 7 | }; 8 | 9 | fn main() { 10 | let x = FOO; 11 | } 12 | 13 | END 14 | -------------------------------------------------------------------------------- /fixed/68368.rs: -------------------------------------------------------------------------------- 1 | #![feature(type_alias_impl_trait)] 2 | 3 | trait Trait {} 4 | 5 | type Alias<'a, U> = impl Trait; 6 | 7 | fn f<'a>() -> Alias<'a, ()> {} 8 | 9 | fn main() {} 10 | -------------------------------------------------------------------------------- /fixed/68394.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | let x = 255u8; 3 | let 0u8..=x = 0; 4 | } 5 | -------------------------------------------------------------------------------- /fixed/68396.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | let 1234567890123456789012345678901234567890e-340: f64 = 0.0; 3 | } 4 | -------------------------------------------------------------------------------- /fixed/68398.rs: -------------------------------------------------------------------------------- 1 | #![feature(const_generics)] 2 | 3 | pub type Array = [T; N]; 4 | 5 | pub fn foo() -> Array { 6 | unimplemented!() 7 | } 8 | 9 | fn main() {} 10 | -------------------------------------------------------------------------------- /fixed/68532.rs: -------------------------------------------------------------------------------- 1 | struct A<'a>(&'a ()); 2 | 3 | impl<'a> A<'a> { 4 | const N: usize = 68; 5 | 6 | fn foo(&self) { 7 | let mut b = [0; Self::N]; 8 | } 9 | } 10 | 11 | fn main() {} 12 | -------------------------------------------------------------------------------- /fixed/68538.rs: -------------------------------------------------------------------------------- 1 | #![feature(unsized_fn_params)] 2 | #![crate_type = "lib"] 3 | 4 | pub fn take_unsized_slice(s: [u8]) { 5 | s[0]; 6 | } 7 | -------------------------------------------------------------------------------- /fixed/68542.rs: -------------------------------------------------------------------------------- 1 | struct Bug { 2 | a: [(); (|| { 0 })()] 3 | } 4 | 5 | fn main() {} 6 | -------------------------------------------------------------------------------- /fixed/68543.rs: -------------------------------------------------------------------------------- 1 | #![feature(unsized_fn_params, unsized_locals)] 2 | #![crate_type = "lib"] 3 | 4 | use std::future::Future; 5 | 6 | async fn bug(mut f: dyn Future + Unpin) -> T { 7 | (&mut f).await 8 | } 9 | -------------------------------------------------------------------------------- /fixed/68550.rs: -------------------------------------------------------------------------------- 1 | fn run<'a, A>(x: A) 2 | where 3 | A: 'static, 4 | &'static A: , 5 | { 6 | let _: &'a A = &x; 7 | } 8 | 9 | fn main() {} 10 | -------------------------------------------------------------------------------- /fixed/68596.rs: -------------------------------------------------------------------------------- 1 | #![feature(const_generics)] 2 | #![feature(const_fn)] 3 | 4 | pub struct S(u8); 5 | 6 | impl S { 7 | pub fn get(&self) -> &u8 { 8 | &self.0 9 | } 10 | } 11 | 12 | fn main() { 13 | const A: u8 = 5; 14 | let s = S(0); 15 | 16 | s.get::(); 17 | } 18 | -------------------------------------------------------------------------------- /fixed/68653.rs: -------------------------------------------------------------------------------- 1 | #![feature(generic_associated_types)] 2 | 3 | trait Fun { 4 | type F<'a: 'a>; 5 | } 6 | 7 | impl Fun for T { 8 | type F<'a> = Self; 9 | } 10 | 11 | 12 | fn main() { 13 | } 14 | -------------------------------------------------------------------------------- /fixed/68684-1.rs: -------------------------------------------------------------------------------- 1 | enum Enum { 2 | A(), 3 | } 4 | 5 | impl Enum { 6 | const fn a() -> Self { 7 | return Self::A(); 8 | } 9 | } 10 | 11 | pub fn main() { 12 | const A: Enum = Enum::a(); 13 | } 14 | -------------------------------------------------------------------------------- /fixed/68684-2.rs: -------------------------------------------------------------------------------- 1 | enum _Enum { 2 | A(), 3 | } 4 | 5 | type _E = _Enum; 6 | 7 | const fn _a() -> _Enum { 8 | _E::A() // Changing to `_Enum::A()` makes it compile. 9 | } 10 | 11 | const _A: _Enum = _a(); 12 | 13 | fn main() {} 14 | -------------------------------------------------------------------------------- /fixed/68875.rs: -------------------------------------------------------------------------------- 1 | struct DataWrapper<'a> { 2 | data: &'a [u8; Self::SIZE], 3 | } 4 | 5 | impl DataWrapper<'_> { 6 | const SIZE: usize = 14; 7 | } 8 | 9 | fn main() {} 10 | -------------------------------------------------------------------------------- /fixed/68890.rs: -------------------------------------------------------------------------------- 1 | enum e{A((?'a a+?+l))} 2 | 3 | fn main() {} 4 | -------------------------------------------------------------------------------- /fixed/69092.rs: -------------------------------------------------------------------------------- 1 | #![feature(asm)] 2 | 3 | fn main() { 4 | unsafe { asm!(".ascii \"Xen\0\""); } 5 | } 6 | -------------------------------------------------------------------------------- /fixed/69130.rs: -------------------------------------------------------------------------------- 1 | enum F { 2 | M (§& u8) 3 | } 4 | 5 | fn main() {} 6 | -------------------------------------------------------------------------------- /fixed/69204.rs: -------------------------------------------------------------------------------- 1 | trait IAmATrait { 2 | type Item; 3 | fn function(&self) -> Self::Item; 4 | } 5 | 6 | struct IAmAnObject(usize); 7 | 8 | impl IAmATrait for IAmAnObject { 9 | type Item = _; 10 | fn function(&self) -> Self::Item { 11 | self.0 12 | } 13 | } 14 | 15 | fn main() {} 16 | -------------------------------------------------------------------------------- /fixed/69239.rs: -------------------------------------------------------------------------------- 1 | trait Trait {} 2 | 3 | struct Bug 4 | where 5 | T: Trait<{std::intrinsics::type_name::()}> 6 | { 7 | t: T 8 | } 9 | 10 | fn main() {} 11 | -------------------------------------------------------------------------------- /fixed/69296.rs: -------------------------------------------------------------------------------- 1 | unsafe fn f(ptr: *mut T, new: *mut u8) -> *mut T { 2 | use std::mem; 3 | 4 | let mut parts: [*mut u8; mem::size_of::<*mut T>() / mem::size_of::<*mut u8>()] = 5 | mem::transmute(ptr); 6 | parts[0] = new; 7 | mem::transmute(parts) 8 | } 9 | 10 | fn main() {} 11 | -------------------------------------------------------------------------------- /fixed/69307.rs: -------------------------------------------------------------------------------- 1 | fn block_on(_: F) -> usize { 2 | 0 3 | } 4 | 5 | fn main() { 6 | let mut sum = 0; 7 | sum += block_on(async { 8 | (async {}).await; 9 | 1 10 | }); 11 | } 12 | -------------------------------------------------------------------------------- /fixed/69378.rs: -------------------------------------------------------------------------------- 1 | struct Foo { 0: u8 } 2 | 3 | fn test(f: Foo) { 4 | Foo{foo: 4, ..f}; 5 | } 6 | 7 | fn main() {} 8 | -------------------------------------------------------------------------------- /fixed/69396.rs: -------------------------------------------------------------------------------- 1 | macro_rules! suite { 2 | ( $( $fn:ident; )* ) => { 3 | $( 4 | const A = "A".$fn(); 5 | )* 6 | } 7 | } 8 | 9 | suite! { 10 | len; 11 | is_empty; 12 | } 13 | 14 | fn main() {} 15 | -------------------------------------------------------------------------------- /fixed/69401.rs: -------------------------------------------------------------------------------- 1 | struct Inv<'a> { 2 | x: &'a u8 3 | } 4 | pub trait Foo { 5 | fn no_bound(b: Inv<(b)>); 6 | } 7 | 8 | fn main() {} 9 | -------------------------------------------------------------------------------- /fixed/69414.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rustc -Zsave-analysis - <(PhantomData<[T; N]>); //~ ERROR const generics are unstable 7 | //~^ ERROR the types of const generic parameters must derive `PartialEq` and `Eq` 8 | 9 | fn main() {} 10 | END 11 | -------------------------------------------------------------------------------- /fixed/69487-2.rs: -------------------------------------------------------------------------------- 1 | struct Bug { 2 | A: [(); { 3 | let x: usize; 4 | x 5 | }], 6 | } 7 | 8 | fn main() {} 9 | -------------------------------------------------------------------------------- /fixed/69487-3.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | [9; || [9; []]]; 3 | } 4 | -------------------------------------------------------------------------------- /fixed/69490.rs: -------------------------------------------------------------------------------- 1 | pub trait Trait { 2 | const S: &'static str; 3 | } 4 | 5 | impl Trait<()> for T 6 | where 7 | T: for<'a> Trait>, 8 | { 9 | const S: &'static str = T::S; 10 | } 11 | 12 | fn main() {} 13 | -------------------------------------------------------------------------------- /fixed/69654.rs: -------------------------------------------------------------------------------- 1 | #![feature(const_generics)] 2 | 3 | trait Bar {} 4 | impl Bar for [u8; O] {} 5 | 6 | struct Foo {} 7 | impl Foo 8 | where 9 | [u8; O]: Bar<[(); O]>, 10 | { 11 | fn foo() {} 12 | } 13 | 14 | fn main() { 15 | Foo::foo(); 16 | } 17 | -------------------------------------------------------------------------------- /fixed/69840.rs: -------------------------------------------------------------------------------- 1 | #![feature(impl_trait_in_bindings)] 2 | #![allow(incomplete_features)] 3 | 4 | struct A<'a>(&'a ()); 5 | 6 | trait Trait {} 7 | 8 | impl Trait for () {} 9 | 10 | pub fn foo<'a>() { 11 | let _x: impl Trait> = (); 12 | } 13 | 14 | fn main() {} 15 | -------------------------------------------------------------------------------- /fixed/69913.rs: -------------------------------------------------------------------------------- 1 | fn foo(bar: [usize; A + B]) {} 2 | 3 | fn main() {} 4 | -------------------------------------------------------------------------------- /fixed/69970.rs: -------------------------------------------------------------------------------- 1 | struct Bad { 2 | arr: [u8; { N }], 3 | another: T, 4 | } 5 | 6 | fn main() {} 7 | -------------------------------------------------------------------------------- /fixed/70114.rs: -------------------------------------------------------------------------------- 1 | enum Nums { 2 | NegOne = -1, 3 | } 4 | 5 | fn main() { 6 | let kind = Nums::NegOne; 7 | let _v = kind as i32; 8 | } 9 | -------------------------------------------------------------------------------- /fixed/70292.rs: -------------------------------------------------------------------------------- 1 | #![feature(associated_type_bounds)] 2 | 3 | fn foo(_: F) 4 | where 5 | F: for<'a> Trait, 6 | { 7 | } 8 | 9 | trait Trait { 10 | type Output; 11 | } 12 | 13 | impl Trait for T { 14 | type Output = (); 15 | } 16 | 17 | fn main() { 18 | foo(()); 19 | } 20 | -------------------------------------------------------------------------------- /fixed/70381.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | print!("\r¡{}"); 3 | } 4 | -------------------------------------------------------------------------------- /fixed/70507.rs: -------------------------------------------------------------------------------- 1 | #![feature(const_generics)] 2 | 3 | struct R; 4 | impl R { 5 | fn method(&self) {} 6 | } 7 | 8 | fn main() { 9 | R.method::<1u8>(); 10 | } 11 | -------------------------------------------------------------------------------- /fixed/70586.rs: -------------------------------------------------------------------------------- 1 | #![feature(const_generics)] 2 | 3 | struct T; 4 | impl T { 5 | fn new_s() -> S { S } 6 | } 7 | 8 | struct S; 9 | impl S { 10 | fn method(&self) {} 11 | } 12 | 13 | fn main() { 14 | T::new_s::<1u8>().method(); 15 | } 16 | -------------------------------------------------------------------------------- /fixed/70723.rs: -------------------------------------------------------------------------------- 1 | #![feature(const_loop)] 2 | 3 | static _X: () = loop {}; 4 | 5 | fn main() {} 6 | -------------------------------------------------------------------------------- /fixed/70934.rs: -------------------------------------------------------------------------------- 1 | struct S; 2 | 3 | fn main() { 4 | &([S][0],); 5 | } 6 | -------------------------------------------------------------------------------- /fixed/70971.rs: -------------------------------------------------------------------------------- 1 | #![allow(incomplete_features)] 2 | #![feature(impl_trait_in_bindings)] 3 | 4 | fn main() { 5 | let ref _x: impl Sized = 5; 6 | } 7 | -------------------------------------------------------------------------------- /fixed/71042.rs: -------------------------------------------------------------------------------- 1 | #![feature(impl_trait_in_bindings)] 2 | #![allow(incomplete_features)] 3 | 4 | fn main() { 5 | const C: impl Copy = 0; 6 | match C { 7 | C | _ => {} 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /fixed/71169.rs: -------------------------------------------------------------------------------- 1 | #![feature(const_generics)] 2 | #![allow(incomplete_features)] 3 | 4 | fn foo() {} 5 | 6 | fn main() { 7 | const DATA: [u8; 4] = *b"ABCD"; 8 | foo::<4, DATA>(); 9 | } 10 | -------------------------------------------------------------------------------- /fixed/71212.rs: -------------------------------------------------------------------------------- 1 | #![feature(const_mut_refs)] 2 | 3 | const FOO: &mut i32 = &mut 4; 4 | 5 | fn main() { 6 | *FOO = 2; 7 | } 8 | -------------------------------------------------------------------------------- /fixed/71297.rs: -------------------------------------------------------------------------------- 1 | async fn a(x | s: String) {} 2 | 3 | fn main() {} 4 | -------------------------------------------------------------------------------- /fixed/71443-1.rs: -------------------------------------------------------------------------------- 1 | #![feature(associated_type_bounds)] 2 | 3 | struct Incorrect; 4 | 5 | fn hello Iterator>() { 6 | Incorrect 7 | } 8 | -------------------------------------------------------------------------------- /fixed/71443-2.rs: -------------------------------------------------------------------------------- 1 | #![feature(associated_type_bounds)] 2 | 3 | fn hello<'b, F>() 4 | where 5 | for<'a> F: Iterator + 'b, 6 | {} 7 | -------------------------------------------------------------------------------- /fixed/71471.rs: -------------------------------------------------------------------------------- 1 | 2 | #!B 3 | -------------------------------------------------------------------------------- /fixed/71516.rs: -------------------------------------------------------------------------------- 1 | #![feature(const_generics)] 2 | 3 | struct Foo; 4 | 5 | impl Foo { 6 | fn foo(&self) {} 7 | } 8 | 9 | fn main() { 10 | Foo.foo::<0usize>(); 11 | } 12 | -------------------------------------------------------------------------------- /fixed/71546.rs: -------------------------------------------------------------------------------- 1 | pub trait T { 2 | fn t(&self, _: F) {} 3 | } 4 | 5 | pub fn crash(v: &V) 6 | where 7 | for<'a> &'a V: T + 'static, 8 | { 9 | v.t(|| {}); 10 | } 11 | 12 | fn main() { } 13 | -------------------------------------------------------------------------------- /fixed/71611.rs: -------------------------------------------------------------------------------- 1 | #![feature(const_generics)] 2 | #![feature(const_compare_raw_pointers)] 3 | 4 | fn func(outer: A) { 5 | F(outer); 6 | } 7 | 8 | fn main() {} 9 | -------------------------------------------------------------------------------- /fixed/71699.rs: -------------------------------------------------------------------------------- 1 | fn foo([(), .., ()]: [(); 1 << 40]) {} 2 | 3 | fn main() { 4 | foo([(); 1 << 40]); 5 | } 6 | -------------------------------------------------------------------------------- /fixed/71798.rs: -------------------------------------------------------------------------------- 1 | fn test_ref(x: &u32) -> impl std::future::Future + '_ { 2 | *x 3 | } 4 | 5 | fn main() { 6 | let _ = test_ref &u; 7 | } 8 | -------------------------------------------------------------------------------- /fixed/71922.rs: -------------------------------------------------------------------------------- 1 | const fn foo(n: usize) -> usize { n * 2 } 2 | fn bar() -> [u32; foo(N)] { 3 | [0; foo(N)] 4 | } 5 | fn main() {} 6 | -------------------------------------------------------------------------------- /fixed/72076.rs: -------------------------------------------------------------------------------- 1 | trait X { 2 | type S; 3 | fn f() -> Self::S {} 4 | } 5 | 6 | fn main() {} 7 | -------------------------------------------------------------------------------- /fixed/72105.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cat > 72105.rs < 72267.rs <; 6 | } 7 | EOF 8 | 9 | rustc -Zsave-analysis 72267.rs 10 | -------------------------------------------------------------------------------- /fixed/72285.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rustc -Z mir-opt-level=4 - << EOF 4 | 5 | fn main() { 6 | let i = (0..usize::max_value()).chain(0..10).skip(usize::max_value()); 7 | assert_eq!(i.count(), 10); 8 | } 9 | 10 | EOF 11 | -------------------------------------------------------------------------------- /fixed/72293.rs: -------------------------------------------------------------------------------- 1 | #![feature(const_generics)] 2 | 3 | struct Const; 4 | 5 | fn main() { 6 | const A: &'static () = unsafe { 7 | std::mem::transmute(10 as *const ()) 8 | }; 9 | 10 | let _ = Const::<{A}>; 11 | } 12 | -------------------------------------------------------------------------------- /fixed/72372.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cat > 72372.rs < = &7u32; 2 | 3 | fn main() { 4 | let a: &dyn PartialEq = &7u32; 5 | match a { 6 | F => panic!(), 7 | _ => {} 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /fixed/72680.rs: -------------------------------------------------------------------------------- 1 | #![feature(or_patterns)] 2 | 3 | fn f(s: &str, num: usize) { 4 | match (s, num) { 5 | ("", 0) | ("a" | "b", 1) => (), 6 | _ => (), 7 | } 8 | } 9 | 10 | fn main() {} 11 | -------------------------------------------------------------------------------- /fixed/73021.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rustc --emit mir -Z mir-opt-level=3 - <(s: &'a mut ()) where &'a mut (): Foo { 11 | s.foo(); 12 | } 13 | fn main() {} 14 | EOF 15 | -------------------------------------------------------------------------------- /fixed/73035.rs: -------------------------------------------------------------------------------- 1 | #![feature(type_alias_impl_trait)] 2 | 3 | type X = impl Clone; 4 | 5 | fn f(t: T) -> X { 6 | t 7 | } 8 | 9 | fn g(o : Option>) -> Option> { 10 | o.clone() 11 | } 12 | 13 | fn main() { 14 | g(None::>); 15 | } 16 | -------------------------------------------------------------------------------- /fixed/73109.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rustc -Z validate-mir - <); 11 | } 12 | 13 | #[repr(transparent)] 14 | pub struct Bar { 15 | value: ::Assoc, 16 | } 17 | 18 | fn main() {} 19 | -------------------------------------------------------------------------------- /fixed/73252.rs: -------------------------------------------------------------------------------- 1 | pub trait Foo { 2 | type Assoc; 3 | } 4 | 5 | extern "C" { 6 | pub fn lint_me() -> <() as Foo>::Assoc; 7 | } 8 | 9 | fn main() {} 10 | -------------------------------------------------------------------------------- /fixed/73375.rs: -------------------------------------------------------------------------------- 1 | #![feature(const_generics)] 2 | 3 | fn bug<'a>() { 4 | [(); (|_: &'a u8| (), 0).1]; 5 | } 6 | -------------------------------------------------------------------------------- /fixed/73541.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | 'a: loop { 3 | async { 4 | loop { 5 | continue 'a; 6 | } 7 | }; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /fixed/73626.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rustc -Zunstable-options --pretty=expanded - << EOF 4 | fn main(/* 5 | --- 6 | */) {} 7 | 8 | EOF 9 | -------------------------------------------------------------------------------- /fixed/73663.rs: -------------------------------------------------------------------------------- 1 | macro_rules! cbor_map { 2 | ($key:expr) => { 3 | $key.signum(); 4 | }; 5 | } 6 | 7 | fn main() { 8 | cbor_map! { #[cfg(test)] 4}; 9 | } 10 | -------------------------------------------------------------------------------- /fixed/73727.rs: -------------------------------------------------------------------------------- 1 | #![feature(adt_const_params)] 2 | #![allow(incomplete_features)] 3 | 4 | fn a() {} 5 | 6 | fn main() { 7 | a::<{ &[] }>(); 8 | } 9 | -------------------------------------------------------------------------------- /fixed/73860.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rustc -Zvalidate-mir - << EOF 4 | fn main() { 5 | for _ in &[0] {} 6 | } 7 | 8 | EOF 9 | -------------------------------------------------------------------------------- /fixed/73980.rs: -------------------------------------------------------------------------------- 1 | struct X(P,Q); 2 | struct L(T); 3 | 4 | impl L{ 5 | const S: usize=1; 6 | } 7 | 8 | impl X::S]> {} 9 | 10 | fn main() {} 11 | -------------------------------------------------------------------------------- /fixed/73993.rs: -------------------------------------------------------------------------------- 1 | #![crate_type = "lib"] 2 | 3 | pub struct Fixed64(i64); 4 | 5 | pub fn div(f: Fixed64) { 6 | f.0 / 0; 7 | } 8 | -------------------------------------------------------------------------------- /fixed/74280.rs: -------------------------------------------------------------------------------- 1 | #![feature(min_type_alias_impl_trait)] 2 | #![feature(type_alias_impl_trait)] 3 | 4 | type Test = impl Copy; 5 | 6 | fn test() -> Test { 7 | let y = || -> Test { () }; 8 | 7 9 | } 10 | 11 | fn main() {} 12 | -------------------------------------------------------------------------------- /fixed/74282.rs: -------------------------------------------------------------------------------- 1 | #![feature(type_alias_impl_trait)] 2 | 3 | type Closure = impl Fn() -> u64; 4 | struct Anonymous(Closure); 5 | 6 | fn test() { 7 | let y = || -> Closure { || 3 }; 8 | Anonymous(|| 3) 9 | } 10 | 11 | fn main() {} 12 | -------------------------------------------------------------------------------- /fixed/74298.rs: -------------------------------------------------------------------------------- 1 | #![feature(type_alias_impl_trait)] 2 | 3 | type X = impl Sized; 4 | 5 | fn f() -> X {} 6 | 7 | trait Y { 8 | fn g(&self) {} 9 | } 10 | 11 | impl Y for X<()> {} 12 | impl Y for X {} 13 | 14 | fn main() { 15 | f::<()>().g(); 16 | } 17 | -------------------------------------------------------------------------------- /fixed/74447.rs: -------------------------------------------------------------------------------- 1 | #![feature(const_generics)] 2 | #![allow(incomplete_features)] 3 | 4 | fn test() {} 5 | 6 | fn wow<'a>() { 7 | test::<{ 8 | let _: &'a (); 9 | 3 10 | }>(); 11 | } 12 | 13 | fn main() {} 14 | -------------------------------------------------------------------------------- /fixed/74608.rs: -------------------------------------------------------------------------------- 1 | #![feature(rustc_attrs)] 2 | 3 | #[rustc_args_required_const(1)] 4 | fn foo(_: u8) {} 5 | 6 | fn main() { 7 | foo(1); 8 | } 9 | -------------------------------------------------------------------------------- /fixed/74702.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | let (foo @ ..,) = (0, 0); 3 | dbg!(foo); 4 | } 5 | -------------------------------------------------------------------------------- /fixed/74713.rs: -------------------------------------------------------------------------------- 1 | #![feature(const_generics)] 2 | 3 | fn bug<'a>() 4 | where 5 | [(); { 6 | let _: &'a (); 7 | }]: , 8 | { 9 | } 10 | 11 | fn main() {} 12 | -------------------------------------------------------------------------------- /fixed/74761.rs: -------------------------------------------------------------------------------- 1 | #![feature(member_constraints)] 2 | #![feature(type_alias_impl_trait)] 3 | 4 | pub trait A { 5 | type B; 6 | fn f(&self) -> Self::B; 7 | } 8 | impl<'a, 'b> A for () { 9 | type B = impl core::fmt::Debug; 10 | 11 | fn f(&self) -> Self::B {} 12 | } 13 | 14 | fn main() {} 15 | -------------------------------------------------------------------------------- /fixed/74906.rs: -------------------------------------------------------------------------------- 1 | #![feature(const_generics)] 2 | #![allow(incomplete_features)] 3 | #![crate_type = "lib"] 4 | 5 | pub async fn baz() { 6 | biz(&Vec::new()).await; 7 | } 8 | 9 | const SIZE: usize = 16; 10 | 11 | pub async fn biz(_: &[[u8; SIZE]]) {} 12 | -------------------------------------------------------------------------------- /fixed/75153.rs: -------------------------------------------------------------------------------- 1 | pub const fn is_zst() -> usize { 2 | if std::mem::size_of::() == 0 { 3 | 1 4 | } else { 5 | 0 6 | } 7 | } 8 | 9 | pub struct AtLeastByte { 10 | value: T, 11 | pad: [u8; is_zst::()], 12 | } 13 | 14 | fn main() {} 15 | -------------------------------------------------------------------------------- /fixed/75158.rs: -------------------------------------------------------------------------------- 1 | struct S { x: [T; !0] } 2 | 3 | pub fn f() -> usize { 4 | std::mem::size_of::>() 5 | } 6 | 7 | fn main() { 8 | let x = f(); 9 | } 10 | -------------------------------------------------------------------------------- /fixed/75299.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rustc -Z mir-opt-level=4 - << EOF 4 | #![feature(const_generics, box_syntax)] 5 | #![allow(incomplete_features)] 6 | 7 | fn main() { 8 | fn foo() { 9 | box [0; N]; 10 | } 11 | foo::<1>(); 12 | } 13 | 14 | EOF 15 | -------------------------------------------------------------------------------- /fixed/75323.rs: -------------------------------------------------------------------------------- 1 | #![feature(min_const_generics)] 2 | 3 | fn test() {} 4 | 5 | fn wow<'a>() -> &'a () { 6 | test::< 7 | { 8 | let _: &'a (); 9 | 3 10 | }, 11 | >(); 12 | &() 13 | } 14 | -------------------------------------------------------------------------------- /fixed/75682.rs: -------------------------------------------------------------------------------- 1 | struct InterruptSectorManager { 2 | field: &'static (), 3 | } 4 | 5 | static FOO: [InterruptSectorManager; 2] = [InterruptSectorManager { field: &() }; 2]; 6 | 7 | fn main() {} 8 | -------------------------------------------------------------------------------- /fixed/75707.rs: -------------------------------------------------------------------------------- 1 | pub trait Callback { fn cb(); } 2 | 3 | pub trait Processing { 4 | type Call:Callback; 5 | } 6 | 7 | fn f() { 8 | P::Call::cb(); 9 | } 10 | 11 | fn main() { 12 | struct MyCall; 13 | f::>(); 14 | } 15 | -------------------------------------------------------------------------------- /fixed/75889.rs: -------------------------------------------------------------------------------- 1 | const /* or static */ FOO: dyn Fn() /* or just fn() */ -> _ = "this can be anything"; 2 | 3 | fn main() {} 4 | -------------------------------------------------------------------------------- /fixed/75961.rs: -------------------------------------------------------------------------------- 1 | pub fn foo<'a>(s: &'a mut ()) where &'a mut (): Clone { 2 | <&mut () as Clone>::clone(&s); 3 | } 4 | 5 | fn main() {} 6 | -------------------------------------------------------------------------------- /fixed/75983.rs: -------------------------------------------------------------------------------- 1 | #![feature(trait_alias)] 2 | 3 | struct Bar; 4 | trait Foo {} 5 | impl Foo for Bar {} 6 | 7 | trait Baz = Foo where Bar: Foo; 8 | 9 | fn new() -> impl Baz { 10 | Bar 11 | } 12 | 13 | fn main() {} 14 | -------------------------------------------------------------------------------- /fixed/76013.rs: -------------------------------------------------------------------------------- 1 | #![feature(const_panic)] 2 | 3 | const _: () = panic!(String::new()); 4 | 5 | fn main() {} 6 | -------------------------------------------------------------------------------- /fixed/76064.rs: -------------------------------------------------------------------------------- 1 | struct Bug([u8; panic!(1)]); 2 | 3 | fn main() {} 4 | -------------------------------------------------------------------------------- /fixed/76168.rs: -------------------------------------------------------------------------------- 1 | trait Trait { 2 | type Output; 3 | } 4 | 5 | async fn walk(filter: F) 6 | where 7 | for<'a> F: Trait<&'a u32> + 'a, 8 | for<'a> >::Output: 'a, 9 | { 10 | } 11 | 12 | fn main() {} 13 | -------------------------------------------------------------------------------- /fixed/76510.rs: -------------------------------------------------------------------------------- 1 | struct Dummy; 2 | 3 | impl Dummy { 4 | const fn func(&mut self) -> usize { 5 | 42 6 | } 7 | } 8 | 9 | const _: &[usize] = &[0; { 10 | const DUMMY: &Dummy = &Dummy; 11 | DUMMY.func() 12 | }]; 13 | -------------------------------------------------------------------------------- /fixed/77179.rs: -------------------------------------------------------------------------------- 1 | #![feature(type_alias_impl_trait)] 2 | 3 | type Pointer = impl std::ops::Deref; 4 | 5 | fn main() { 6 | let p: Pointer<_> = Box::new(1); 7 | } 8 | -------------------------------------------------------------------------------- /fixed/77218.rs: -------------------------------------------------------------------------------- 1 | pub struct Cache { 2 | data: Vec, 3 | } 4 | 5 | pub fn list_data(cache: &Cache, key: usize) { 6 | for reference in vec![1, 2, 3] { 7 | if /*let*/ Some(reference) = cache.data.get(key) { 8 | unimplemented!() 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /fixed/77320.rs: -------------------------------------------------------------------------------- 1 | const FOO: isize = 10; 2 | const ZST: &() = std::mem::transmute(FOO); 3 | fn main() { 4 | match &() { 5 | ZST => 9, 6 | }; 7 | } 8 | -------------------------------------------------------------------------------- /fixed/77323.rs: -------------------------------------------------------------------------------- 1 | #![feature(rustc_attrs)] 2 | #![rustc_if_this_changed] 3 | 4 | fn main() {} 5 | -------------------------------------------------------------------------------- /fixed/77329.rs: -------------------------------------------------------------------------------- 1 | fn bug() -> impl Iterator { 2 | std::iter::empty() 3 | } 4 | -------------------------------------------------------------------------------- /fixed/77357.rs: -------------------------------------------------------------------------------- 1 | #![feature(generic_const_exprs)] 2 | 3 | trait MyTrait {} 4 | 5 | fn bug<'a, T>() -> &'static dyn MyTrait<[(); { |x: &'a u32| { x }; 4 }]> { 6 | todo!() 7 | } 8 | -------------------------------------------------------------------------------- /fixed/77475.rs: -------------------------------------------------------------------------------- 1 | #![feature(decl_macro)] 2 | extern crate self as _; 3 | pub macro ice(){} 4 | 5 | fn main(){} 6 | -------------------------------------------------------------------------------- /fixed/77647.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cat > out.rs <<'EOF' 4 | #![feature(const_generics, const_evaluatable_checked)] 5 | #![allow(incomplete_features)] 6 | struct A([T; N.get()]) where [T; N.get()]: Sized; 7 | EOF 8 | 9 | rustdoc out.rs -Z unstable-options --output-format json 10 | -------------------------------------------------------------------------------- /fixed/77696.rs: -------------------------------------------------------------------------------- 1 | #![feature(impl_trait_in_bindings)] 2 | 3 | struct S; 4 | trait Trait { 5 | fn demo(&self) {} 6 | } 7 | impl Trait for S {} 8 | fn main() { 9 | let a: &impl Trait = &S; 10 | } 11 | -------------------------------------------------------------------------------- /fixed/77910.rs: -------------------------------------------------------------------------------- 1 | fn foo(s: &i32) -> &i32 { 2 | let xs; 3 | xs 4 | } 5 | 6 | fn main() { 7 | let y; 8 | assert_eq!(foo, y); 9 | } 10 | -------------------------------------------------------------------------------- /fixed/77919.rs: -------------------------------------------------------------------------------- 1 | trait TypeVal { 2 | const VAL: T; 3 | } 4 | struct Five; 5 | struct Multiply { 6 | _n: PhantomData, 7 | } 8 | impl TypeVal for Multiply where N: TypeVal {} 9 | 10 | fn main() { 11 | [1; >::VAL]; 12 | } 13 | -------------------------------------------------------------------------------- /fixed/77993.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rustc --edition 2018 - << EOF 4 | async fn test() -> Box { 5 | macro!() 6 | } 7 | 8 | fn main() {} 9 | 10 | EOF 11 | -------------------------------------------------------------------------------- /fixed/78174.rs: -------------------------------------------------------------------------------- 1 | #![allow(incomplete_features)] 2 | #![feature(inline_const)] 3 | 4 | fn main() { 5 | let const { "foo" } = "foo"; 6 | } 7 | -------------------------------------------------------------------------------- /fixed/78180.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rustc -Zsave-analysis - <() {} 7 | 8 | fn wow<'a>() -> &'a () { 9 | test::< 10 | { 11 | let _: &'a (); 12 | 3 13 | }, 14 | >(); 15 | &() 16 | } 17 | EOF 18 | -------------------------------------------------------------------------------- /fixed/78336.rs: -------------------------------------------------------------------------------- 1 | fn finds_explicit_bound<'b>() -> impl 'b { 2 | yield 3 | } 4 | 5 | fn main() {} 6 | -------------------------------------------------------------------------------- /fixed/78441.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rustc -Z save-analysis - << EOF 4 | fn main() { 5 | [(); { for _ in 0usize.. {}; 0}]; 6 | } 7 | 8 | EOF 9 | -------------------------------------------------------------------------------- /fixed/78459.rs: -------------------------------------------------------------------------------- 1 | #![feature(allocator_api)] 2 | 3 | fn main() { 4 | Box::new_in(&[0, 1], &std::alloc::Global); 5 | } 6 | -------------------------------------------------------------------------------- /fixed/78651.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rustc - < Err {} 7 | } 8 | EOF 9 | -------------------------------------------------------------------------------- /fixed/78652.rs: -------------------------------------------------------------------------------- 1 | #![unstable(feature = "humans", issue = "none")] 2 | #![feature(staged_api)] 3 | struct Foo; 4 | impl Foo { 5 | #[stable(feature = "rust1", since = "1.0.0")] 6 | const fn gated() -> u32 { 7 | 42 8 | } 9 | } 10 | 11 | fn main() {} 12 | -------------------------------------------------------------------------------- /fixed/78653.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | yield || for _ in 0 {} 3 | } 4 | -------------------------------------------------------------------------------- /fixed/78671.rs: -------------------------------------------------------------------------------- 1 | trait CollectionFamily { 2 | type Member; 3 | } 4 | 5 | fn floatify() { 6 | Family as CollectionFamily 7 | } 8 | 9 | fn main() {} 10 | -------------------------------------------------------------------------------- /fixed/78721.rs: -------------------------------------------------------------------------------- 1 | #![feature(impl_trait_in_bindings)] 2 | 3 | struct Bug { 4 | V1: [(); { 5 | let f: impl core::future::Future = async { 1 }; 6 | 1 7 | }], 8 | } 9 | 10 | fn main() {} 11 | -------------------------------------------------------------------------------- /fixed/78922.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | std::<0> 3 | } 4 | -------------------------------------------------------------------------------- /fixed/79099.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rustc - << 'EOF' 4 | #![feature(impl_trait_in_bindings)] 5 | 6 | struct Bug { 7 | V1: [(); { 8 | let f: impl core::future::Future = async { 1 }; 9 | 1 10 | }], 11 | } 12 | 13 | fn main() {} 14 | EOF 15 | -------------------------------------------------------------------------------- /fixed/79463.rs: -------------------------------------------------------------------------------- 1 | trait Foo<'t> { 2 | type Inner; 3 | } 4 | 5 | 6 | fn foo(_f: for<'f> fn(>::Inner)) 7 | where T: for<'t> Foo<'t> 8 | { } 9 | 10 | impl<'t> Foo<'t> for i32 { 11 | type Inner = &'t i32; 12 | } 13 | 14 | fn main() { foo::(|_inner| { }); } 15 | -------------------------------------------------------------------------------- /fixed/79494.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cat > out.rs <<'EOF' 4 | 5 | const ZST1: &[u8] = unsafe { std::mem::transmute(1usize) }; 6 | pub const ZST2: u8 = std::mem::transmute(1usize); 7 | 8 | EOF 9 | 10 | rustdoc --edition=2021 out.rs 11 | -------------------------------------------------------------------------------- /fixed/79537.rs: -------------------------------------------------------------------------------- 1 | fn change_parameter_pattern() { 2 | |x: x| x 3 | } 4 | -------------------------------------------------------------------------------- /fixed/79566.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rustc -Zinstrument-coverage - << EOF 4 | #![feature(type_alias_impl_trait)] 5 | 6 | type Closure = impl FnOnce(); 7 | 8 | fn c() -> Closure { 9 | || -> Closure { || () } 10 | } 11 | 12 | fn main() {} 13 | EOF 14 | -------------------------------------------------------------------------------- /fixed/79666.rs: -------------------------------------------------------------------------------- 1 | #![feature(const_generics)] 2 | #![feature(generic_associated_types)] 3 | 4 | trait A { 5 | type B; 6 | 7 | fn foo(&self) -> Self::B<{N}>; 8 | } 9 | 10 | fn main() {} 11 | -------------------------------------------------------------------------------- /fixed/79669.rs: -------------------------------------------------------------------------------- 1 | trait Tr { 2 | extern "rust-call" fn fun() {} 3 | } 4 | 5 | fn main() {} 6 | -------------------------------------------------------------------------------- /fixed/79699.rs: -------------------------------------------------------------------------------- 1 | #![feature(rustc_attrs)] 2 | 3 | #[rustc_variance] 4 | trait Tr { } 5 | 6 | fn main() { } -------------------------------------------------------------------------------- /fixed/79787.rs: -------------------------------------------------------------------------------- 1 | use std::cell::UnsafeCell; 2 | 3 | extern "C" { 4 | pub fn foo(_: Option>); 5 | } 6 | 7 | fn main() {} 8 | -------------------------------------------------------------------------------- /fixed/80060.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rustc -Z mir-opt-level=3 -Z instrument-coverage - <() -> usize {} 2 | fn test() { 3 | let _: [u8; sof::()]; 4 | } 5 | -------------------------------------------------------------------------------- /fixed/80125.rs: -------------------------------------------------------------------------------- 1 | type ExternCallback = extern "C" fn(*const u8, u32, str); 2 | 3 | pub struct Struct(ExternCallback); 4 | 5 | #[no_mangle] 6 | pub extern "C" fn register_something(bind: ExternCallback) -> Struct { 7 | Struct(bind) 8 | } 9 | 10 | fn main() {} 11 | -------------------------------------------------------------------------------- /fixed/80134.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | let matches = App::new() 3 | .arg( 4 | Arg::with_name(OPT_MODE)é 5 | ); 6 | } 7 | -------------------------------------------------------------------------------- /fixed/80207.rs: -------------------------------------------------------------------------------- 1 | #![crate_type = "lib"] 2 | pub trait Foo { 3 | fn do_stuff() -> Self; 4 | } 5 | 6 | pub trait Bar { 7 | type Output; 8 | } 9 | 10 | impl Foo for dyn Bar 11 | where 12 | Self: Sized, 13 | { 14 | fn do_stuff() -> Self { 15 | todo!() 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /fixed/80228.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Temporary moved as chalk is incomplete. 4 | 5 | rustc -Zchalk - << 'EOF' 6 | const FOO: &&&u32 = &&&42; 7 | 8 | fn main() { 9 | match unimplemented!() { 10 | &&&42 => {}, 11 | FOO => {}, 12 | _ => {}, 13 | } 14 | } 15 | EOF 16 | -------------------------------------------------------------------------------- /fixed/80229.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Temporary moved as chalk is experimental. 4 | 5 | rustc -Zchalk - << 'EOF' 6 | fn foo(_: G, _: Box) 7 | where 8 | F: Fn(), 9 | G: Fn(Box), 10 | { 11 | } 12 | 13 | fn main() { 14 | foo(|f| (*f)(), Box::new(|| {})); 15 | } 16 | EOF 17 | -------------------------------------------------------------------------------- /fixed/80230.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Temporary moved as chalk is experimental. 4 | 5 | rustc -Zchalk - <<'EOF' 6 | #![crate_type = "lib"] 7 | 8 | #![feature(generic_associated_types)] 9 | trait Foo { 10 | type PublicKey<'a> : From<&'a [u8]>; 11 | } 12 | EOF 13 | -------------------------------------------------------------------------------- /fixed/80371.rs: -------------------------------------------------------------------------------- 1 | pub struct Header<'a> { 2 | pub value: &'a [u8], 3 | } 4 | 5 | pub fn test() { 6 | let headers = [Header{value: &[]}; 128]; 7 | } 8 | 9 | fn main() {} 10 | -------------------------------------------------------------------------------- /fixed/80664.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cat > out.rs << EOF 4 | mod inner { 5 | pub struct Public; 6 | } 7 | 8 | pub use inner::Public as Reexported; 9 | EOF 10 | 11 | rustdoc out.rs --output-format json 12 | -------------------------------------------------------------------------------- /fixed/80678.rs: -------------------------------------------------------------------------------- 1 | #![allow(bare_trait_objects)] 2 | 3 | trait Bar = PartialEq; 4 | fn main() { 5 | a: Bar 6 | } 7 | -------------------------------------------------------------------------------- /fixed/80767.rs: -------------------------------------------------------------------------------- 1 | type G<'a> = [(O, &'a [u8]); 64]; 2 | enum O { 3 | O1, 4 | } 5 | fn f(_p: [G; 4]) {} 6 | 7 | fn main() { 8 | let p: [G; 4]; 9 | let _g: G = [(O::O1, &[]); 64]; 10 | f(p); 11 | } 12 | -------------------------------------------------------------------------------- /fixed/80779.rs: -------------------------------------------------------------------------------- 1 | pub struct T<'a>(&'a str); 2 | 3 | pub fn f<'a>(val: T<'a>) -> _ { 4 | g(val) 5 | } 6 | 7 | pub fn g(_: T<'static>) -> _ {} 8 | 9 | fn main() {} 10 | -------------------------------------------------------------------------------- /fixed/81006.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | let _ = format!("→{} \t"); 3 | } 4 | -------------------------------------------------------------------------------- /fixed/81193.rs: -------------------------------------------------------------------------------- 1 | #![feature(associated_type_bounds)] 2 | trait A<'a, 'b> {} 3 | trait B<'a, 'b, 'c> {} 4 | fn err<'u, 'a, F>() 5 | where 6 | for<'b> F: Iterator B<'a, 'b, 'c> + for<'c> A<'a, 'c>>, 7 | { 8 | } 9 | -------------------------------------------------------------------------------- /fixed/81199.rs: -------------------------------------------------------------------------------- 1 | union PtrRepr { 2 | const_ptr: *const T, 3 | mut_ptr: *mut T, 4 | components: ::Metadata 5 | } 6 | 7 | pub trait Pointee { 8 | type Metadata; 9 | } 10 | -------------------------------------------------------------------------------- /fixed/81208.rs: -------------------------------------------------------------------------------- 1 | #[path = b"ffi.rs"] 2 | mod ffi; 3 | 4 | fn main() {} -------------------------------------------------------------------------------- /fixed/81708.rs: -------------------------------------------------------------------------------- 1 | static T: () = { 2 | let test_arr: [String; 1]; 3 | test_arr[0] = String::new(); 4 | }; 5 | 6 | fn main() {} 7 | -------------------------------------------------------------------------------- /fixed/81800.rs: -------------------------------------------------------------------------------- 1 | enumem˂-$T -------------------------------------------------------------------------------- /fixed/81804.rs: -------------------------------------------------------------------------------- 1 | fn p([=(} 2 | -------------------------------------------------------------------------------- /fixed/81806.rs: -------------------------------------------------------------------------------- 1 | trait t { const 2 | impl 3 | -------------------------------------------------------------------------------- /fixed/81827.rs: -------------------------------------------------------------------------------- 1 | #![crate_name="0"] 2 | 3 | fn r()->i{0|{#[cfg(r(0{]0 4 | -------------------------------------------------------------------------------- /fixed/81845.rs: -------------------------------------------------------------------------------- 1 | fn e() { 2 | if *let x = 0 { x 3 | -------------------------------------------------------------------------------- /fixed/81899.rs: -------------------------------------------------------------------------------- 1 | const _CONST: &[u8] = &f(&[], |_| {}); 2 | 3 | const fn f(_: &[u8], _: F) -> &[u8] 4 | where 5 | F: FnMut(&u8), 6 | { 7 | panic!() 8 | } 9 | 10 | fn main() {} 11 | -------------------------------------------------------------------------------- /fixed/82156.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | super(); 3 | } 4 | -------------------------------------------------------------------------------- /fixed/82290.rs: -------------------------------------------------------------------------------- 1 | #![feature(let_chains)] 2 | 3 | fn main() { 4 | if true && let x = 1 { 5 | let _ = x; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /fixed/82325.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rustc -Zunpretty=mir-cfg - <<'EOF' 4 | #![feature(const_generics)] 5 | #![feature(generic_associated_types)] 6 | 7 | trait A { 8 | type B; 9 | 10 | fn foo(&self) -> Self::B<{N}>; 11 | } 12 | 13 | fn main() {} 14 | EOF 15 | -------------------------------------------------------------------------------- /fixed/82326.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rustc -Zunpretty=mir-cfg - <<'EOF' 4 | const TAG: &'static [u8] = b"ABCD"; 5 | 6 | fn main() { 7 | match &[][..] { 8 | TAG => println!("Yes."), 9 | _ => println!("No."), 10 | } 11 | } 12 | EOF 13 | -------------------------------------------------------------------------------- /fixed/82328.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rustc -Zunpretty=hir,typed - <<'EOF' 4 | fn main() {} 5 | 6 | fn foo(-128..=127: i8) {} 7 | EOF 8 | -------------------------------------------------------------------------------- /fixed/82329.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rustc -Zunpretty=hir,typed - <<'EOF' 4 | pub fn main() { 5 | if true { 6 | } else if let a = 1 { //~ WARN irrefutable `if let` 7 | } 8 | } 9 | EOF 10 | -------------------------------------------------------------------------------- /fixed/82335.rs: -------------------------------------------------------------------------------- 1 | union Union { 2 | data: std::iter::Peekable 3 | } 4 | -------------------------------------------------------------------------------- /fixed/82438.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | let inner; 3 | let outer = || { 4 | inner = || {}; 5 | inner(); 6 | }; 7 | outer(); 8 | } 9 | -------------------------------------------------------------------------------- /fixed/82455.rs: -------------------------------------------------------------------------------- 1 | fn map(_: fn() -> Option<&'static T>) -> Option { 2 | None 3 | } 4 | 5 | fn value() -> Option<&'static _> { 6 | Option::<&'static u8>::None 7 | } 8 | 9 | const _: Option<_> = { 10 | let _: Option<_> = map(value); 11 | }; 12 | -------------------------------------------------------------------------------- /fixed/82470.rs: -------------------------------------------------------------------------------- 1 | trait MyTraitAsync { 2 | async fn async_fn() { 3 | || {}; 4 | } 5 | } 6 | 7 | fn main() {} 8 | -------------------------------------------------------------------------------- /fixed/82518.rs: -------------------------------------------------------------------------------- 1 | #![crate_type = "lib"] 2 | #![feature(inline_const)] 3 | 4 | fn foo() { 5 | match 0 { 6 | const { V } => {}, 7 | _ => {}, 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /fixed/82610.rs: -------------------------------------------------------------------------------- 1 | fn f() { 2 | mut N 3 | } 4 | -------------------------------------------------------------------------------- /fixed/82772.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | let Box { 1: _, .. }: Box<()>; 3 | } 4 | -------------------------------------------------------------------------------- /fixed/82792.rs: -------------------------------------------------------------------------------- 1 | #![crate_type = "lib"] 2 | #![feature(const_generics_defaults)] 3 | 4 | #[repr(C)] 5 | pub struct Loaf { 6 | head: [T; N], 7 | slice: [T], 8 | } 9 | -------------------------------------------------------------------------------- /fixed/82830.rs: -------------------------------------------------------------------------------- 1 | trait A { 2 | type B; 3 | } 4 | type MaybeBox = >>::B; 5 | struct P { 6 | t: MaybeBox

7 | } 8 | impl A for P { 9 | type B = N; 10 | } 11 | fn main() { 12 | let t: MaybeBox

; 13 | } 14 | -------------------------------------------------------------------------------- /fixed/82836.rs: -------------------------------------------------------------------------------- 1 | extern "C" fn _panic<'a, T: ?Sized>() -> Option<&'a T> { 2 | panic!() 3 | } 4 | 5 | fn main() {} 6 | -------------------------------------------------------------------------------- /fixed/82865.rs: -------------------------------------------------------------------------------- 1 | use x::y::z; 2 | fn register_builtin_macros() { 3 | macro register_derive ($f:ident) { 4 | Box::z($f) 5 | } 6 | register_derive! { clone } 7 | } 8 | -------------------------------------------------------------------------------- /fixed/82866.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | match None { 3 | Some::>(v) => (), 4 | None => (), 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /fixed/82869.rs: -------------------------------------------------------------------------------- 1 | #![feature(asm)] 2 | 3 | fn aarch64(a: f64, b: f64) { 4 | asm!("add {:d}, {:d}, d0", out(vreg) c, in(vreg) a, in("d1") { 5 | || {}; 6 | b 7 | }); 8 | } 9 | -------------------------------------------------------------------------------- /fixed/82927.rs: -------------------------------------------------------------------------------- 1 | trait SendEqAlias = PartialEq; 2 | struct Foo; 3 | struct Bar(SendEqAlias); 4 | -------------------------------------------------------------------------------- /fixed/82952.rs: -------------------------------------------------------------------------------- 1 | trait ExampleTrait {} 2 | type BlahResult> = Result; 3 | 4 | fn example<'a, T>() -> BlahResult<()> {} 5 | -------------------------------------------------------------------------------- /fixed/82954.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rustc -C debuginfo=2 - <<'EOF' 4 | use std::marker::PhantomData; 5 | 6 | pub enum Empty {} 7 | 8 | fn main() { 9 | let _x: PhantomData<(Empty, [usize])>; 10 | } 11 | EOF 12 | -------------------------------------------------------------------------------- /fixed/82981.rs: -------------------------------------------------------------------------------- 1 | #![crate_type = "staticlib"] 2 | #![feature(rustc_attrs)] 3 | #[rustc_layout_scalar_valid_range_start(A)] 4 | struct T {} 5 | const C: T = T {}; 6 | -------------------------------------------------------------------------------- /fixed/83048.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rustc -Z unpretty=thir-tree - <<'EOF' 4 | pub fn main() {break;} 5 | EOF 6 | -------------------------------------------------------------------------------- /fixed/83085-1.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rustc -Z incremental-verify-ich=yes -C incremental=foo - <<'EOF' 4 | fn main() { 5 | const BOO: &[u8; 0] = &[]; 6 | match &[] { 7 | BOO => (), 8 | b"" => (), 9 | _ => (), 10 | } 11 | } 12 | EOF 13 | -------------------------------------------------------------------------------- /fixed/83107.rs: -------------------------------------------------------------------------------- 1 | #[repr(packed, align(0x1000))] 2 | pub struct Foo { 3 | val: u16, 4 | } 5 | 6 | static BAR: Foo = Foo { 7 | val: 0, 8 | }; 9 | 10 | fn main() {} 11 | -------------------------------------------------------------------------------- /fixed/83120.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | struct S; 3 | S as *const (); 4 | } 5 | -------------------------------------------------------------------------------- /fixed/83138.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo '' | rustc - --crate-name=a --crate-type=lib 4 | echo 'extern crate a;' | rustc - --crate-name=b --crate-type=lib --extern a=liba.rlib 5 | echo 'use b as _;' | rustc - --extern b=libb.rlib --edition=2018 6 | -------------------------------------------------------------------------------- /fixed/83175.rs: -------------------------------------------------------------------------------- 1 | #![feature(rustc_attrs)] 2 | #[rustc_then_this_would_need(rustc_then_this_would_need())] 3 | fn function() {} 4 | fn main() {} 5 | -------------------------------------------------------------------------------- /fixed/83176.rs: -------------------------------------------------------------------------------- 1 | #![warn(disjoint_capture_drop_reorder)] 2 | 3 | fn main() { 4 | if let a = "" { 5 | drop(|_: ()| drop(a)); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /fixed/83182.rs: -------------------------------------------------------------------------------- 1 | use std::mem; 2 | struct MyStr(str); 3 | const MYSTR_NO_INIT: &MyStr = unsafe { mem::transmute::<&[_], _>(&[&()]) }; 4 | 5 | fn main() {} 6 | -------------------------------------------------------------------------------- /fixed/83253.rs: -------------------------------------------------------------------------------- 1 | impl X { 2 | fn getn() -> [u8; N] { 3 | getn::() 4 | } 5 | } 6 | fn getn() -> [u8; N] {} 7 | -------------------------------------------------------------------------------- /fixed/83340.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | println!( 3 | "\ 4 | \n {} │", 5 | ); 6 | } 7 | -------------------------------------------------------------------------------- /fixed/83466.rs: -------------------------------------------------------------------------------- 1 | struct S; 2 | impl S { 3 | fn func<'a, U>(self) -> U { 4 | todo!() 5 | } 6 | } 7 | fn dont_crash<'a, U>() { 8 | S.func::<'a, dont_crash>() 9 | } 10 | 11 | fn main() {} 12 | -------------------------------------------------------------------------------- /fixed/83471-1.rs: -------------------------------------------------------------------------------- 1 | #[lang = "fn"] 2 | trait Fn { 3 | fn call(export_name); 4 | } 5 | fn call_through_fn_trait() { 6 | a() 7 | } 8 | -------------------------------------------------------------------------------- /fixed/83472.rs: -------------------------------------------------------------------------------- 1 | fn yes_double_ended_iterator() -> impl { 2 | yield 3 | } 4 | -------------------------------------------------------------------------------- /fixed/83474.rs: -------------------------------------------------------------------------------- 1 | #[lang = "owned_box"] 2 | struct Foo; 3 | fn main() { 4 | Foo 5 | } 6 | -------------------------------------------------------------------------------- /fixed/83475.rs: -------------------------------------------------------------------------------- 1 | #![feature(cmse_nonsecure_entry)] 2 | #[cmse_nonsecure_entry] 3 | struct XEmpty2; 4 | 5 | fn main() {} 6 | -------------------------------------------------------------------------------- /fixed/83479.rs: -------------------------------------------------------------------------------- 1 | type PairCoupledTypes: Trait< 2 | [u32; { 3 | static FOO: usize; 4 | }], 5 | > = impl Trait< 6 | [u32; { 7 | static FOO: usize; 8 | }], 9 | >; 10 | -------------------------------------------------------------------------------- /fixed/83494.rs: -------------------------------------------------------------------------------- 1 | impl T { 2 | #[rustc_args_required_const(1)] 3 | fn is_null() {} 4 | } 5 | -------------------------------------------------------------------------------- /fixed/83499.rs: -------------------------------------------------------------------------------- 1 | async fn multiple_named_lifetimes<'a, 'b>(_: u8, ...) {} 2 | -------------------------------------------------------------------------------- /fixed/83505.rs: -------------------------------------------------------------------------------- 1 | #[repr(simd)] 2 | enum Es {} 3 | static CLs: Es; 4 | -------------------------------------------------------------------------------- /fixed/83512.rs: -------------------------------------------------------------------------------- 1 | trait Foo { 2 | #[doc(keyword = "match")] 3 | fn quux() {} 4 | } 5 | -------------------------------------------------------------------------------- /fixed/83531.rs: -------------------------------------------------------------------------------- 1 | union Foo { 2 | a: isize, 3 | b: &VTable, 4 | } 5 | enum Bar { 6 | Boo = [Foo { b: () }.a][3], 7 | } 8 | -------------------------------------------------------------------------------- /fixed/83539.rs: -------------------------------------------------------------------------------- 1 | #![crate_type = "staticlib"] 2 | #![feature(rustc_attrs)] 3 | struct S; 4 | #[rustc_mir()] 5 | fn foo(x: &S) { 6 | let ret; 7 | *x; 8 | ret 9 | } 10 | -------------------------------------------------------------------------------- /fixed/83613.rs: -------------------------------------------------------------------------------- 1 | trait OpaqueTrait {} 2 | impl OpaqueTrait for T {} 3 | type OpaqueType = impl OpaqueTrait; 4 | fn mk_opaque() -> OpaqueType { 5 | || 0 6 | } 7 | trait AnotherTrait {} 8 | impl AnotherTrait for T {} 9 | impl AnotherTrait for OpaqueType {} 10 | -------------------------------------------------------------------------------- /fixed/83621.rs: -------------------------------------------------------------------------------- 1 | #![crate_type = "staticlib"] 2 | extern "C" { 3 | static x: _; 4 | } 5 | -------------------------------------------------------------------------------- /fixed/83630.rs: -------------------------------------------------------------------------------- 1 | #![crate_type = "staticlib"] 2 | static DATA: Iterator = "my string"; 3 | -------------------------------------------------------------------------------- /fixed/83641.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rustc --crate-type=lib --crate-name=repro - <<'EOF' 4 | #![feature(pub_macro_rules)] 5 | pub macro_rules! fail { 6 | ($x:expr) => { $x } 7 | } 8 | EOF 9 | 10 | rustc -L. - <<'EOF' 11 | extern crate repro; 12 | fn main() { 13 | repro::fail!(recv); 14 | } 15 | EOF 16 | -------------------------------------------------------------------------------- /fixed/83691.rs: -------------------------------------------------------------------------------- 1 | mod dep1 { 2 | extern "C" { 3 | pub static collision: Box<_>; 4 | } 5 | } 6 | fn main() { 7 | dep1::collision 8 | } 9 | -------------------------------------------------------------------------------- /fixed/83693.rs: -------------------------------------------------------------------------------- 1 | #![feature(fn_traits)] 2 | fn call() { 3 | ::call 4 | } 5 | -------------------------------------------------------------------------------- /fixed/83737.rs: -------------------------------------------------------------------------------- 1 | #![crate_type = "rlib"] 2 | 3 | use core::future::Future; 4 | 5 | async fn handle(slf: &F) 6 | where 7 | F: Fn(&()) -> &mut (dyn Future + Unpin), 8 | { 9 | (slf)(&()).await; 10 | } 11 | -------------------------------------------------------------------------------- /fixed/83753.rs: -------------------------------------------------------------------------------- 1 | struct Foo {} 2 | impl Foo { 3 | fn bar(foo: Foo) {} 4 | } 5 | fn main() {} 6 | -------------------------------------------------------------------------------- /fixed/83836.rs: -------------------------------------------------------------------------------- 1 | fn func2(_x: Option) {} 2 | -------------------------------------------------------------------------------- /fixed/83893.rs: -------------------------------------------------------------------------------- 1 | #[lang = "add"] 2 | trait Add<'a, T> {} 3 | fn ice() { 4 | r + a 5 | } 6 | -------------------------------------------------------------------------------- /fixed/83907.rs: -------------------------------------------------------------------------------- 1 | static STATIC_VAR_FIVE: &One(); 2 | -------------------------------------------------------------------------------- /fixed/83921.rs: -------------------------------------------------------------------------------- 1 | #![crate_type = "staticlib"] 2 | #[repr(packed())] 3 | struct Packed2NestedPair; 4 | -------------------------------------------------------------------------------- /fixed/83993.rs: -------------------------------------------------------------------------------- 1 | #![feature(generic_const_exprs)] 2 | fn bug<'a>() 3 | where 4 | for<'b> [(); { 5 | let x: &'b (); 6 | 0 7 | }]: 8 | {} 9 | -------------------------------------------------------------------------------- /fixed/84104.rs: -------------------------------------------------------------------------------- 1 | #[i=i::<ښܖ< 2 | -------------------------------------------------------------------------------- /fixed/84108.rs: -------------------------------------------------------------------------------- 1 | static NONE: (AsRef, u8); 2 | -------------------------------------------------------------------------------- /fixed/84148.rs: -------------------------------------------------------------------------------- 1 | fn f(t:for<>t? 2 | -------------------------------------------------------------------------------- /fixed/84149.rs: -------------------------------------------------------------------------------- 1 | trait C{async fn b(){fn a()}} 2 | -------------------------------------------------------------------------------- /fixed/84632.rs: -------------------------------------------------------------------------------- 1 | macro_rules! n {() => (concat!("", n!()))} 2 | 3 | fn main () { 4 | n!(); 5 | } 6 | -------------------------------------------------------------------------------- /fixed/84659.rs: -------------------------------------------------------------------------------- 1 | #![allow(incomplete_features)] 2 | #![feature(const_generics)] 3 | 4 | trait Bar {} 5 | 6 | trait Foo<'a> { 7 | const N: usize; 8 | type Baz: Bar<{ Self::N }>; 9 | } 10 | -------------------------------------------------------------------------------- /fixed/84737.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rustc --edition=2018 - <<'EOF' 4 | #![allow(incomplete_features)] 5 | #![feature(generic_const_exprs)] 6 | #![crate_type="lib"] 7 | 8 | async fn test(test: [(); { 0 }]) { 9 | let _ = &test; 10 | async {}.await; 11 | } 12 | EOF 13 | -------------------------------------------------------------------------------- /fixed/84768.rs: -------------------------------------------------------------------------------- 1 | #![feature(fn_traits)] 2 | 3 | fn transform_mut(f: F) where F: for<'b> FnOnce(&'b mut u8) { 4 | ::call_once(f, 1) 5 | } 6 | -------------------------------------------------------------------------------- /fixed/84789.rs: -------------------------------------------------------------------------------- 1 | #![feature(trait_alias)] 2 | 3 | pub trait MyFn = Fn(&mut Self); 4 | 5 | // 1. 6 | pub type F = dyn MyFn; 7 | 8 | // 2. 9 | pub fn f(_f: &dyn MyFn) { 10 | 11 | } 12 | 13 | fn main() {} 14 | -------------------------------------------------------------------------------- /fixed/84841.rs: -------------------------------------------------------------------------------- 1 | async fn main() { 2 | // Adding an .await here avoids the ICE 3 | test()?; 4 | } 5 | 6 | // Removing the const generic parameter here avoids the ICE 7 | async fn test() { 8 | } 9 | -------------------------------------------------------------------------------- /fixed/84919.rs: -------------------------------------------------------------------------------- 1 | #![feature(impl_trait_in_bindings)] 2 | 3 | trait Trait {} 4 | impl Trait for () {} 5 | 6 | fn foo<'a: 'a>() { 7 | let _x: impl Trait = (); 8 | } 9 | 10 | fn main () {} 11 | -------------------------------------------------------------------------------- /fixed/85103.rs: -------------------------------------------------------------------------------- 1 | #![feature(rustc_attrs)] 2 | 3 | trait Foo { 4 | type Bar; 5 | } 6 | 7 | #[rustc_layout(debug)] 8 | type Edges = ::Bar; 9 | fn main() {} 10 | -------------------------------------------------------------------------------- /fixed/85350.rs: -------------------------------------------------------------------------------- 1 | impl FnMut(&Context) for 'tcx { 2 | fn print () -> Self :: Output{ } 3 | } 4 | -------------------------------------------------------------------------------- /fixed/85552.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rustc -Z unpretty=thir-tree - <<'EOF' 4 | struct Foo(pub str); 5 | 6 | impl Foo { 7 | fn print(&self) { 8 | match self { 9 | &Foo(ref s) => println!("f\"{}\"", s), 10 | } 11 | } 12 | } 13 | 14 | fn main() {} 15 | EOF 16 | -------------------------------------------------------------------------------- /fixed/85635.rs: -------------------------------------------------------------------------------- 1 | #![feature(generators)] 2 | #![feature(box_syntax)] 3 | 4 | fn main() { 5 | || box yield; 6 | } 7 | -------------------------------------------------------------------------------- /fixed/85680.rs: -------------------------------------------------------------------------------- 1 | #![crate_type = "lib"] 2 | #![feature(rustc_insignificant_dtor)] 3 | -------------------------------------------------------------------------------- /fixed/85713.rs: -------------------------------------------------------------------------------- 1 | #![crate_type = "lib"] 2 | #[repr(align)] 3 | pub struct Foo; 4 | -------------------------------------------------------------------------------- /fixed/85855.rs: -------------------------------------------------------------------------------- 1 | extern "platform-intrinsic" { 2 | fn simd_saturating_add<'a, T: 'a>(x: T, y: T); 3 | } 4 | -------------------------------------------------------------------------------- /fixed/85871.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rustc -Z thir-unsafeck=yes - <<'EOF' 4 | struct Bug { 5 | inner: [(); match || 1 { 6 | n => n(), 7 | }], 8 | } 9 | 10 | fn main() {} 11 | EOF 12 | -------------------------------------------------------------------------------- /fixed/85907.rs: -------------------------------------------------------------------------------- 1 | #![feature(const_panic)] 2 | 3 | const fn hey() -> usize { 4 | panic!(123); 5 | } 6 | 7 | fn main() { 8 | let _: [u8; hey()] = todo!(); 9 | } 10 | -------------------------------------------------------------------------------- /fixed/86033.rs: -------------------------------------------------------------------------------- 1 | #![feature(generic_const_exprs)] 2 | 3 | pub trait IsTrue {} 4 | impl IsTrue for () {} 5 | 6 | pub trait IsZST {} 7 | 8 | impl IsZST for T 9 | where 10 | (): IsTrue<{ std::mem::size_of::() == 0 }> 11 | {} 12 | 13 | fn func() -> impl IsZST { 14 | || {} 15 | } 16 | -------------------------------------------------------------------------------- /fixed/86053.rs: -------------------------------------------------------------------------------- 1 | trait H {} 2 | 3 | unsafe extern "C" fn ordering4<'a, F: H<&'static &'a ()>>(_: (), ...) {} 4 | 5 | fn main() {} 6 | -------------------------------------------------------------------------------- /fixed/86082.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | option_env!("\0") 3 | } 4 | -------------------------------------------------------------------------------- /fixed/86085.rs: -------------------------------------------------------------------------------- 1 | fn main ( ) { 2 | format ! ( concat ! ( r#"lJ𐏿Æ�.𐏿�"# , "r} {}" ) ) ; 3 | } 4 | -------------------------------------------------------------------------------- /fixed/86132.rs: -------------------------------------------------------------------------------- 1 | #![crate_type = "staticlib"] 2 | use std::mem; 3 | trait Trait {} 4 | const TRAIT_OBJ_UNALIGNED_VTABLE: &Trait = 5 | unsafe { mem::transmute((&92u8, &[0b_______001_11i128; 128])) }; 6 | -------------------------------------------------------------------------------- /fixed/86188.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | [(); return || { 3 | let tx; 4 | }] 5 | } 6 | -------------------------------------------------------------------------------- /fixed/86238.rs: -------------------------------------------------------------------------------- 1 | #![no_core] 2 | fn main() { 3 | let one = || {}; 4 | one() 5 | } 6 | #[lang = "sized"] 7 | trait Sized {} 8 | #[lang = "copy"] 9 | trait Copy {} 10 | -------------------------------------------------------------------------------- /fixed/86528.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rustc -Z print-type-sizes --crate-type lib - <<'EOF' 4 | use std::str::FromStr; 5 | 6 | pub fn foo() { 7 | f64::from_str(""); 8 | } 9 | EOF 10 | -------------------------------------------------------------------------------- /fixed/86719.rs: -------------------------------------------------------------------------------- 1 | trait Bar { 2 | type E; 3 | } 4 | impl Bar for S { 5 | type E = impl ; 6 | fn foo() -> Self::E { 7 | |_| true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /fixed/86756.rs: -------------------------------------------------------------------------------- 1 | trait Foo {} 2 | fn eq() { 3 | eq:: 4 | } 5 | -------------------------------------------------------------------------------- /fixed/87308.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | rustc - -Zunpretty=everybody_loops << 'EOF' 4 | macro_rules! foo { 5 | () => { break 'x; } //~ ERROR use of undeclared label `'x` 6 | } 7 | 8 | pub fn main() { 9 | 'x: loop { foo!() } 10 | } 11 | EOF 12 | -------------------------------------------------------------------------------- /fixed/87340.rs: -------------------------------------------------------------------------------- 1 | type PartiallyDefined = impl 'static; 2 | fn partially_defined() -> PartiallyDefined<_> {} 3 | -------------------------------------------------------------------------------- /fixed/87490.rs: -------------------------------------------------------------------------------- 1 | trait StreamOnce { 2 | type Position; 3 | } 4 | impl StreamOnce for &str { 5 | type Position = usize; 6 | } 7 | fn follow(_: &str) -> <&str as StreamOnce>::Position { 8 | String::new 9 | } 10 | -------------------------------------------------------------------------------- /fixed/87496.rs: -------------------------------------------------------------------------------- 1 | #[repr(transparent)] 2 | struct TransparentCustomZst(()); 3 | extern "C" { 4 | fn good17(p: TransparentCustomZst); 5 | } 6 | 7 | fn main() {} 8 | -------------------------------------------------------------------------------- /fixed/87542.rs: -------------------------------------------------------------------------------- 1 | pub enum Foo { 2 | Bar, 3 | Baz([(); A]), 4 | } 5 | 6 | 7 | fn main() { 8 | // Cannot infer type for 9 9 | // let x = Foo::Bar::<9>; 10 | // Compiler error 11 | let x = Foo::Bar::<9usize>; 12 | } 13 | -------------------------------------------------------------------------------- /fixed/87558.rs: -------------------------------------------------------------------------------- 1 | #![feature(unboxed_closures)] 2 | 3 | struct ErrorKind; 4 | struct Error(ErrorKind); 5 | impl Fn(&isize) for Error { 6 | fn from() {} 7 | } 8 | 9 | fn main() {} 10 | -------------------------------------------------------------------------------- /fixed/87762.rs: -------------------------------------------------------------------------------- 1 | #![feature(generic_associated_types)] 2 | 3 | trait Trait { 4 | type Assoc<'a>; 5 | } 6 | 7 | fn f(_: T, _: fn(T::Assoc<'_>)) {} 8 | 9 | struct Type; 10 | 11 | impl Trait for Type { 12 | type Assoc<'a> = &'a (); 13 | } 14 | 15 | fn main() { 16 | f(Type, |_| ()); 17 | } 18 | -------------------------------------------------------------------------------- /fixed/87771.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | let mut arr = vec![vec![]]; 3 | arr[0][0] = arr[0][0] = true; 4 | } 5 | -------------------------------------------------------------------------------- /fixed/87793.rs: -------------------------------------------------------------------------------- 1 | fn m(){#[c=[r 2 | e 3 | e 4 | -------------------------------------------------------------------------------- /fixed/87802.rs: -------------------------------------------------------------------------------- 1 | #![feature(asm)] 2 | 3 | fn hmm() -> ! { 4 | let x; 5 | unsafe { 6 | asm!("/* {0} */", out(reg) x); 7 | } 8 | x 9 | } 10 | 11 | fn main() { 12 | hmm(); 13 | } 14 | -------------------------------------------------------------------------------- /fixed/87877.rs: -------------------------------------------------------------------------------- 1 | macro_rules! two_items {() => ( 2 | extern {} 3 | extern {} 4 | )} 5 | 6 | macro_rules! single_item_funneler {( $item:item ) => ( $item )} 7 | 8 | fn inside_some_function() { 9 | single_item_funneler! { two_items! {} } 10 | } 11 | -------------------------------------------------------------------------------- /fixed/88236.rs: -------------------------------------------------------------------------------- 1 | trait Hrtb<'a> { 2 | type Assoc; 3 | } 4 | 5 | impl<'a> Hrtb<'a> for () { 6 | type Assoc = (); 7 | } 8 | 9 | fn make_impl() -> impl for<'a> Hrtb<'a, Assoc = impl Send + 'a> {} 10 | 11 | pub fn main() {} 12 | -------------------------------------------------------------------------------- /fixed/88434.rs: -------------------------------------------------------------------------------- 1 | const _CONST: &[u8] = &f(&[], |_| {}); 2 | 3 | const fn f(_: &[u8], _: F) -> &[u8] 4 | where 5 | F: FnMut(&u8), 6 | { 7 | panic!() 8 | } 9 | 10 | fn main() {} 11 | -------------------------------------------------------------------------------- /fixed/88536.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rustc --emit=mir -Zsave-analysis - << EOF 4 | 5 | #![allow(incomplete_features)] 6 | #[derive(PartialEq, Eq)] 7 | pub struct Foo {} 8 | pub struct Foo_; 9 | 10 | impl Foo_<{Foo {}}> {} 11 | 12 | fn main() {} 13 | 14 | EOF 15 | -------------------------------------------------------------------------------- /fixed/88586.rs: -------------------------------------------------------------------------------- 1 | trait A where 2 | for<'a> Self: 'a, 3 | { 4 | } 5 | -------------------------------------------------------------------------------- /fixed/88770.rs: -------------------------------------------------------------------------------- 1 | fn m(){print!("",(c for&g 2 | u 3 | e 4 | e 5 | -------------------------------------------------------------------------------- /fixed/88778.rs: -------------------------------------------------------------------------------- 1 | async fn main2() { 2 | match vec![()] { 3 | vec![] => {}, 4 | _ => {} 5 | } 6 | } 7 | 8 | pub fn main() { 9 | main2(); 10 | } 11 | -------------------------------------------------------------------------------- /fixed/88997.rs: -------------------------------------------------------------------------------- 1 | #![allow(incomplete_features)] 2 | #![feature(generic_const_exprs)] 3 | 4 | struct ConstAssert; 5 | trait True {} 6 | impl True for ConstAssert {} 7 | 8 | struct Range(T) 9 | where 10 | ConstAssert<{ MIN <= MAX }>: True; 11 | -------------------------------------------------------------------------------- /fixed/89189.rs: -------------------------------------------------------------------------------- 1 | #![feature(fn_traits, unboxed_closures)] 2 | struct Func {} 3 | impl Fn(&str) -> bool for Func { 4 | extern "rust-call" fn call(&self, args: Args) -> Self::Output { 5 | todo!() 6 | } 7 | } 8 | 9 | fn main() {} 10 | -------------------------------------------------------------------------------- /fixed/89290.rs: -------------------------------------------------------------------------------- 1 | #![feature(const_fn_trait_bound)] 2 | #![feature(const_trait_impl)] 3 | 4 | const fn foo(_: T) {} 5 | 6 | const fn bar() { 7 | foo(|| ()); 8 | } 9 | 10 | pub fn main() {} 11 | -------------------------------------------------------------------------------- /fixed/89333.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | test(&|| 0); 3 | } 4 | 5 | fn test(arg: &impl Fn() -> T) 6 | where 7 | for<'a> &'a T: Default, 8 | { 9 | } 10 | -------------------------------------------------------------------------------- /fixed/89765.rs: -------------------------------------------------------------------------------- 1 | #![feature(const_discriminant)] 2 | #![feature(const_raw_ptr_deref)] 3 | 4 | pub enum Void { } 5 | 6 | pub const C: () = { 7 | unsafe { std::mem::discriminant(&*(&() as *const () as *const Void)); }; 8 | }; 9 | 10 | pub fn main() {} 11 | -------------------------------------------------------------------------------- /fixed/89868.rs: -------------------------------------------------------------------------------- 1 | struct A(B); 2 | implA{fn d(){fn d(){Self(1)}}} 3 | 4 | 5 | pub fn main() {} 6 | -------------------------------------------------------------------------------- /fixed/90847.rs: -------------------------------------------------------------------------------- 1 | #![feature(generic_const_exprs)] 2 | 3 | struct Foo 4 | where [(); 0 + 0]: Sized; 5 | 6 | pub fn main() {} 7 | -------------------------------------------------------------------------------- /fixed/90871-1.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | 2: n([u8; || 1]) 3 | } 4 | -------------------------------------------------------------------------------- /fixed/90871-2.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | 2: n([u8; 3:fn()]) 3 | } 4 | -------------------------------------------------------------------------------- /fixed/90873.rs: -------------------------------------------------------------------------------- 1 | #![u=||{static d=||1;}] 2 | -------------------------------------------------------------------------------- /fixed/91267.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | 0: u8=e> 3 | } 4 | -------------------------------------------------------------------------------- /fixed/91370.rs: -------------------------------------------------------------------------------- 1 | extern { 2 | fn r() { 3 | impl Copy for u8 {} 4 | } 5 | } 6 | 7 | pub fn main() {} 8 | -------------------------------------------------------------------------------- /fixed/91434.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | [9; [[9E; h]]]; 3 | } 4 | -------------------------------------------------------------------------------- /fixed/91461.rs: -------------------------------------------------------------------------------- 1 | #[d=n(_:d:,)] 2 | -------------------------------------------------------------------------------- /fixed/91502.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | Ok { ..0 > 0 } 3 | } 4 | -------------------------------------------------------------------------------- /fixed/91594.rs: -------------------------------------------------------------------------------- 1 | trait Component { 2 | type Interface; 3 | } 4 | trait HasComponent {} 5 | 6 | struct Foo; 7 | 8 | impl HasComponent<>::Interface> for Foo {} 9 | 10 | impl> Component for Foo { 11 | type Interface = u8; 12 | } 13 | 14 | pub fn main() {} 15 | -------------------------------------------------------------------------------- /fixed/91614.rs: -------------------------------------------------------------------------------- 1 | #![feature(portable_simd)] 2 | #![feature(generic_arg_infer)] 3 | use std::simd::{Mask}; 4 | 5 | fn main() { 6 | let y = Mask::<_, _>::splat(false); 7 | } 8 | -------------------------------------------------------------------------------- /fixed/91636.rs: -------------------------------------------------------------------------------- 1 | fn foo(_a: &str) {} 2 | 3 | fn main() { 4 | let x = foo as fn(&'static str); 5 | 6 | let _ = x == foo; 7 | } 8 | -------------------------------------------------------------------------------- /fixed/91801-1.rs: -------------------------------------------------------------------------------- 1 | fn or<'a>(first: &'static (dyn Fn(&'a i32))) -> dyn 'a + Fn(&'a i32) { 2 | return Box::new(panic!()); 3 | } 4 | 5 | fn main() {} 6 | -------------------------------------------------------------------------------- /fixed/91803.rs: -------------------------------------------------------------------------------- 1 | trait Foo<'a> {} 2 | 3 | fn or<'a>(first: &'static dyn Foo<'a>) -> dyn Foo<'a> { 4 | return Box::new(panic!()); 5 | } 6 | 7 | pub fn main() {} 8 | -------------------------------------------------------------------------------- /fixed/91816.rs: -------------------------------------------------------------------------------- 1 | struct S([T; 1]); 2 | 3 | impl S<(K, V)> { 4 | pub const fn foo(mut self, value: V) -> Self { 5 | let _arr = self.0; 6 | self.0[0].1 = value; //~ move 7 | self 8 | } 9 | } 10 | 11 | fn main() {} 12 | -------------------------------------------------------------------------------- /fixed/92054-1.rs: -------------------------------------------------------------------------------- 1 | #![feature(allocator_api)] 2 | 3 | use std::alloc::{Allocator, Global, Layout}; 4 | 5 | fn main() { 6 | let layout: Layout = None.unwrap(); 7 | let ptr: *mut u8 = Global.allocate(layout).unwrap().as_ptr() as _; 8 | let box_ = unsafe { Box::from_raw_in(ptr, &Global) }; 9 | } 10 | -------------------------------------------------------------------------------- /fixed/92074.rs: -------------------------------------------------------------------------------- 1 | pub enum En { 2 | A(Vec) 3 | } 4 | 5 | fn f() -> Result<(), impl core::fmt::Debug> { 6 | let x: En = loop {}; 7 | 8 | assert!(matches!(x, En::A(vec![]))); 9 | Ok::<(), &'static str>(()) 10 | } 11 | -------------------------------------------------------------------------------- /fixed/92100-0.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | let v = vec![0123456789]; 3 | let mid = v.len() / 2; 4 | let s = &v; 5 | match s { 6 | [a..mid, mid, mid..b] => {} 7 | [..] => {} 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /fixed/92100-1.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | match &vec![0] { 3 | [a..1, a, a..1] | _ => {} 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /fixed/92267.rs: -------------------------------------------------------------------------------- 1 | fn i(){println!("🦀%%%";r 2 | -------------------------------------------------------------------------------- /fixed/92464.rs: -------------------------------------------------------------------------------- 1 | #[allow(dead_code)] 2 | #[repr(align(8))] 3 | enum Aligned { 4 | Zero = 0, 5 | One = 1, 6 | } 7 | 8 | fn main() { 9 | let aligned = Aligned::Zero; 10 | println!("{}", aligned as u8); 11 | } 12 | -------------------------------------------------------------------------------- /fixed/92481.rs: -------------------------------------------------------------------------------- 1 | fn r({){Ok{d..||_=m 2 | -------------------------------------------------------------------------------- /fixed/92893.rs: -------------------------------------------------------------------------------- 1 | struct Bug { 2 | a: A 3 | } 4 | 5 | fn main() {} 6 | -------------------------------------------------------------------------------- /fixed/92954.rs: -------------------------------------------------------------------------------- 1 | #![feature(generic_associated_types)] 2 | 3 | pub trait Foo { 4 | type Assoc<'c> 5 | where 6 | Self: 'c; 7 | 8 | fn function() -> for<'x> fn(Self::Assoc<'x>); 9 | } 10 | 11 | fn main() {} 12 | -------------------------------------------------------------------------------- /fixed/93008-1.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | rustc --crate-type lib -Zmir-opt-level=3 - 2>&1 << EOF 4 | 5 | pub fn foo<'a, T>(s: &'a mut ()) where &'a mut (): Clone { 6 | <&mut () as Clone>::clone(&s); 7 | } 8 | 9 | fn main() {} 10 | 11 | EOF 12 | -------------------------------------------------------------------------------- /fixed/93008-2.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | rustc --crate-type lib -Zmir-opt-level=3 - 2>&1 << EOF 4 | 5 | #![feature(trivial_bounds)] 6 | trait Foo { 7 | fn test(self); 8 | } 9 | fn baz() 10 | where 11 | &'static str: Foo, 12 | { 13 | "Foo".test() 14 | } 15 | 16 | EOF 17 | -------------------------------------------------------------------------------- /fixed/93117.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | rustc --crate-type lib -Wrust-2021-incompatible-closure-captures - 2>&1 << EOF 4 | 5 | pub struct A {} 6 | 7 | impl A { 8 | async fn create(path: impl AsRef) { 9 | ; 10 | crate(move || {} ).await 11 | } 12 | } 13 | 14 | 15 | EOF 16 | -------------------------------------------------------------------------------- /fixed/93242-2.rs: -------------------------------------------------------------------------------- 1 | pub fn something(path: &[usize]) -> impl Fn() -> usize { 2 | || match path { 3 | [] => 0, 4 | _ => 1, 5 | } 6 | } 7 | 8 | fn main() {} 9 | -------------------------------------------------------------------------------- /fixed/93282.rs: -------------------------------------------------------------------------------- 1 | fn foo() { 2 | A<'a,> 3 | } 4 | pub fn main() {} 5 | -------------------------------------------------------------------------------- /fixed/93553.rs: -------------------------------------------------------------------------------- 1 | trait Foo { 2 | type Bar; 3 | } 4 | 5 | trait Baz: Foo { 6 | const Bar: Self::Bar; 7 | } 8 | 9 | pub fn main() {} 10 | -------------------------------------------------------------------------------- /fixed/93646.rs: -------------------------------------------------------------------------------- 1 | struct X; 4 | 5 | pub fn main() {} 6 | -------------------------------------------------------------------------------- /fixed/93647-1.sh: -------------------------------------------------------------------------------- 1 | rustc --edition 2021 - 2>&1 << EOF 2 | 3 | 4 | struct X; 7 | 8 | pub fn main() {} 9 | 10 | EOF 11 | -------------------------------------------------------------------------------- /fixed/93647-2.rs: -------------------------------------------------------------------------------- 1 | struct X; 4 | -------------------------------------------------------------------------------- /fixed/93760.rs: -------------------------------------------------------------------------------- 1 | extern "C" { 2 | static FOO: [usize; usize::MAX]; 3 | } 4 | 5 | pub fn main() {} 6 | -------------------------------------------------------------------------------- /fixed/93835.rs: -------------------------------------------------------------------------------- 1 | fn e() { 2 | p:a> 3 | } 4 | -------------------------------------------------------------------------------- /fixed/93871.sh: -------------------------------------------------------------------------------- 1 | rustc -Cdebuginfo=2 - 2>&1 << EOF 2 | 3 | #![feature(unsized_tuple_coercion)] 4 | fn main() { 5 | let x : &(i32, i32, [i32]) = &(0, 1, [2, 3]); 6 | } 7 | 8 | EOF 9 | -------------------------------------------------------------------------------- /fixed/93997.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | while {} {} 3 | } 4 | -------------------------------------------------------------------------------- /fixed/94380.rs: -------------------------------------------------------------------------------- 1 | struct Bug { 2 | a: A 3 | } 4 | 5 | fn main() {} 6 | -------------------------------------------------------------------------------- /fixed/94432.rs: -------------------------------------------------------------------------------- 1 | fn�a(){fn�p(){e}} 2 | -------------------------------------------------------------------------------- /fixed/94599.rs: -------------------------------------------------------------------------------- 1 | pub fn main() { 2 | (||{})(format!("{}", (||format!("{}", "s"))())); 3 | } 4 | -------------------------------------------------------------------------------- /fixed/94627.rs: -------------------------------------------------------------------------------- 1 | struct Bug { 2 | A: [(); { 3 | let x: [u8; Self::W] = [0; Self::W]; 4 | F 5 | } 6 | } 7 | 8 | fn main() {} 9 | -------------------------------------------------------------------------------- /fixed/94629.rs: -------------------------------------------------------------------------------- 1 | impl A for B { 2 | fn a(){{{{({{{ExprKind::Use {});(]),}} 3 | fn b() {c!(<> []))} 4 | 5 | #[rustc_legacy_const_generics(2)] 6 | pub unsafe fn c<>() -> () {} 7 | -------------------------------------------------------------------------------- /fixed/94680.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | println!("{:?}", { 3 | type T = (); 4 | 5 | pub fn cloneit (it: &'_ mut T) -> (&'_ mut T, &'_ mut T) 6 | where 7 | for<'any> &'any mut T : Clone, { 8 | (it.clone(), it) 9 | } 10 | }); } 11 | -------------------------------------------------------------------------------- /fixed/94822-1.rs: -------------------------------------------------------------------------------- 1 | fn a() -> bool { 2 | for i in 0..80*25 { 3 | || {}; 4 | } 5 | #[lang = "sized"] 6 | trait A {} 7 | } 8 | -------------------------------------------------------------------------------- /fixed/94822-2.rs: -------------------------------------------------------------------------------- 1 | #![feature(lang_items)] 2 | 3 | #[lang = "sized"] 4 | trait A {} 5 | 6 | fn a() { 7 | let _ = 0..80*25; 8 | } 9 | -------------------------------------------------------------------------------- /fixed/94835.rs: -------------------------------------------------------------------------------- 1 | #![feature(allocator_api)] 2 | use std::alloc::Global; 3 | 4 | fn main() { 5 | // f(()) // no ICE 6 | f(32); // ICE 7 | } 8 | 9 | pub fn f(val: T) { 10 | *Box::new_in(val, &Global); 11 | } 12 | -------------------------------------------------------------------------------- /fixed/94846.rs: -------------------------------------------------------------------------------- 1 | #![feature(generic_const_exprs)] 2 | 3 | struct S() where S<{}>:; 4 | 5 | pub fn main() {} 6 | -------------------------------------------------------------------------------- /fixed/94961.sh: -------------------------------------------------------------------------------- 1 | rustc -Cdebuginfo=2 - 2>&1 << EOF 2 | 3 | struct S { x: [T; !0] } 4 | 5 | pub fn f() -> usize { 6 | std::mem::size_of::>() 7 | } 8 | 9 | fn main() { 10 | let x = f(); 11 | } 12 | 13 | EOF 14 | -------------------------------------------------------------------------------- /fixed/94998.sh: -------------------------------------------------------------------------------- 1 | rustc --crate-type lib --edition 2018 -Cdebuginfo=2 - 2>&1 << EOF 2 | 3 | 4 | trait Trait {} 5 | 6 | pub fn run(_: &dyn FnOnce(&()) -> Box) {} 7 | 8 | 9 | EOF 10 | -------------------------------------------------------------------------------- /fixed/95023.rs: -------------------------------------------------------------------------------- 1 | struct ErrorKind; 2 | struct Error(ErrorKind); 3 | impl Fn(&isize) for Error { 4 | fn foo(&self) -> Self::B<{N}>; 5 | } 6 | fn main() {} 7 | -------------------------------------------------------------------------------- /fixed/95151.rs: -------------------------------------------------------------------------------- 1 | #[track_caller] 2 | macro_rules! _foo { 3 | () => {}; 4 | } 5 | 6 | fn main() { 7 | } 8 | -------------------------------------------------------------------------------- /fixed/95163.rs: -------------------------------------------------------------------------------- 1 | fn bar() -> impl Into<<() as Reexported; 2 | -------------------------------------------------------------------------------- /fixed/95271.sh: -------------------------------------------------------------------------------- 1 | rustc --crate-type lib --edition=2021 - 2>&1 << EOF 2 | 3 | enum Foo { 4 | Foo(i32), 5 | } 6 | 7 | fn bar(foo: Foo) { 8 | || { 9 | // `let foo = foo;` makes the ICE disappear 10 | let Foo::Foo(baz) = foo; 11 | }; 12 | } 13 | pub fn main() {} 14 | 15 | EOF 16 | -------------------------------------------------------------------------------- /fixed/95272.rs: -------------------------------------------------------------------------------- 1 | #![feature(nll)] 2 | 3 | use std::cell::Cell; 4 | 5 | fn check<'a, 'b>(x: Cell<&'a ()>, y: Cell<&'b ()>) 6 | where 7 | 'a: 'b, 8 | { 9 | } 10 | 11 | fn test<'a, 'b>(x: Cell<&'a ()>, y: Cell<&'b ()>) { 12 | let f = check; 13 | f(x, y); 14 | } 15 | 16 | fn main() {} 17 | -------------------------------------------------------------------------------- /fixed/95307.rs: -------------------------------------------------------------------------------- 1 | pub trait C{async fn new(val: T) -> [u8; _]; 2 | as Trait<&'a u32> Collate for () = [0u8; 4]; 3 | use std::mem; 4 | 5 | fn foo() -> usize { 6 | macro ice(){} 7 | 8 | fn main(){} 9 | -------------------------------------------------------------------------------- /fixed/95421.rs: -------------------------------------------------------------------------------- 1 | // Compile as binary 2 | fn h5(_: T) 3 | where 4 | for<'x> fn(&'x u32): Fn(&'x u32), 5 | { 6 | } 7 | 8 | fn main(){ 9 | h5(|_|{}) 10 | } 11 | -------------------------------------------------------------------------------- /fixed/95540.rs: -------------------------------------------------------------------------------- 1 | // check-pass 2 | #![feature(lint_reasons)] 3 | #![allow(unused)] 4 | 5 | #[expect(drop_bounds)] 6 | fn trigger_rustc_lints() { 7 | } 8 | 9 | fn main() {} 10 | -------------------------------------------------------------------------------- /fixed/95628.rs: -------------------------------------------------------------------------------- 1 | #![feature(type_alias_impl_trait)] 2 | 3 | type T = impl Sized; 4 | 5 | struct Foo; 6 | 7 | impl Into for Foo { 8 | fn into(self) -> T {} 9 | } 10 | 11 | fn main(){ 12 | let _: T = Foo.into(); 13 | } 14 | -------------------------------------------------------------------------------- /fixed/95647-1.rs: -------------------------------------------------------------------------------- 1 | trait Tr { 2 | type Output; 3 | } 4 | 5 | impl Tr for () { 6 | type Output = T; 7 | } 8 | 9 | fn g() -> impl for<'a> Tr<&'a u8, Output = impl std::fmt::Debug + 'a> { } 10 | 11 | pub fn main() {} 12 | -------------------------------------------------------------------------------- /fixed/95647-2.rs: -------------------------------------------------------------------------------- 1 | trait Tr<'a> { 2 | type Assoc; 3 | } 4 | 5 | impl<'a> Tr<'a> for () { 6 | type Assoc = &'a (); 7 | } 8 | 9 | fn g() -> impl for<'a> Tr<'a, Assoc = impl Send + 'a> {} 10 | -------------------------------------------------------------------------------- /fixed/95665.rs: -------------------------------------------------------------------------------- 1 | pub trait Trait: {} 2 | 3 | pub struct Struct { 4 | member: T, 5 | } 6 | 7 | // uncomment and bug goes away 8 | //impl Trait for u8 {} 9 | 10 | extern "C" { 11 | static VAR: Struct; 12 | } 13 | 14 | fn main() {} 15 | -------------------------------------------------------------------------------- /fixed/95823.rs: -------------------------------------------------------------------------------- 1 | #![feature(ptr_metadata)] 2 | 3 | pub struct S; 4 | 5 | impl S 6 | where 7 | ():, 8 | { 9 | fn f(_: ::Metadata) {} 10 | } 11 | 12 | pub fn main() {} 13 | -------------------------------------------------------------------------------- /fixed/95829.rs: -------------------------------------------------------------------------------- 1 | extern { 2 | async fn L() { 3 | async fn M() {} 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /fixed/96114.sh: -------------------------------------------------------------------------------- 1 | rustc -Zast-json - 2>&1 << EOF 2 | 3 | #![feature(attr_literals)] 4 | #[repr("C")] 5 | struct A { } 6 | fn main() { } 7 | 8 | EOF 9 | -------------------------------------------------------------------------------- /fixed/96172.rs: -------------------------------------------------------------------------------- 1 | #![feature(rustc_attrs)] 2 | #[rustc_mir(borrowck_graphviz_postflow="hello.dot")] 3 | fn main() {} 4 | -------------------------------------------------------------------------------- /fixed/96225.rs: -------------------------------------------------------------------------------- 1 | fn L(,,) { 2 | L(vec![]) 3 | } 4 | -------------------------------------------------------------------------------- /fixed/96258.rs: -------------------------------------------------------------------------------- 1 | #![warn(rust_2021_incompatible_closure_captures)] 2 | impl Numberer { 3 | pub(crate) async fn new( 4 | interval: Duration, 5 | -------------------------------------------------------------------------------- /fixed/96259.rs: -------------------------------------------------------------------------------- 1 | #[derive(Print)] 2 | struct Foo<#[cfg] A, B> { 3 | third: [u8; { 4 | #[cfg] let a = #[cfg] u8, #[] bool, 5 | 6 | #[derive(P]struct o<#[cfg]B>{t:[0;{#[cfg]let 0=#[cfg]0, 7 | -------------------------------------------------------------------------------- /fixed/96299.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | rustc --edition=2021 - << EOF 4 | 5 | enum E { 6 | S(u8), 7 | } 8 | 9 | fn main() { 10 | let x = E::S(0); 11 | || { 12 | let E::S(_x) = x; 13 | }; 14 | } 15 | 16 | EOF 17 | -------------------------------------------------------------------------------- /fixed/96335.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | 0.....{loop{}1} 3 | } 4 | -------------------------------------------------------------------------------- /fixed/96512.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | rustc --edition=2021 - << EOF 4 | 5 | struct Struct; 6 | enum Enum { Variant(Struct) } 7 | fn main() { 8 | let _enum = Enum::Variant(Struct); 9 | || { 10 | let Enum::Variant(_value) = _enum; 11 | }; 12 | } 13 | 14 | EOF 15 | -------------------------------------------------------------------------------- /fixed/96525.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | rustc --edition=2021 - << EOF 4 | 5 | struct Struct<'a>(&'a str); 6 | 7 | async fn foo() -> Struct { 8 | todo!() 9 | } 10 | 11 | fn main() { 12 | foo(); 13 | } 14 | 15 | EOF 16 | -------------------------------------------------------------------------------- /fixed/96572-2.rs: -------------------------------------------------------------------------------- 1 | #![feature(type_alias_impl_trait)] 2 | 3 | fn main() { 4 | type T = impl Copy; 5 | let foo: T = Some((1u32, 2u32)); 6 | match foo { 7 | None => (), 8 | Some((a, b)) => (), 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /fixed/96572.rs: -------------------------------------------------------------------------------- 1 | #![feature(type_alias_impl_trait)] 2 | 3 | fn main() { 4 | type T = impl Copy; 5 | let foo: T = (1u32, 2u32); 6 | let (a, b): (u32, u32) = foo; 7 | } 8 | -------------------------------------------------------------------------------- /fixed/96583.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | drop.n 3 | } 4 | -------------------------------------------------------------------------------- /fixed/96594.rs: -------------------------------------------------------------------------------- 1 | #![allow(incomplete_features)] 2 | #![feature(generic_const_exprs)] 3 | #![crate_type = "lib"] 4 | 5 | #[repr(u8)] 6 | pub enum SomeByte 7 | where 8 | [(); VALUE as usize]:, 9 | { 10 | Value = VALUE, 11 | } 12 | -------------------------------------------------------------------------------- /fixed/96631.rs: -------------------------------------------------------------------------------- 1 | trait FromAll = for From; 2 | trait FromAllWithSendAndSync = for From where T : Send + Sync; 3 | -------------------------------------------------------------------------------- /fixed/96638.rs: -------------------------------------------------------------------------------- 1 | fn f(_: usize, _: &usize, _: usize) {} 2 | 3 | fn arg() -> T { todo!() } 4 | 5 | fn main() { 6 | let x = arg(); // `x` must be inferred 7 | f(&x, ""); // The reference on `&x` is important to reproduce the ICE 8 | } 9 | -------------------------------------------------------------------------------- /fixed/96847.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | for _ in [] { 3 | #![doc=""] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /fixed/96954.rs: -------------------------------------------------------------------------------- 1 | trait Tr<'a> { 2 | type Assoc; 3 | } 4 | fn test_argument_position(x: impl for<'a> Tr<'a, Assoc = impl Copy + 'a>) {} 5 | fn main() {} 6 | -------------------------------------------------------------------------------- /fixed/97099-1.rs: -------------------------------------------------------------------------------- 1 | pub trait Trait<'a> { 2 | type Assoc; 3 | } 4 | 5 | struct Struct; 6 | impl<'a> Trait<'a> for Struct { 7 | type Assoc = &'a u32; 8 | } 9 | 10 | fn blah() -> impl for<'a> Trait<'a, Assoc = impl Sized> { 11 | Struct 12 | } 13 | -------------------------------------------------------------------------------- /fixed/97193.rs: -------------------------------------------------------------------------------- 1 | extern { 2 | fn a(&mut self) { 3 | fn b(buf: &Self) { 4 | } 5 | -------------------------------------------------------------------------------- /fixed/97194.rs: -------------------------------------------------------------------------------- 1 | extern "" { 2 | fn bget(&self, index: [usize; Self::DIM]) -> bool { 3 | type T; 4 | type T<'a> = &'a str; 5 | } 6 | 7 | fn main() {} 8 | -------------------------------------------------------------------------------- /fixed/97197.rs: -------------------------------------------------------------------------------- 1 | fn f() { 2 | g((), ()); 3 | } 4 | 5 | pub fn g(a1: (), a2: bool, a3: bool, a4: bool, a5: bool, a6: ()) {} 6 | -------------------------------------------------------------------------------- /fixed/97226.rs: -------------------------------------------------------------------------------- 1 | fn uwu() -> impl ?Sized {} 2 | pub fn main() {} 3 | -------------------------------------------------------------------------------- /fixed/97484.rs: -------------------------------------------------------------------------------- 1 | struct A; 2 | struct B; 3 | struct C; 4 | struct D; 5 | struct E; 6 | struct F; 7 | struct G; 8 | 9 | fn foo(a: &A, d: D, e: &E, g: G) {} 10 | 11 | fn main() { 12 | foo(&&A, B, C, D, E, F, G); 13 | } 14 | -------------------------------------------------------------------------------- /fixed/97490.rs: -------------------------------------------------------------------------------- 1 | pub type Yes = extern "sysv64" fn(&'static u8) -> !; 2 | 3 | fn main() { 4 | unsafe { 5 | let yes = &6 as *const _ as *const Yes; 6 | core::arch::asm!("call {}", in(reg) yes, options(noreturn)); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /fixed/97534-1.rs: -------------------------------------------------------------------------------- 1 | macro_rules! m { 2 | () => { 3 | macro_rules! foo { 4 | () => {} 5 | } 6 | use foo as bar; 7 | } 8 | } 9 | 10 | m!{} 11 | 12 | use bar as baz; 13 | 14 | baz!{} 15 | 16 | fn main() {} 17 | -------------------------------------------------------------------------------- /fixed/97534-2.rs: -------------------------------------------------------------------------------- 1 | macro_rules! foo { 2 | () => {}; 3 | } 4 | 5 | macro_rules! m { 6 | () => { 7 | use foo as bar; 8 | }; 9 | } 10 | 11 | m! {} 12 | 13 | use bar as baz; 14 | 15 | baz! {} 16 | 17 | fn main() {} 18 | -------------------------------------------------------------------------------- /fixed/97625.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | rustc -Cinstrument-coverage - << EOF 4 | 5 | #![feature(adt_const_params)] 6 | #![allow(incomplete_features)] 7 | 8 | fn eval() -> f32 { 9 | N 10 | } 11 | 12 | fn main() { 13 | println!("{}", eval::<0.5>()); 14 | } 15 | 16 | EOF 17 | -------------------------------------------------------------------------------- /fixed/97634.rs: -------------------------------------------------------------------------------- 1 | pub enum Register { 2 | Field0 = 40, 3 | Field1, 4 | } 5 | 6 | fn main() { 7 | let _b = Register::<0>::Field1 as u16; 8 | } 9 | -------------------------------------------------------------------------------- /fixed/97698.rs: -------------------------------------------------------------------------------- 1 | use std::ffi::CString; 2 | 3 | impl Lock { 4 | pub fn new() { 5 | if () == -1 { 6 | CString::new(); 7 | } 8 | } 9 | } 10 | 11 | fn main() {} 12 | -------------------------------------------------------------------------------- /fixed/97806.rs: -------------------------------------------------------------------------------- 1 | struct TestErr { 2 | field: std::marker::PhantomData, 3 | } 4 | 5 | impl TestErr { 6 | fn func_a() {} 7 | 8 | fn func_b() { 9 | Self::func_a(); 10 | 11 | let variable = None; 12 | } 13 | } 14 | 15 | fn main() {} 16 | -------------------------------------------------------------------------------- /fixed/97836.rs: -------------------------------------------------------------------------------- 1 | fn a() where for T: Copy { } 2 | -------------------------------------------------------------------------------- /fixed/97898.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | let x = "foo"; 3 | 4 | match x { 5 | x @ ("foo" | "bar") | 6 | x @ ("red" | "blue") => { 7 | } 8 | _ => (), 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /fixed/97946.rs: -------------------------------------------------------------------------------- 1 | struct A { 2 | inner: T 3 | } 4 | 5 | impl A { 6 | thread_local! { 7 | static MY_STATIC: Option = None; 8 | } 9 | } 10 | 11 | fn main() {} 12 | -------------------------------------------------------------------------------- /fixed/98016.rs: -------------------------------------------------------------------------------- 1 | #![crate_type = "lib"] 2 | #![feature(repr_simd)] 3 | 4 | #[repr(simd)] 5 | pub struct Simd([u8; 8]); 6 | 7 | pub fn to_array_outer(x: Simd) -> [u8; 8] { 8 | let y = x; 9 | y.0 10 | } 11 | -------------------------------------------------------------------------------- /fixed/98170.rs: -------------------------------------------------------------------------------- 1 | pub struct MyStruct<'a> { 2 | field: &'a [u32], 3 | } 4 | 5 | impl MyStruct<'_> { 6 | pub fn new<'a>(field: &'a[u32]) -> MyStruct<'a> { 7 | Self{field} 8 | } 9 | } 10 | 11 | fn main() {} 12 | -------------------------------------------------------------------------------- /fixed/98432.rs: -------------------------------------------------------------------------------- 1 | struct Struct(T); 2 | 3 | impl Struct { 4 | const CONST: fn() = || { 5 | struct _Obligation 6 | where 7 | T:; 8 | }; 9 | } 10 | 11 | fn main() {} 12 | 13 | -------------------------------------------------------------------------------- /fixed/98813.rs: -------------------------------------------------------------------------------- 1 | #![feature(adt_const_params)] 2 | 3 | const ZERO: f64 = 0.0; 4 | 5 | pub struct Foo {} 6 | 7 | fn main() { 8 | let _ = Foo::<0.0> {}; // fails 9 | let _ = Foo:: {}; // passes 10 | } 11 | -------------------------------------------------------------------------------- /fixed/98821.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rustc -Zmir-opt-level=3 - <<'EOF' 4 | 5 | #![feature(unboxed_closures)] 6 | 7 | extern "rust-call" fn foo(_: T) {} 8 | 9 | fn main() { 10 | foo(()); 11 | foo((1, 2)); 12 | } 13 | 14 | 15 | EOF 16 | 17 | -------------------------------------------------------------------------------- /fixed/98842.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rustc --crate-type lib --edition=2021 - <<'EOF' 4 | 5 | struct Foo(<&'static Foo as ::core::ops::Deref>::Target); 6 | const _: *const Foo = 0 as _; 7 | 8 | EOF 9 | 10 | -------------------------------------------------------------------------------- /fixed/98897.rs: -------------------------------------------------------------------------------- 1 | pub fn main() { 2 | (|_, ()| ())([return, ()]); 3 | } 4 | -------------------------------------------------------------------------------- /fixed/99073.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | let _ = fix(|_: &dyn Fn()| {}); 3 | } 4 | 5 | fn fix(f: F) -> impl Fn() { 6 | move || f(fix(&f)) 7 | } 8 | -------------------------------------------------------------------------------- /fixed/99228.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rustc -Zvalidate-mir - <<'EOF' 4 | 5 | #![feature(let_else)] 6 | fn example_let_else(value: Option) { 7 | let _inner = value else { 8 | return; 9 | }; 10 | } 11 | fn main() { 12 | example_let_else(None); 13 | } 14 | 15 | EOF 16 | 17 | -------------------------------------------------------------------------------- /fixed/99318.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rustc -Zunpretty=hir - <<'EOF' 4 | 5 | #![feature(let_else)] 6 | 7 | pub fn main() { 8 | let Some(x) = &Some(3) else { 9 | panic!(); 10 | }; 11 | *x += 1; //~ ERROR: cannot assign to `*x`, which is behind a `&` reference 12 | } 13 | 14 | EOF 15 | 16 | -------------------------------------------------------------------------------- /fixed/99331.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rustc -Zunpretty=expanded - <<'EOF' 4 | 5 | extern "路濫狼á́́" fn foo() {} //~ ERROR invalid ABI 6 | 7 | fn main() { } 8 | 9 | EOF 10 | 11 | -------------------------------------------------------------------------------- /fixed/99363.rs: -------------------------------------------------------------------------------- 1 | #![feature(type_alias_impl_trait)] 2 | 3 | #[derive(Copy, Clone)] 4 | struct Foo((u32, u32)); 5 | 6 | fn main() { 7 | type T = impl Copy; 8 | let foo: T = Foo((1u32, 2u32)); 9 | let x = move || { 10 | let Foo((a, b)) = foo; 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /fixed/99566.rs: -------------------------------------------------------------------------------- 1 | #![feature(closure_lifetime_binder)] 2 | 3 | fn main() { 4 | for || -> () {}; 5 | } 6 | -------------------------------------------------------------------------------- /fixed/99642.rs: -------------------------------------------------------------------------------- 1 | fn test() -> impl Iterator { 2 | Box::new(0..) as Box> 3 | } 4 | 5 | pub fn main() {} 6 | -------------------------------------------------------------------------------- /fixed/99647.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rustc --edition=2018 -Zcrate-attr="feature(generic_const_exprs)" - <<'EOF' 4 | 5 | #[allow(unused)] 6 | async fn foo<'a>() { 7 | let _data = &mut [0u8; { 1 + 4 }]; 8 | bar().await 9 | } 10 | 11 | async fn bar() {} 12 | 13 | fn main() {} 14 | 15 | EOF 16 | -------------------------------------------------------------------------------- /fixed/99665-1.rs: -------------------------------------------------------------------------------- 1 | pub trait MyComponent { 2 | type Properties; 3 | } 4 | 5 | impl MyComponent for M 6 | where 7 | M: 'static, 8 | { 9 | type Properties = (); 10 | } 11 | 12 | fn main() { 13 | |_: <&u8 as MyComponent>::Properties| {}; 14 | } 15 | -------------------------------------------------------------------------------- /fixed/99734.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cat > out.rs <<'EOF' 4 | 5 | pub use std::*; 6 | 7 | pub mod task {} 8 | 9 | pub fn main() { 10 | println!("Hello, world!"); 11 | } 12 | 13 | EOF 14 | 15 | rustdoc out.rs 16 | -------------------------------------------------------------------------------- /fixed/99777-1.rs: -------------------------------------------------------------------------------- 1 | pub fn test() { 2 | #[doc(alias = "test")] 3 | { 4 | println!("Hello, world!"); 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /fixed/99777-2.rs: -------------------------------------------------------------------------------- 1 | pub fn test() { 2 | #[doc(alias = "test")] 3 | let num_flags = 0; 4 | } 5 | -------------------------------------------------------------------------------- /fixed/99777-3.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | match () { 3 | #[doc(alias = "foo")] 4 | _ => {} 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /fixed/99828.rs: -------------------------------------------------------------------------------- 1 | fn get_iter(vec: &[i32]) -> impl Iterator + '_ { 2 | vec.iter() 3 | } 4 | 5 | fn main() { 6 | let vec = Vec::new(); 7 | let mut iter = get_iter(&vec); 8 | iter.next(); 9 | } 10 | -------------------------------------------------------------------------------- /fixed/99914.rs: -------------------------------------------------------------------------------- 1 | struct Error; 2 | 3 | fn foo() { 4 | let initial_exchange: Result = todo!(); 5 | initial_exchange.and_then(|_| 6 | serve_udp_tunnel() 7 | ).await; 8 | } 9 | 10 | async fn serve_udp_tunnel() {} 11 | -------------------------------------------------------------------------------- /fixed/_23189/23189.rs: -------------------------------------------------------------------------------- 1 | struct _23189 { 2 | x: i32, 3 | } 4 | -------------------------------------------------------------------------------- /ices/101962.rs: -------------------------------------------------------------------------------- 1 | #![feature(core_intrinsics)] 2 | 3 | pub fn wrapping(a: T, b: T) { 4 | let _z = core::intrinsics::wrapping_mul(a, b); 5 | } 6 | 7 | fn main() { 8 | wrapping(1,2); 9 | } 10 | -------------------------------------------------------------------------------- /ices/102252.rs: -------------------------------------------------------------------------------- 1 | #![feature(min_specialization, rustc_attrs)] 2 | 3 | #[rustc_specialization_trait] 4 | pub trait Trait {} 5 | 6 | struct Struct 7 | where 8 | Self: Iterator::Item>, {} 9 | 10 | impl Trait for Struct {} 11 | 12 | fn main() {} 13 | -------------------------------------------------------------------------------- /ices/103708.rs: -------------------------------------------------------------------------------- 1 | #![feature(min_specialization)] 2 | 3 | trait Dance { 4 | fn foo(); 5 | } 6 | 7 | impl<'a, T> Dance for T { 8 | fn foo() {} 9 | } 10 | 11 | impl Dance for bool { 12 | fn foo() {} 13 | } 14 | 15 | fn main() {} 16 | -------------------------------------------------------------------------------- /ices/108271-1.rs: -------------------------------------------------------------------------------- 1 | pub trait TraitWAssocConst { 2 | const A: T; 3 | } 4 | 5 | fn foo>() {} 6 | 7 | fn main() {} 8 | -------------------------------------------------------------------------------- /ices/108271-2.rs: -------------------------------------------------------------------------------- 1 | #![feature(generic_const_exprs)] 2 | #![allow(incomplete_features)] 3 | 4 | pub trait TraitWAssocConst { 5 | const A: dyn TraitWAssocConst; 6 | } 7 | 8 | fn bar>() {} 9 | 10 | fn main() {} 11 | -------------------------------------------------------------------------------- /ices/108814.rs: -------------------------------------------------------------------------------- 1 | #![feature(non_lifetime_binders)] 2 | 3 | fn take(_: impl for FnOnce(T) -> T) {} 4 | 5 | fn main() { 6 | take(|x| x) 7 | } 8 | 9 | -------------------------------------------------------------------------------- /ices/109681.rs: -------------------------------------------------------------------------------- 1 | #![crate_type="lib"] 2 | #![feature(linkage)] 3 | 4 | #[linkage = "common"] 5 | pub static TEST3: bool = true; 6 | 7 | fn main() {} -------------------------------------------------------------------------------- /ices/110726.rs: -------------------------------------------------------------------------------- 1 | fn foo<'a>() -> impl Sized + 'a { 2 | let i: i32 = foo(); 3 | i 4 | } 5 | 6 | fn main() {} 7 | -------------------------------------------------------------------------------- /ices/111742.rs: -------------------------------------------------------------------------------- 1 | #![allow(incomplete_features)] 2 | #![feature(generic_const_exprs)] 3 | 4 | const CONST: u32 = 0; 5 | struct Test where [(); N as usize]: , ([u32; N as usize]); 6 | 7 | fn main() { 8 | let _: Test<1>; 9 | } 10 | -------------------------------------------------------------------------------- /ices/111906-1.rs: -------------------------------------------------------------------------------- 1 | fn foo<'a: 'a>() -> impl Sized { 2 | let _: () = foo::<'a>(); 3 | loop {} 4 | } 5 | 6 | fn main() {} 7 | -------------------------------------------------------------------------------- /ices/111906-3.rs: -------------------------------------------------------------------------------- 1 | fn foo<'a: 'a>() -> impl Sized + 'a { 2 | let _: *mut &'a () = foo::<'a>(); 3 | loop {} 4 | } 5 | 6 | fn main() {} 7 | -------------------------------------------------------------------------------- /ices/111911.rs: -------------------------------------------------------------------------------- 1 | #![feature(adt_const_params)] 2 | 3 | fn foo() -> impl Sized {} 4 | 5 | fn main() {} 6 | -------------------------------------------------------------------------------- /ices/112630.rs: -------------------------------------------------------------------------------- 1 | enum Foo { 2 | Bar(B), 3 | } 4 | 5 | fn main() { 6 | let _ = [0u32; Foo::Bar as usize]; 7 | } 8 | -------------------------------------------------------------------------------- /ices/113379.rs: -------------------------------------------------------------------------------- 1 | async fn f999() -> Vec { 2 | 'b: { 3 | continue 'b; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /ices/34127.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rustc -g - << EOF 4 | 5 | pub fn main() { 6 | let _a = [(); 1 << 63]; 7 | } 8 | 9 | EOF 10 | -------------------------------------------------------------------------------- /ices/57276.rs: -------------------------------------------------------------------------------- 1 | #![feature(arbitrary_self_types, dispatch_from_dyn)] 2 | 3 | use std::ops::{Deref, DispatchFromDyn}; 4 | 5 | trait Trait + DispatchFromDyn> { 6 | fn foo(self: T) -> dyn Trait; 7 | } 8 | 9 | fn main() {} 10 | -------------------------------------------------------------------------------- /ices/79409.rs: -------------------------------------------------------------------------------- 1 | #![feature(extern_types)] 2 | #![feature(unsized_locals)] 3 | 4 | extern { 5 | type Device; 6 | } 7 | 8 | unsafe fn make_device() -> Box { 9 | Box::from_raw(0 as *mut _) 10 | } 11 | 12 | fn main() { 13 | let d: Device = unsafe { *make_device() }; 14 | } 15 | -------------------------------------------------------------------------------- /ices/79468.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cat > out.rs <<'EOF' 4 | const HUGE_SIZE: usize = !0usize / 8; 5 | static MY_TOO_BIG_ARRAY_2: [u8; HUGE_SIZE] = [0x00; HUGE_SIZE]; 6 | 7 | EOF 8 | 9 | rustdoc --edition=2021 out.rs 10 | -------------------------------------------------------------------------------- /ices/83056.rs: -------------------------------------------------------------------------------- 1 | struct WSAPROTOCOLCHAIN { 2 | ChainEntries: [DWORD; SetFileAttributesW as usize], 3 | } 4 | extern "C" { 5 | fn SetFileAttributesW() -> BOOL; 6 | } 7 | -------------------------------------------------------------------------------- /ices/86720.rs: -------------------------------------------------------------------------------- 1 | #![crate_type = "staticlib"] 2 | #![feature(core_intrinsics)] 3 | use std::intrinsics::rustc_peek; 4 | #[no_mangle] 5 | fn foo() -> i32 { 6 | let x = 0; 7 | rustc_peek(x) 8 | } 9 | -------------------------------------------------------------------------------- /ices/87577.rs: -------------------------------------------------------------------------------- 1 | #[derive(Debug)] 2 | struct S<#[cfg(feature = "alloc")] N: A> {} 3 | -------------------------------------------------------------------------------- /ices/94379.rs: -------------------------------------------------------------------------------- 1 | #![crate_type = "staticlib"] 2 | #![feature(core_intrinsics)] 3 | use std::intrinsics::rustc_peek; 4 | #[no_mangle] 5 | fn foo() -> i32 { 6 | let x = 0; 7 | rustc_peek(x) 8 | } 9 | -------------------------------------------------------------------------------- /ices/96304.rs: -------------------------------------------------------------------------------- 1 | #![feature(asm_sym)] 2 | core::arch::global_asm!("/* {} */", sym<&'static ()>::clone); 3 | 4 | pub fn main() {} 5 | --------------------------------------------------------------------------------