summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgy Yakovlev <gyakovlev@gentoo.org>2021-07-02 23:54:02 -0700
committerGeorgy Yakovlev <gyakovlev@gentoo.org>2021-07-02 23:59:13 -0700
commit2a568c4551fd621c4d929443fb3ce1391d4149f3 (patch)
tree725866b4734d7a9d32382f577e7fa6dad85b6d7e
parentdev-lang/rust-bin: drop 1.51.0 (diff)
downloadgentoo-2a568c4551fd621c4d929443fb3ce1391d4149f3.tar.gz
gentoo-2a568c4551fd621c4d929443fb3ce1391d4149f3.tar.bz2
gentoo-2a568c4551fd621c4d929443fb3ce1391d4149f3.zip
dev-lang/rust: drop 1.51.0-r2
Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
-rw-r--r--dev-lang/rust/Manifest34
-rw-r--r--dev-lang/rust/files/1.51.0-bootstrap-panic.patch43
-rw-r--r--dev-lang/rust/files/rustc-1.51.0-backport-pr81728.patch181
-rw-r--r--dev-lang/rust/files/rustc-1.51.0-backport-pr81741.patch44
-rw-r--r--dev-lang/rust/files/rustc-1.51.0-backport-pr82289.patch96
-rw-r--r--dev-lang/rust/files/rustc-1.51.0-backport-pr82292.patch120
-rw-r--r--dev-lang/rust/files/rustc-1.51.0-backport-pr83629.patch142
-rw-r--r--dev-lang/rust/rust-1.51.0-r2.ebuild666
8 files changed, 0 insertions, 1326 deletions
diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
index 44d8e23c4321..800417f34fc4 100644
--- a/dev-lang/rust/Manifest
+++ b/dev-lang/rust/Manifest
@@ -1,35 +1,3 @@
-DIST rust-1.50.0-aarch64-unknown-linux-gnu.tar.xz 203382140 BLAKE2B c9547661356bfb2eb328992ecbfd488114bc68c00e551cbbeb925fd1650b5a4c0ab33145c6e994184766ef5046cc2881eb0009ac9d9448208cf896317bf47c63 SHA512 e6b409afc8e85a88ecb9ff439a6eb9dcb93d5553e81549fb4f332b9e2d946dce0424319c5092e60aab9435944af70d0117d15c12d54d2059ef73c1fdf36d8273
-DIST rust-1.50.0-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 2fb27b64770fe6594aa4d855697d918998d8d60b951589a965a245ad0da485d302b23b7a3e2d1e1715719d05e43967e607cdf77b826bf15bd6bb1ab44a43f94d SHA512 a9a4b9e866bb9fed6d6933d7b9060ce98dd9a71f2c86bd224fd0489dd51e80d266e6816fda064f65e063dd01083912548a39c82a0389b280d7823e9ef4b2241e
-DIST rust-1.50.0-aarch64-unknown-linux-musl.tar.xz 204473556 BLAKE2B b47fe60f8e558a673b1c5fa47a0ebe9f73b09012b5df718baf0683536fa94d840cf0006830f6f4c36740d5e598b1c67b9d0df69a4e8d698520f05f5644cc3b69 SHA512 6a15af6a30c59325c21587689e3f99ca20a9a8ee0b19866569f2f7405d2b176ed88903776799e1ebcabbfc665b5e0f3c7878f841db6c5a75eceda57ace18185a
-DIST rust-1.50.0-aarch64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B db41d9aba2948b2da29722534bad85440e7a5f7025748422860f430f06d84f2a9d0ef348396f8dd222677858f2256663b57865c0a21c7daa23b142211c3582f2 SHA512 ea1770fc51855dc131f9aafc8cfa02d5baae25b9512d7167a7a67c0e93d3464cfb9c48a24a7391bd3ffb96ef51e302a55835880d10878dc1c7b1c0dc6a83711e
-DIST rust-1.50.0-arm-unknown-linux-gnueabi.tar.xz 193322872 BLAKE2B 2654e604a609f287b2722bbcac325461cc8a84d47e449470da1925f3d21a042d665e55d07f4f268e37630184998ed330b2c2e315485ebeee960c63555550c9cd SHA512 eb3aefa4ff7d2b832a847b6d4fd4427d88885cc72c3a9f97837e2516d202af39da7d523de2d1578fde20aeb76e843a84c37b4ba33f85668caa0b28d63a20968a
-DIST rust-1.50.0-arm-unknown-linux-gnueabi.tar.xz.asc 801 BLAKE2B 2927ca6c92b5d14436a1c785a231c4191ed0d1cdda59b8eac81d073d1a6c75aac70947d5c85f273b72cf7df977617d89372cc817493597cc94fab122fbc6a08b SHA512 53b8f4e77a56f453e0cd1b0dfe88c667a38606ac07389258f60809cd823205ba82320604bc41039d70c4e55deb641e447d605f6ae7518ffe7468f0bd79738fbd
-DIST rust-1.50.0-arm-unknown-linux-gnueabihf.tar.xz 191287452 BLAKE2B 34958b97d034f6c643036c61d64e25aaedf1c93046ca039e39c9083a54d030d715d17a3174bd69bdad3f9bdb8b89c9b92f977b7d3c29da4eb28efe933402e86b SHA512 7b1f61fd53fbb361fc6b3ee603917f899f3cfc8062df3cadb0751e8014e1e2633f32ba198912e8bca34102543c427f2607e861b724143d60fd1f9682578be70d
-DIST rust-1.50.0-arm-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 8cf492d8d6fa31e2c630b849bfb166501a0b8abdbb4ea4529aaf29484feb9349ce06c161bb129e32b65306a01058d29336333fad00699d963eaa3de75a2fa2c8 SHA512 85706b922eae5112f067ce1c7454c505c73516db2fb22bd66b5c2116c967b8df4b9140360ccb4c78e15e7f6d6ce24421ead0e8456b48ca28bd3a70d2b8f0298d
-DIST rust-1.50.0-armv7-unknown-linux-gnueabihf.tar.xz 194656336 BLAKE2B d02323d9f47d380f4a06e8273b02ac3c9091257400a59b3efd1140ef22aa3bcbb71b4c5e70aaeb2cd118839a84b3513d9c85ff8020b5a1f6e68791ae5d81b8f3 SHA512 c3314436afc4ebed697bf6828b9eacbc12f96838b156241331a3b71e99e1438f8ad82e701615ea302ebfc459464479442fe653232bd319cf824027362438970d
-DIST rust-1.50.0-armv7-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B ee81ed5ed81e587e6972648dba990ba330f689fd5f96513d5abc982b9e03bc38ea197c709dad73e1964ba362208099c98c36dec949877676eb3ce9b9509d45c0 SHA512 f7d07aba9c56dbfc94ae3bb44272495e05cc69a8f99c0ad9e668694b5009f32e4fdd934f50ed4ad219023922d5fc6e54bea40e9fd7e17ee4de48fa6a2f565623
-DIST rust-1.50.0-i686-unknown-linux-gnu.tar.xz 222946404 BLAKE2B 38801f395ab8f5aeee1cb709cd7fda6b6573476f9d763931086c76b0064ec0d5dff03415bc2f6f13419fb1a326cb44a0086dd42db99d1e14d520b33c6382e340 SHA512 bff117733d11731f56e8659265d0b47327e2af3f7c46aca494747a92b4f634dd35fa9731a1be59dd69821042f88bded253e1d7b5693ca237c9a167408ca7f898
-DIST rust-1.50.0-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 2327426a92265c52eb96d8aa65e1cc226d253e2ae416238b4392374c13e90c7d7d99dca9f581703594825574f01b930c092f20786469c3022229c0152674c132 SHA512 a8bdb87723860bf246829e50de2f1c92ee314e25d310982f45b0e3aea82d7fe361637eb1d90f590fdbfd2fc3604959d6c5a9144f04e20c11336ae7b3b2eaae5d
-DIST rust-1.50.0-mips-unknown-linux-gnu.tar.xz 150524936 BLAKE2B 950424444394dd55fd81c6b850798552166d78588fcc2c4dfdd4bbc900600957eed06c4a03c83713f2f820252949f57651d69e4d2a2b78d7de42fd7e0c0404f4 SHA512 849d70b5f4b4364070c5f708e466a86afead7d82d7fde4d1ef7c8800bc1ebcafdd4e1bc69f059e393fd8fce104f2d97201f09ecb3b894676e6ff6db9c949c897
-DIST rust-1.50.0-mips-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 3e051e17016274dbf7b6b6649d7506485c2f97425e4d7ce456b403615be2f327a99634eb6831d730b7e7b5a9f6d4eecc78d9d9a50a67393ca462bd949f80b5e3 SHA512 ed5b2cc3308dd1d632b8560552aeb46c064475d0c1ad7dba977cf9659b3d115548826d546b0d4a3ecc24a92d6c8c9f27a2809b52cedd507dda3063b118b0eeb0
-DIST rust-1.50.0-mips64-unknown-linux-gnuabi64.tar.xz 159792596 BLAKE2B a361c13c036d7cc964ace781c34ed815946c976071d38d361110856e889174e2629ad9602dde5f6d5a704044cab670687b67643470b199ee18e95944dbccba16 SHA512 d85c2abff3249ccca63d14abfa85f5320e5d227b17faf7b4b47a5254a4b8ee3a4cf3ccb84e31f13dae7780176411e2a5d04894e2422ae5921f547cc5e07fd1b9
-DIST rust-1.50.0-mips64-unknown-linux-gnuabi64.tar.xz.asc 801 BLAKE2B 049a4a10e28ebc37ed69e03d4780a40e4b887d00a88faa9822b285c95c2e7b1c5ca208e95e3356cf92bc3b5238563c607d3b6c9f3e43bdfa492fddc7a121cd9d SHA512 ae413182c24cdada092ab808fa2dc335137bae848a6f6ba480807bd62e20a9f2f498e22efc8309511a66fe7095cfdbf11355f6dd94f7a260da83bc065dbb8d7e
-DIST rust-1.50.0-mipsel-unknown-linux-gnu.tar.xz 156597932 BLAKE2B 57bf7d105f6f9d3a50904466439e88e32c99b5fd85f220ef48e82fe91b2c05c28d6783233dd3e9ba7b49e79eeeb358cd1df60369bbd927a9a867a0bdaed471c7 SHA512 019df8180520bc4fd29a258017e2477a59a30338d921f185871f64aa81d8b5499e88676d09d5887f9c6726824ae4bf50f8a9e6fae1f03e9e728f0f08ab0271c4
-DIST rust-1.50.0-mipsel-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 706f17c35f5d0680abac08a1d86bd3206342e266e40a4fefb651c873979c39ba7a7e372086a6a50fd6eb9b23df2105d2f26afbe8f314697a70d98afbca318871 SHA512 95e1cff9aeb49e3cda09a6068e2a863ec188220ca9326ab82e72a0ffba1b2419572983183ba404c0876a8459b05300908806ca7ba769c420516516c4eb41d201
-DIST rust-1.50.0-powerpc-unknown-linux-gnu.tar.xz 168133824 BLAKE2B d2ce955ae8975d667c854fc1f8dab5de8b8a3ecf08e52dab57f40f5a036138b6006554f053616c7d369e054f9ba3dbc502b2fa47ff0463e077f831f75b831c4f SHA512 1411063401432b2aed58f53c7e9c87d70177cb7745753378df052676a6b0ee19bf7e56298584356b77707758ad531e5d4d59140cd6e686bd7cee53488553214a
-DIST rust-1.50.0-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 786dac9a6fb19d30dfd4b2926e4992685ed17a0f247aefc54fc99ee2a49a74177f327142ea18e5e324f9fb33f2eb482cdad50c55f0a5eb886ba4c76f4742b67d SHA512 589a2999ee8c7ab4e809a299ab4b50b9bd52a5fd34ff8e1a0f1c187a9b7e31b73f376b08ff5a1a30a819457adb73d5504bc52ecd0f50b49bf9f0dd9dbd60bcb9
-DIST rust-1.50.0-powerpc64-unknown-linux-gnu.tar.xz 180157804 BLAKE2B 8d3c38cdea4901f38665e66f880301c409d0de4ade5fd931c834680ee21d014fe6efb6928a417bcc747ac10ceeabccf287c0a29c009525e2d2fec92db60bad01 SHA512 d60fa7d029c52403c08722b4cdda8ebcfbbf23f57770db786007b21c8e0590577f58823b8e0b89adb38c351102b6aba0c02afa5c3582eecec5165bccb50b4944
-DIST rust-1.50.0-powerpc64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 74a45316f3ad5924db4f9c714d25e0f4ce3e94bc022544f238a32417f3d4f43327402d404bd96675d60779c12968a6cfc3b837804772de000048a808b82ff676 SHA512 74e9663e347376819318aa2faf53e20d85aa2879ff88d94f64f8d01a278c2d7f051e1a31300142c02a049f4f0ad4cff2f2dc944a3ed3436283cfd00b5238ead2
-DIST rust-1.50.0-powerpc64le-unknown-linux-gnu.tar.xz 189754060 BLAKE2B 8579349a7d916ee701f29bd66d08a76d8433ad86020571e5484edbc8d9a984088e6942e31b18179698a199ade2fcee3b1b9aed1cc0d5a3b996e763ef2b8e0b33 SHA512 e3dc75ba7dff3a358042542afa398ec8771a23f5f699454a876ddc1f3583d399fe5350696a5da62d71ca97ea882c9ae1fcb60dc2e9fdf76bc7a9af892096371e
-DIST rust-1.50.0-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B ed68b9dd309bcc4d575374a3eab6e96f5625dd84fee58abc6fffa4aa37b2b51010cf8c9d638d2b16b92ba7d4c80e238c4a788a800adef5da90a9ed337ed6898d SHA512 e6569a50256f30a1f91233fc855f8b8d03a8a1f75f583a4260a8f18acff7e2ef8c355775525aeeaf28ba33684a9636926ce0d6f4e542933ba0ddafb1e839654f
-DIST rust-1.50.0-riscv64gc-unknown-linux-gnu.tar.xz 177780892 BLAKE2B 1c52d993383a1de7a4635c573e11ecb04db4f926435d3aa912f8d9c2169778fed43580567cc143406e8937a117591c9ce2ad38f8a54829684d61a04af274c5c9 SHA512 437d0d35c1a64e1be336e258546511a3af4d809411eea507950768878bb66053412b4297c4101e166edf42baf722885458784e2ac87ce2fc618bd981448785ff
-DIST rust-1.50.0-riscv64gc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B d0e8567ebacf42fccd11a210b56fbf82a7e31ff568db2fe2427e8c57b4a9e3a8de0b568479020881f1c8343a135d202731920190075dd1d523aaac1861d4e806 SHA512 1dc1d7f431727bcae85e453b907a8bc93221dae09823fae5f4b89c7a78dd1b239e41c264f62fcbd1dbf42e3eab17304be312dda36bd3844baed08611e443cf76
-DIST rust-1.50.0-s390x-unknown-linux-gnu.tar.xz 190157972 BLAKE2B 4fe8ec73293815ade006e2c383d1a6d541d87d4ebba76b3ace65793f7debfd54d3dc07cac89c43e41947f8d0b69bd0f213dbdca8173f610ca2da03bccdd55ddd SHA512 733513af2a7ef7a782a5ebfbd080071194ac47084022b54b4830de84facef9986d65525f8666a4c226e9878e43b00ebced26d6077e5fb1b7f775ac8f290fba97
-DIST rust-1.50.0-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 034daffe5d8df69e5cff8d4ba58e8c8d1540ff3bda07c816871e272a3bd6764ba4b8300cca96cdec3bf1b2994cb9111f4d79682561c6f9de1293f58e1e59449c SHA512 3c4f2aeb8533616148e11c7250396cd2c113b0a0725889b9bc8e9a5d4d1069c26852e4aa0b69887bbc2b42c2145a3faf8047bc7b1e24ceb76c88b7c288529dc3
-DIST rust-1.50.0-x86_64-unknown-linux-gnu.tar.xz 152873328 BLAKE2B b0bb91487186f13a7a1a49edeac28bc347c300911f574aba0e70c37e05b688176f5941c97cc4ad0ceddf32f2fbc0bdda6f8a1fdfa482aeb9682ea1fade28206e SHA512 ab49e3ecb14e4af8e48548845184e9ab3d564ab2341c1e5462b7847347c79d13324211b860988d219ccb646143bf142fb14c3ab03663b06cfe9ca275128d9fa0
-DIST rust-1.50.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 681ddf4d3d0c4a3e30a288835d8ab1238e5b9184526f1f61c52547f7122055be20b13595347937945a215d1d81e95c1adfbf89034123f5f66949b446bcc44434 SHA512 b512f9a7d0b53f058ba0766c241b60fab2d313b2462348747e7dd7ac52e9ca41487344a7bbb7f6dd3342737908b48ebfd367b563714108d7beeabb8fecc4eca8
-DIST rust-1.50.0-x86_64-unknown-linux-musl.tar.xz 242743828 BLAKE2B f20feb709cc07ad43f69e30a7fcefa81b5de94ee4c90cbce2616fcda8af2591a27cfa0770b71138762e21f6e07263bf3c2548bcce1b707831ab544de12ab746a SHA512 68403236e213a4f2c156b36a03ca4dd7866fdb69e87170efc76426d937dcf5cf2c5578aaf73483131b1ce7750302f9d02de1bcbc52e1283b08220d5b22be82ca
-DIST rust-1.50.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B d26d5e5f536b0e6ba0b87d97a1975e0e8245309e013fafba9be466da6c599bd7149c2a726b8bd7ac93b44511ead18deb99321dabdfccb95dd06d6adb71397c1a SHA512 1a0b4c40caafb6ca88d4679779cd80d4c334e5262952b13ce4b9fd34ba1258c15f421ac9920e81874d071f53bf14e9307f00bebdf42494bfeb2a504ff5f1b6c3
DIST rust-1.51.0-aarch64-unknown-linux-gnu.tar.xz 208849064 BLAKE2B 1570536f63237ce04222f78c8c1d0592b3d0bacb62e2a1e2b87f9cd74c8d304837f9259c154e6ddfc5d0fc36c1d69aba34cb27d41346d4e7400ad1950ff19f8f SHA512 2af31290e1065a4611f34e6cc8c62ee494c222becfb21ec6707059c119069b0adf0eec23e56bad4a3cc8690b2556309ec58cbd9003a959983689cc46c7c63361
DIST rust-1.51.0-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B cc2cef574740ea5eb632235dca2889a7c6a6941169ac011d3a888cdefb8e5a5af5bb9ade93207ccb6adc82eb6ae1b5ed605954cea2561163c538fcbbcdb647f8 SHA512 43abb6e19c1ca905cb2d047503f4473584e06b8daecff3b6e45ac93dadc2c7f37118e3b66124180a9951b2f5eedf212174a37c661a7775600bd200eb089801f9
DIST rust-1.51.0-aarch64-unknown-linux-musl.tar.xz 209607568 BLAKE2B 8a8d677fac5aa68be8b689bd999894f0b51910d50d86d70db4cc9b60695703dd74b68578b72d9d410d2d163aebd3fbab0993ebf79486a103ef588cb849dc2038 SHA512 d7ca480f4e07f88a49b475d2fcd132126defff21c26a665d1b444b97ce5e44404f9106bb844a5e35d4933a51c2d8a5aabc8ee42a2515c02a559c81937920be4d
@@ -94,8 +62,6 @@ DIST rust-1.52.0-x86_64-unknown-linux-gnu.tar.xz 143053436 BLAKE2B cdbbd529c5d82
DIST rust-1.52.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B ec204ee0968d4114023f40dfdd8654451149b5433dbb4eec192cc68135f45ed28ae7b06eabdab417401529162c11939ee101f7eddce304111fe93e9806347902 SHA512 4ae425def112d8c38e91ded53fdd73a6c7d2043eda22ce955aaa7303ff2cd6e7e8d0cfaa0d596b29195ba449811653f91b9b65c8c96b3cc8136d060609594828
DIST rust-1.52.0-x86_64-unknown-linux-musl.tar.xz 239422556 BLAKE2B 8bef78b335b384e6bf7a5dd4a47511aa69ce0de6f9d1ab78146cd55f37e01b358a0cb82b95dcd27d25d4a114b707155b923415f9a91e6a75ab83bca9f5f7e0e3 SHA512 30a9f45f591c3beb34deee23611b5afe0f90b7a2a1b7b813498547b3264ecb98ef1d6bdfb77468bd5364f2942d927418037eb4ffe413db520c701fdf79c89bf2
DIST rust-1.52.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 2d69f81dd47ce7387311b576a7770f2b457beebba8cd1554e5eac501025b7b54e72078b69c7cf8a61bc295298d7f277f39a070ee8d83564942149a1b42089594 SHA512 688e3eaaf2a7e7995a9b36e6856b7922b4deada31fdab198df335b316672d20bc80e5e717cee4e2fc2f51ec8abaf97880dfa5424a7b122e46b02fb7f62836378
-DIST rustc-1.51.0-src.tar.xz 109596164 BLAKE2B c1ac89655adfe7db8005476d42c748cf1896f52888141229fd6dda43855dbb08c21c8e1f11398d2f1f9dd5f8d508d9158a3bda4f1b282d1b184ea4c701100837 SHA512 ded91468ddf3e6627f00e7ec3d44452aa24eb727a183c0de9d90264f593119a54300d56b09251a88260db480b48554181ae195c538996a32d68d48b6587ac0df
-DIST rustc-1.51.0-src.tar.xz.asc 801 BLAKE2B dc06d0bc40bcc5ec5ae247495b6975584a80a35480d36d45db4db57872432cc9c3d38238bf68a56386bffc6987f5c491cc75ef21cc7ba9260073c199d7e1791a SHA512 f00d69117e9f38a179219f976230582fc51b494a71519fd3c032a8abdf8d554d659122f671881783f2a49517b79cc4617986447d5972f7ff2467d56fce312c4c
DIST rustc-1.52.1-src.tar.xz 115109508 BLAKE2B c5d73f5884037d287d88ba9fdaf63a36678b692e1b510920045797ab29f1660f05cda901e19411ff83ec3084c4130034c269976b1056220f3e629cff116d07f0 SHA512 55f5053ce40d4eba4663052817aef6a6275139ca229c89cd1ec44711458b412720203301d8c7975aac5720a91fcaf21847f8184f641cbb0004f722520283c73c
DIST rustc-1.52.1-src.tar.xz.asc 801 BLAKE2B ea2f89289b4d9cf90a0d10148bf3494805c00e7822cc98addf0b602c35e4635bb1963d79168b395a5f7c7bd024070284fccd19757982daa0d554dcac166fd4d7 SHA512 0d692a085c017b03b8a135a28f7e6f1d7e05642d2e99f0f1fbc397e766bb8fed4b4c6b4c9157b79d9bb0c4229607dbc35711cd463c62a9966a4efb6f197de7d3
DIST rustc-1.53.0-src.tar.xz 115686332 BLAKE2B fa068f89d42f927fdc79ee31aad1386eaf2aa596a060e059c5a1a73fe48c48d008fc952cd6c7912b743e41d77a94b205639eed0f728b2539b62f18a772cabfe3 SHA512 70485cf7a0f7fc36ee31644e546374079dc387a85b44e5e793707fd0a4d7ca05d311291e78b86db955485d8f21c47ff9e1908acc4da68ba04929287213a40c24
diff --git a/dev-lang/rust/files/1.51.0-bootstrap-panic.patch b/dev-lang/rust/files/1.51.0-bootstrap-panic.patch
deleted file mode 100644
index 529d5a1f402f..000000000000
--- a/dev-lang/rust/files/1.51.0-bootstrap-panic.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 31c93397bde772764cda3058e16f9cef61895090 Mon Sep 17 00:00:00 2001
-From: Joshua Nelson <jyn514@gmail.com>
-Date: Mon, 8 Feb 2021 22:51:21 -0500
-Subject: [PATCH] Use format string in bootstrap panic instead of a string
- directly
-
-This fixes the following warning when compiling with nightly:
-
-```
-warning: panic message is not a string literal
- --> src/bootstrap/builder.rs:1515:24
- |
-1515 | panic!(out);
- | ^^^
- |
- = note: `#[warn(non_fmt_panic)]` on by default
- = note: this is no longer accepted in Rust 2021
-help: add a "{}" format string to Display the message
- |
-1515 | panic!("{}", out);
- | ^^^^^
-help: or use std::panic::panic_any instead
- |
-1515 | std::panic::panic_any(out);
- | ^^^^^^^^^^^^^^^^^^^^^^
-```
----
- src/bootstrap/builder.rs | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
-index f1a160250dbe1..0f5fcb4af400d 100644
---- a/src/bootstrap/builder.rs
-+++ b/src/bootstrap/builder.rs
-@@ -1490,7 +1490,7 @@ impl<'a> Builder<'a> {
- for el in stack.iter().rev() {
- out += &format!("\t{:?}\n", el);
- }
-- panic!(out);
-+ panic!("{}", out);
- }
- if let Some(out) = self.cache.get(&step) {
- self.verbose(&format!("{}c {:?}", " ".repeat(stack.len()), step));
diff --git a/dev-lang/rust/files/rustc-1.51.0-backport-pr81728.patch b/dev-lang/rust/files/rustc-1.51.0-backport-pr81728.patch
deleted file mode 100644
index 20373f42d307..000000000000
--- a/dev-lang/rust/files/rustc-1.51.0-backport-pr81728.patch
+++ /dev/null
@@ -1,181 +0,0 @@
-From 70f17ca715d3d7e2fd79cc909b95fd3a6357c13e Mon Sep 17 00:00:00 2001
-From: Yechan Bae <yechan@gatech.edu>
-Date: Wed, 3 Feb 2021 16:36:33 -0500
-Subject: [PATCH 1/2] Fixes #80335
-
----
- library/alloc/src/str.rs | 42 ++++++++++++++++++++++----------------
- library/alloc/tests/str.rs | 30 +++++++++++++++++++++++++++
- 2 files changed, 54 insertions(+), 18 deletions(-)
-
-diff --git a/library/alloc/src/str.rs b/library/alloc/src/str.rs
-index 70e0c7dba5ea..a7584c6b6510 100644
---- a/library/alloc/src/str.rs
-+++ b/library/alloc/src/str.rs
-@@ -90,8 +90,8 @@ fn join(slice: &Self, sep: &str) -> String {
- }
- }
-
--macro_rules! spezialize_for_lengths {
-- ($separator:expr, $target:expr, $iter:expr; $($num:expr),*) => {
-+macro_rules! specialize_for_lengths {
-+ ($separator:expr, $target:expr, $iter:expr; $($num:expr),*) => {{
- let mut target = $target;
- let iter = $iter;
- let sep_bytes = $separator;
-@@ -102,7 +102,8 @@ macro_rules! spezialize_for_lengths {
- $num => {
- for s in iter {
- copy_slice_and_advance!(target, sep_bytes);
-- copy_slice_and_advance!(target, s.borrow().as_ref());
-+ let content_bytes = s.borrow().as_ref();
-+ copy_slice_and_advance!(target, content_bytes);
- }
- },
- )*
-@@ -110,11 +111,13 @@ macro_rules! spezialize_for_lengths {
- // arbitrary non-zero size fallback
- for s in iter {
- copy_slice_and_advance!(target, sep_bytes);
-- copy_slice_and_advance!(target, s.borrow().as_ref());
-+ let content_bytes = s.borrow().as_ref();
-+ copy_slice_and_advance!(target, content_bytes);
- }
- }
- }
-- };
-+ target
-+ }}
- }
-
- macro_rules! copy_slice_and_advance {
-@@ -153,7 +156,7 @@ fn join_generic_copy<B, T, S>(slice: &[S], sep: &[T]) -> Vec<T>
- // if the `len` calculation overflows, we'll panic
- // we would have run out of memory anyway and the rest of the function requires
- // the entire Vec pre-allocated for safety
-- let len = sep_len
-+ let reserved_len = sep_len
- .checked_mul(iter.len())
- .and_then(|n| {
- slice.iter().map(|s| s.borrow().as_ref().len()).try_fold(n, usize::checked_add)
-@@ -161,22 +164,25 @@ fn join_generic_copy<B, T, S>(slice: &[S], sep: &[T]) -> Vec<T>
- .expect("attempt to join into collection with len > usize::MAX");
-
- // crucial for safety
-- let mut result = Vec::with_capacity(len);
-- assert!(result.capacity() >= len);
-+ let mut result = Vec::with_capacity(reserved_len);
-+ debug_assert!(result.capacity() >= reserved_len);
-
- result.extend_from_slice(first.borrow().as_ref());
-
- unsafe {
-- {
-- let pos = result.len();
-- let target = result.get_unchecked_mut(pos..len);
--
-- // copy separator and slices over without bounds checks
-- // generate loops with hardcoded offsets for small separators
-- // massive improvements possible (~ x2)
-- spezialize_for_lengths!(sep, target, iter; 0, 1, 2, 3, 4);
-- }
-- result.set_len(len);
-+ let pos = result.len();
-+ let target = result.get_unchecked_mut(pos..reserved_len);
-+
-+ // copy separator and slices over without bounds checks
-+ // generate loops with hardcoded offsets for small separators
-+ // massive improvements possible (~ x2)
-+ let remain = specialize_for_lengths!(sep, target, iter; 0, 1, 2, 3, 4);
-+
-+ // issue #80335: A weird borrow implementation can return different
-+ // slices for the length calculation and the actual copy, so
-+ // `remain.len()` might be non-zero.
-+ let result_len = reserved_len - remain.len();
-+ result.set_len(result_len);
- }
- result
- }
-diff --git a/library/alloc/tests/str.rs b/library/alloc/tests/str.rs
-index 604835e6cc4a..6df8d8c2f354 100644
---- a/library/alloc/tests/str.rs
-+++ b/library/alloc/tests/str.rs
-@@ -160,6 +160,36 @@ fn test_join_for_different_lengths_with_long_separator() {
- test_join!("~~~~~a~~~~~bc", ["", "a", "bc"], "~~~~~");
- }
-
-+#[test]
-+fn test_join_isue_80335() {
-+ use core::{borrow::Borrow, cell::Cell};
-+
-+ struct WeirdBorrow {
-+ state: Cell<bool>,
-+ }
-+
-+ impl Default for WeirdBorrow {
-+ fn default() -> Self {
-+ WeirdBorrow { state: Cell::new(false) }
-+ }
-+ }
-+
-+ impl Borrow<str> for WeirdBorrow {
-+ fn borrow(&self) -> &str {
-+ let state = self.state.get();
-+ if state {
-+ "0"
-+ } else {
-+ self.state.set(true);
-+ "123456"
-+ }
-+ }
-+ }
-+
-+ let arr: [WeirdBorrow; 3] = Default::default();
-+ test_join!("0-0-0", arr, "-");
-+}
-+
- #[test]
- #[cfg_attr(miri, ignore)] // Miri is too slow
- fn test_unsafe_slice() {
---
-2.31.1
-
-
-From 10020817d2e6756be1ff2ac3c182af97cf7fe904 Mon Sep 17 00:00:00 2001
-From: Yechan Bae <yechan@gatech.edu>
-Date: Sat, 20 Mar 2021 13:42:54 -0400
-Subject: [PATCH 2/2] Update the comment
-
----
- library/alloc/src/str.rs | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/library/alloc/src/str.rs b/library/alloc/src/str.rs
-index a7584c6b6510..4d1e876457b8 100644
---- a/library/alloc/src/str.rs
-+++ b/library/alloc/src/str.rs
-@@ -163,7 +163,7 @@ fn join_generic_copy<B, T, S>(slice: &[S], sep: &[T]) -> Vec<T>
- })
- .expect("attempt to join into collection with len > usize::MAX");
-
-- // crucial for safety
-+ // prepare an uninitialized buffer
- let mut result = Vec::with_capacity(reserved_len);
- debug_assert!(result.capacity() >= reserved_len);
-
-@@ -178,9 +178,9 @@ fn join_generic_copy<B, T, S>(slice: &[S], sep: &[T]) -> Vec<T>
- // massive improvements possible (~ x2)
- let remain = specialize_for_lengths!(sep, target, iter; 0, 1, 2, 3, 4);
-
-- // issue #80335: A weird borrow implementation can return different
-- // slices for the length calculation and the actual copy, so
-- // `remain.len()` might be non-zero.
-+ // A weird borrow implementation may return different
-+ // slices for the length calculation and the actual copy.
-+ // Make sure we don't expose uninitialized bytes to the caller.
- let result_len = reserved_len - remain.len();
- result.set_len(result_len);
- }
---
-2.31.1
-
diff --git a/dev-lang/rust/files/rustc-1.51.0-backport-pr81741.patch b/dev-lang/rust/files/rustc-1.51.0-backport-pr81741.patch
deleted file mode 100644
index 8ef22eea56fd..000000000000
--- a/dev-lang/rust/files/rustc-1.51.0-backport-pr81741.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 40d3f2d7ef5835317fe9df9ecc01f4c363def4fd Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian@centricular.com>
-Date: Thu, 4 Feb 2021 10:23:01 +0200
-Subject: [PATCH] Increment `self.index` before calling
- `Iterator::self.a.__iterator_get_unchecked` in `Zip` `TrustedRandomAccess`
- specialization
-
-Otherwise if `Iterator::self.a.__iterator_get_unchecked` panics the
-index would not have been incremented yet and another call to
-`Iterator::next` would read from the same index again, which is not
-allowed according to the API contract of `TrustedRandomAccess` for
-`!Clone`.
-
-Fixes https://github.com/rust-lang/rust/issues/81740
-
-(cherry picked from commit 86a4b27475aab52b998c15f5758540697cc9cff0)
----
- library/core/src/iter/adapters/zip.rs | 7 ++++---
- 1 file changed, 4 insertions(+), 3 deletions(-)
-
-diff --git a/library/core/src/iter/adapters/zip.rs b/library/core/src/iter/adapters/zip.rs
-index 98b8dca96140..9f9835345200 100644
---- a/library/core/src/iter/adapters/zip.rs
-+++ b/library/core/src/iter/adapters/zip.rs
-@@ -198,12 +198,13 @@ fn next(&mut self) -> Option<(A::Item, B::Item)> {
- Some((self.a.__iterator_get_unchecked(i), self.b.__iterator_get_unchecked(i)))
- }
- } else if A::may_have_side_effect() && self.index < self.a.size() {
-+ let i = self.index;
-+ self.index += 1;
- // match the base implementation's potential side effects
-- // SAFETY: we just checked that `self.index` < `self.a.len()`
-+ // SAFETY: we just checked that `i` < `self.a.len()`
- unsafe {
-- self.a.__iterator_get_unchecked(self.index);
-+ self.a.__iterator_get_unchecked(i);
- }
-- self.index += 1;
- None
- } else {
- None
---
-2.31.1
-
diff --git a/dev-lang/rust/files/rustc-1.51.0-backport-pr82289.patch b/dev-lang/rust/files/rustc-1.51.0-backport-pr82289.patch
deleted file mode 100644
index 5cf543319775..000000000000
--- a/dev-lang/rust/files/rustc-1.51.0-backport-pr82289.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-From 5222e2ba2d97cd716a379b4ae6bc62c5f7c2dd36 Mon Sep 17 00:00:00 2001
-From: Giacomo Stevanato <giaco.stevanato@gmail.com>
-Date: Fri, 19 Feb 2021 12:15:37 +0100
-Subject: [PATCH 1/3] Increment self.len in specialized ZipImpl to avoid
- underflow in size_hint
-
-(cherry picked from commit 66a260617a88ed1ad55a46f03c5a90d5ad3004d3)
----
- library/core/src/iter/adapters/zip.rs | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/library/core/src/iter/adapters/zip.rs b/library/core/src/iter/adapters/zip.rs
-index 9f9835345200..f08bfac837fe 100644
---- a/library/core/src/iter/adapters/zip.rs
-+++ b/library/core/src/iter/adapters/zip.rs
-@@ -200,6 +200,7 @@ fn next(&mut self) -> Option<(A::Item, B::Item)> {
- } else if A::may_have_side_effect() && self.index < self.a.size() {
- let i = self.index;
- self.index += 1;
-+ self.len += 1;
- // match the base implementation's potential side effects
- // SAFETY: we just checked that `i` < `self.a.len()`
- unsafe {
---
-2.31.1
-
-
-From d39669fc8282830a374d19d204f7b4ee8eb1e381 Mon Sep 17 00:00:00 2001
-From: Giacomo Stevanato <giaco.stevanato@gmail.com>
-Date: Fri, 19 Feb 2021 12:16:12 +0100
-Subject: [PATCH 2/3] Add test for underflow in specialized Zip's size_hint
-
-(cherry picked from commit 8b9ac4d4155c74db5b317046033ab9c05a09e351)
----
- library/core/tests/iter/adapters/zip.rs | 20 ++++++++++++++++++++
- 1 file changed, 20 insertions(+)
-
-diff --git a/library/core/tests/iter/adapters/zip.rs b/library/core/tests/iter/adapters/zip.rs
-index 1fce0951e365..a59771039295 100644
---- a/library/core/tests/iter/adapters/zip.rs
-+++ b/library/core/tests/iter/adapters/zip.rs
-@@ -245,3 +245,23 @@ fn test_double_ended_zip() {
- assert_eq!(it.next_back(), Some((3, 3)));
- assert_eq!(it.next(), None);
- }
-+
-+#[test]
-+fn test_issue_82282() {
-+ fn overflowed_zip(arr: &[i32]) -> impl Iterator<Item = (i32, &())> {
-+ static UNIT_EMPTY_ARR: [(); 0] = [];
-+
-+ let mapped = arr.into_iter().map(|i| *i);
-+ let mut zipped = mapped.zip(UNIT_EMPTY_ARR.iter());
-+ zipped.next();
-+ zipped
-+ }
-+
-+ let arr = [1, 2, 3];
-+ let zip = overflowed_zip(&arr).zip(overflowed_zip(&arr));
-+
-+ assert_eq!(zip.size_hint(), (0, Some(0)));
-+ for _ in zip {
-+ panic!();
-+ }
-+}
---
-2.31.1
-
-
-From 4b382167dd5ed5a6eac0cf314bfb86e3704b6e76 Mon Sep 17 00:00:00 2001
-From: Giacomo Stevanato <giaco.stevanato@gmail.com>
-Date: Fri, 19 Feb 2021 12:17:48 +0100
-Subject: [PATCH 3/3] Remove useless comparison since now self.index <=
- self.len is an invariant
-
-(cherry picked from commit aeb4ea739efb70e0002a4a9c4c7b8027dd0620b3)
----
- library/core/src/iter/adapters/zip.rs | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/library/core/src/iter/adapters/zip.rs b/library/core/src/iter/adapters/zip.rs
-index f08bfac837fe..dcbcb1ce7200 100644
---- a/library/core/src/iter/adapters/zip.rs
-+++ b/library/core/src/iter/adapters/zip.rs
-@@ -261,7 +261,7 @@ fn next_back(&mut self) -> Option<(A::Item, B::Item)>
- if sz_a != sz_b {
- let sz_a = self.a.size();
- if a_side_effect && sz_a > self.len {
-- for _ in 0..sz_a - cmp::max(self.len, self.index) {
-+ for _ in 0..sz_a - self.len {
- self.a.next_back();
- }
- }
---
-2.31.1
-
diff --git a/dev-lang/rust/files/rustc-1.51.0-backport-pr82292.patch b/dev-lang/rust/files/rustc-1.51.0-backport-pr82292.patch
deleted file mode 100644
index 4baf72a26190..000000000000
--- a/dev-lang/rust/files/rustc-1.51.0-backport-pr82292.patch
+++ /dev/null
@@ -1,120 +0,0 @@
-From 0babb88efc4d36f3defafc3c3c0343793fa05d52 Mon Sep 17 00:00:00 2001
-From: Giacomo Stevanato <giaco.stevanato@gmail.com>
-Date: Wed, 3 Mar 2021 21:09:01 +0100
-Subject: [PATCH 1/2] Prevent Zip specialization from calling
- __iterator_get_unchecked twice with the same index after calling next_back
-
-(cherry picked from commit 2371914a05f8f2763dffe6e2511d0870bcd6b461)
----
- library/core/src/iter/adapters/zip.rs | 13 +++++++++----
- 1 file changed, 9 insertions(+), 4 deletions(-)
-
-diff --git a/library/core/src/iter/adapters/zip.rs b/library/core/src/iter/adapters/zip.rs
-index dcbcb1ce7200..7dac0c63ca2d 100644
---- a/library/core/src/iter/adapters/zip.rs
-+++ b/library/core/src/iter/adapters/zip.rs
-@@ -13,9 +13,10 @@
- pub struct Zip<A, B> {
- a: A,
- b: B,
-- // index and len are only used by the specialized version of zip
-+ // index, len and a_len are only used by the specialized version of zip
- index: usize,
- len: usize,
-+ a_len: usize,
- }
- impl<A: Iterator, B: Iterator> Zip<A, B> {
- pub(in crate::iter) fn new(a: A, b: B) -> Zip<A, B> {
-@@ -110,6 +111,7 @@ impl<A, B> ZipImpl<A, B> for Zip<A, B>
- b,
- index: 0, // unused
- len: 0, // unused
-+ a_len: 0, // unused
- }
- }
-
-@@ -184,8 +186,9 @@ impl<A, B> ZipImpl<A, B> for Zip<A, B>
- B: TrustedRandomAccess + Iterator,
- {
- fn new(a: A, b: B) -> Self {
-- let len = cmp::min(a.size(), b.size());
-- Zip { a, b, index: 0, len }
-+ let a_len = a.size();
-+ let len = cmp::min(a_len, b.size());
-+ Zip { a, b, index: 0, len, a_len }
- }
-
- #[inline]
-@@ -197,7 +200,7 @@ fn next(&mut self) -> Option<(A::Item, B::Item)> {
- unsafe {
- Some((self.a.__iterator_get_unchecked(i), self.b.__iterator_get_unchecked(i)))
- }
-- } else if A::may_have_side_effect() && self.index < self.a.size() {
-+ } else if A::may_have_side_effect() && self.index < self.a_len {
- let i = self.index;
- self.index += 1;
- self.len += 1;
-@@ -264,6 +267,7 @@ fn next_back(&mut self) -> Option<(A::Item, B::Item)>
- for _ in 0..sz_a - self.len {
- self.a.next_back();
- }
-+ self.a_len = self.len;
- }
- let sz_b = self.b.size();
- if b_side_effect && sz_b > self.len {
-@@ -275,6 +279,7 @@ fn next_back(&mut self) -> Option<(A::Item, B::Item)>
- }
- if self.index < self.len {
- self.len -= 1;
-+ self.a_len -= 1;
- let i = self.len;
- // SAFETY: `i` is smaller than the previous value of `self.len`,
- // which is also smaller than or equal to `self.a.len()` and `self.b.len()`
---
-2.31.1
-
-
-From 19af66a6f3e2bbb4780bb9eae7eb53bd13e3dd0f Mon Sep 17 00:00:00 2001
-From: Giacomo Stevanato <giaco.stevanato@gmail.com>
-Date: Fri, 19 Feb 2021 15:25:09 +0100
-Subject: [PATCH 2/2] Add relevant test
-
-(cherry picked from commit c1bfb9a78db6d481be1d03355672712c766e20b0)
----
- library/core/tests/iter/adapters/zip.rs | 23 +++++++++++++++++++++++
- 1 file changed, 23 insertions(+)
-
-diff --git a/library/core/tests/iter/adapters/zip.rs b/library/core/tests/iter/adapters/zip.rs
-index a59771039295..000c15f72c88 100644
---- a/library/core/tests/iter/adapters/zip.rs
-+++ b/library/core/tests/iter/adapters/zip.rs
-@@ -265,3 +265,26 @@ fn overflowed_zip(arr: &[i32]) -> impl Iterator<Item = (i32, &())> {
- panic!();
- }
- }
-+
-+#[test]
-+fn test_issue_82291() {
-+ use std::cell::Cell;
-+
-+ let mut v1 = [()];
-+ let v2 = [()];
-+
-+ let called = Cell::new(0);
-+
-+ let mut zip = v1
-+ .iter_mut()
-+ .map(|r| {
-+ called.set(called.get() + 1);
-+ r
-+ })
-+ .zip(&v2);
-+
-+ zip.next_back();
-+ assert_eq!(called.get(), 1);
-+ zip.next();
-+ assert_eq!(called.get(), 1);
-+}
---
-2.31.1
-
diff --git a/dev-lang/rust/files/rustc-1.51.0-backport-pr83629.patch b/dev-lang/rust/files/rustc-1.51.0-backport-pr83629.patch
deleted file mode 100644
index 7f68d95cc7f4..000000000000
--- a/dev-lang/rust/files/rustc-1.51.0-backport-pr83629.patch
+++ /dev/null
@@ -1,142 +0,0 @@
-From 3834e7b7393bf1a0d7df02ccd1d2e896c1465769 Mon Sep 17 00:00:00 2001
-From: The8472 <git@infinite-source.de>
-Date: Mon, 29 Mar 2021 04:22:34 +0200
-Subject: [PATCH 1/2] add testcase for double-drop during Vec in-place
- collection
-
----
- library/alloc/tests/vec.rs | 38 +++++++++++++++++++++++++++++++++++++-
- 1 file changed, 37 insertions(+), 1 deletion(-)
-
-diff --git a/library/alloc/tests/vec.rs b/library/alloc/tests/vec.rs
-index 5c7ff67bc621..4cdb7eefcdf1 100644
---- a/library/alloc/tests/vec.rs
-+++ b/library/alloc/tests/vec.rs
-@@ -954,7 +954,7 @@ fn test_from_iter_specialization_head_tail_drop() {
- }
-
- #[test]
--fn test_from_iter_specialization_panic_drop() {
-+fn test_from_iter_specialization_panic_during_iteration_drops() {
- let drop_count: Vec<_> = (0..=2).map(|_| Rc::new(())).collect();
- let src: Vec<_> = drop_count.iter().cloned().collect();
- let iter = src.into_iter();
-@@ -977,6 +977,42 @@ fn test_from_iter_specialization_panic_drop() {
- );
- }
-
-+#[test]
-+fn test_from_iter_specialization_panic_during_drop_leaks() {
-+ static mut DROP_COUNTER: usize = 0;
-+
-+ #[derive(Debug)]
-+ enum Droppable {
-+ DroppedTwice(Box<i32>),
-+ PanicOnDrop,
-+ }
-+
-+ impl Drop for Droppable {
-+ fn drop(&mut self) {
-+ match self {
-+ Droppable::DroppedTwice(_) => {
-+ unsafe {
-+ DROP_COUNTER += 1;
-+ }
-+ println!("Dropping!")
-+ }
-+ Droppable::PanicOnDrop => {
-+ if !std::thread::panicking() {
-+ panic!();
-+ }
-+ }
-+ }
-+ }
-+ }
-+
-+ let _ = std::panic::catch_unwind(AssertUnwindSafe(|| {
-+ let v = vec![Droppable::DroppedTwice(Box::new(123)), Droppable::PanicOnDrop];
-+ let _ = v.into_iter().take(0).collect::<Vec<_>>();
-+ }));
-+
-+ assert_eq!(unsafe { DROP_COUNTER }, 1);
-+}
-+
- #[test]
- fn test_cow_from() {
- let borrowed: &[_] = &["borrowed", "(slice)"];
---
-2.31.1
-
-
-From 8e2706343e1ce1c5a2d3a2ceaaaa010aaeb21d93 Mon Sep 17 00:00:00 2001
-From: The8472 <git@infinite-source.de>
-Date: Mon, 29 Mar 2021 04:22:48 +0200
-Subject: [PATCH 2/2] fix double-drop in in-place collect specialization
-
----
- library/alloc/src/vec/into_iter.rs | 27 ++++++++++++++-------
- library/alloc/src/vec/source_iter_marker.rs | 4 +--
- 2 files changed, 20 insertions(+), 11 deletions(-)
-
-diff --git a/library/alloc/src/vec/into_iter.rs b/library/alloc/src/vec/into_iter.rs
-index f131d06bb18f..74adced53f6d 100644
---- a/library/alloc/src/vec/into_iter.rs
-+++ b/library/alloc/src/vec/into_iter.rs
-@@ -85,20 +85,29 @@ fn as_raw_mut_slice(&mut self) -> *mut [T] {
- ptr::slice_from_raw_parts_mut(self.ptr as *mut T, self.len())
- }
-
-- pub(super) fn drop_remaining(&mut self) {
-- unsafe {
-- ptr::drop_in_place(self.as_mut_slice());
-- }
-- self.ptr = self.end;
-- }
-+ /// Drops remaining elements and relinquishes the backing allocation.
-+ ///
-+ /// This is roughly equivalent to the following, but more efficient
-+ ///
-+ /// ```
-+ /// # let mut into_iter = Vec::<u8>::with_capacity(10).into_iter();
-+ /// (&mut into_iter).for_each(core::mem::drop);
-+ /// unsafe { core::ptr::write(&mut into_iter, Vec::new().into_iter()); }
-+ /// ```
-+ pub(super) fn forget_allocation_drop_remaining(&mut self) {
-+ let remaining = self.as_raw_mut_slice();
-
-- /// Relinquishes the backing allocation, equivalent to
-- /// `ptr::write(&mut self, Vec::new().into_iter())`
-- pub(super) fn forget_allocation(&mut self) {
-+ // overwrite the individual fields instead of creating a new
-+ // struct and then overwriting &mut self.
-+ // this creates less assembly
- self.cap = 0;
- self.buf = unsafe { NonNull::new_unchecked(RawVec::NEW.ptr()) };
- self.ptr = self.buf.as_ptr();
- self.end = self.buf.as_ptr();
-+
-+ unsafe {
-+ ptr::drop_in_place(remaining);
-+ }
- }
- }
-
-diff --git a/library/alloc/src/vec/source_iter_marker.rs b/library/alloc/src/vec/source_iter_marker.rs
-index 8c0e95559fa1..9301f7a5184e 100644
---- a/library/alloc/src/vec/source_iter_marker.rs
-+++ b/library/alloc/src/vec/source_iter_marker.rs
-@@ -78,9 +78,9 @@ impl<T, I> SpecFromIter<T, I> for Vec<T>
- }
-
- // drop any remaining values at the tail of the source
-- src.drop_remaining();
- // but prevent drop of the allocation itself once IntoIter goes out of scope
-- src.forget_allocation();
-+ // if the drop panics then we also leak any elements collected into dst_buf
-+ src.forget_allocation_drop_remaining();
-
- let vec = unsafe {
- let len = dst.offset_from(dst_buf) as usize;
---
-2.31.1
-
diff --git a/dev-lang/rust/rust-1.51.0-r2.ebuild b/dev-lang/rust/rust-1.51.0-r2.ebuild
deleted file mode 100644
index a9c49b69bae9..000000000000
--- a/dev-lang/rust/rust-1.51.0-r2.ebuild
+++ /dev/null
@@ -1,666 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7..9} )
-
-inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing \
- multilib-build python-any-r1 rust-toolchain toolchain-funcs verify-sig
-
-if [[ ${PV} = *beta* ]]; then
- betaver=${PV//*beta}
- BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
- MY_P="rustc-beta"
- SLOT="beta/${PV}"
- SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz"
-else
- ABI_VER="$(ver_cut 1-2)"
- SLOT="stable/${ABI_VER}"
- MY_P="rustc-${PV}"
- SRC="${MY_P}-src.tar.xz"
- KEYWORDS="amd64 arm arm64 ppc64 ~riscv x86"
-fi
-
-RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
-
-DESCRIPTION="Systems programming language from Mozilla"
-HOMEPAGE="https://www.rust-lang.org/"
-
-SRC_URI="
- https://static.rust-lang.org/dist/${SRC}
- verify-sig? ( https://static.rust-lang.org/dist/${SRC}.asc )
- !system-bootstrap? ( $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION}) )
-"
-
-# keep in sync with llvm ebuild of the same version as bundled one.
-ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM AVR BPF Hexagon Lanai Mips MSP430
- NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore )
-ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
-LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
-
-LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
-
-IUSE="clippy cpu_flags_x86_sse2 debug doc miri nightly parallel-compiler rls rustfmt system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
-
-# Please keep the LLVM dependency block separate. Since LLVM is slotted,
-# we need to *really* make sure we're not pulling more than one slot
-# simultaneously.
-
-# How to use it:
-# List all the working slots in LLVM_VALID_SLOTS, newest first.
-LLVM_VALID_SLOTS=( 11 )
-LLVM_MAX_SLOT="${LLVM_VALID_SLOTS[0]}"
-
-# splitting usedeps needed to avoid CI/pkgcheck's UncheckableDep limitation
-# (-) usedep needed because we may build with older llvm without that target
-LLVM_DEPEND="|| ( "
-for _s in ${LLVM_VALID_SLOTS[@]}; do
- LLVM_DEPEND+=" ( "
- for _x in ${ALL_LLVM_TARGETS[@]}; do
- LLVM_DEPEND+="
- ${_x}? ( sys-devel/llvm:${_s}[${_x}(-)] )"
- done
- LLVM_DEPEND+=" )"
-done
-unset _s _x
-LLVM_DEPEND+=" )
- <sys-devel/llvm-$(( LLVM_MAX_SLOT + 1 )):=
- wasm? ( sys-devel/lld )
-"
-
-# to bootstrap we need at least exactly previous version, or same.
-# most of the time previous versions fail to bootstrap with newer
-# for example 1.47.x, requires at least 1.46.x, 1.47.x is ok,
-# but it fails to bootstrap with 1.48.x
-# https://github.com/rust-lang/rust/blob/${PV}/src/stage0.txt
-BOOTSTRAP_DEPEND="||
- (
- =dev-lang/rust-$(ver_cut 1).$(($(ver_cut 2) - 1))*
- =dev-lang/rust-bin-$(ver_cut 1).$(($(ver_cut 2) - 1))*
- =dev-lang/rust-$(ver_cut 1).$(ver_cut 2)*
- =dev-lang/rust-bin-$(ver_cut 1).$(ver_cut 2)*
- )
-"
-
-BDEPEND="${PYTHON_DEPS}
- app-eselect/eselect-rust
- || (
- >=sys-devel/gcc-4.7
- >=sys-devel/clang-3.5
- )
- system-bootstrap? ( ${BOOTSTRAP_DEPEND} )
- !system-llvm? (
- dev-util/cmake
- dev-util/ninja
- )
- test? ( sys-devel/gdb )
- verify-sig? ( app-crypt/openpgp-keys-rust )
-"
-
-DEPEND="
- >=app-arch/xz-utils-5.2
- net-misc/curl:=[http2,ssl]
- sys-libs/zlib:=
- dev-libs/openssl:0=
- elibc_musl? ( sys-libs/libunwind:= )
- system-llvm? ( ${LLVM_DEPEND} )
-"
-
-# we need to block older versions due to layout changes.
-RDEPEND="${DEPEND}
- app-eselect/eselect-rust
- !<dev-lang/rust-1.47.0-r1
- !<dev-lang/rust-bin-1.47.0-r1
-"
-
-REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
- miri? ( nightly )
- parallel-compiler? ( nightly )
- test? ( ${ALL_LLVM_TARGETS[*]} )
- wasm? ( llvm_targets_WebAssembly )
- x86? ( cpu_flags_x86_sse2 )
-"
-
-# we don't use cmake.eclass, but can get a warnings
-CMAKE_WARN_UNUSED_CLI=no
-
-QA_FLAGS_IGNORED="
- usr/lib/${PN}/${PV}/bin/.*
- usr/lib/${PN}/${PV}/libexec/.*
- usr/lib/${PN}/${PV}/lib/lib.*.so
- usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/.*
- usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
-"
-
-QA_SONAME="
- usr/lib/${PN}/${PV}/lib/lib.*.so.*
- usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
-"
-
-# causes double bootstrap
-RESTRICT="test"
-
-VERIFY_SIG_OPENPGP_KEY_PATH="/usr/share/openpgp-keys/rust.asc"
-
-PATCHES=(
- "${FILESDIR}"/1.47.0-ignore-broken-and-non-applicable-tests.patch
- "${FILESDIR}"/1.49.0-gentoo-musl-target-specs.patch
- "${FILESDIR}"/1.51.0-bootstrap-panic.patch
- "${FILESDIR}"/1.51.0-slow-doc-install.patch
- "${FILESDIR}"/rustc-1.51.0-backport-pr81728.patch
- "${FILESDIR}"/rustc-1.51.0-backport-pr81741.patch
- "${FILESDIR}"/rustc-1.51.0-backport-pr82289.patch
- "${FILESDIR}"/rustc-1.51.0-backport-pr82292.patch
- "${FILESDIR}"/rustc-1.51.0-backport-pr83629.patch
-)
-
-S="${WORKDIR}/${MY_P}-src"
-
-toml_usex() {
- usex "${1}" true false
-}
-
-boostrap_rust_version_check() {
- # never call from pkg_pretend. eselect-rust may be not installed yet.
- [[ ${MERGE_TYPE} == binary ]] && return
- local rustc_wanted="$(ver_cut 1).$(($(ver_cut 2) - 1))"
- local rustc_toonew="$(ver_cut 1).$(($(ver_cut 2) + 1))"
- local rustc_version=( $(eselect --brief rust show 2>/dev/null) )
- rustc_version=${rustc_version[0]#rust-bin-}
- rustc_version=${rustc_version#rust-}
-
- [[ -z "${rustc_version}" ]] && die "Failed to determine rust version, check 'eselect rust' output"
-
- if ver_test "${rustc_version}" -lt "${rustc_wanted}" ; then
- eerror "Rust >=${rustc_wanted} is required"
- eerror "please run 'eselect rust' and set correct rust version"
- die "selected rust version is too old"
- elif ver_test "${rustc_version}" -ge "${rustc_toonew}" ; then
- eerror "Rust <${rustc_toonew} is required"
- eerror "please run 'eselect rust' and set correct rust version"
- die "selected rust version is too new"
- else
- einfo "Using rust ${rustc_version} to build"
- fi
-}
-
-pre_build_checks() {
- local M=8192
- # multiply requirements by 1.5 if we are doing x86-multilib
- if use amd64; then
- M=$(( $(usex abi_x86_32 15 10) * ${M} / 10 ))
- fi
- M=$(( $(usex clippy 128 0) + ${M} ))
- M=$(( $(usex miri 128 0) + ${M} ))
- M=$(( $(usex rls 512 0) + ${M} ))
- M=$(( $(usex rustfmt 256 0) + ${M} ))
- # add 2G if we compile llvm and 256M per llvm_target
- if ! use system-llvm; then
- M=$(( 2048 + ${M} ))
- local ltarget
- for ltarget in ${ALL_LLVM_TARGETS[@]}; do
- M=$(( $(usex ${ltarget} 256 0) + ${M} ))
- done
- fi
- M=$(( $(usex wasm 256 0) + ${M} ))
- M=$(( $(usex debug 15 10) * ${M} / 10 ))
- eshopts_push -s extglob
- if is-flagq '-g?(gdb)?([1-9])'; then
- M=$(( 15 * ${M} / 10 ))
- fi
- eshopts_pop
- M=$(( $(usex system-bootstrap 0 1024) + ${M} ))
- M=$(( $(usex doc 256 0) + ${M} ))
- CHECKREQS_DISK_BUILD=${M}M check-reqs_pkg_${EBUILD_PHASE}
-}
-
-llvm_check_deps() {
- has_version -r "sys-devel/llvm:${LLVM_SLOT}[${LLVM_TARGET_USEDEPS// /,}]"
-}
-
-pkg_pretend() {
- pre_build_checks
-}
-
-pkg_setup() {
- pre_build_checks
- python-any-r1_pkg_setup
-
- export LIBGIT2_NO_PKG_CONFIG=1 #749381
-
- use system-bootstrap && boostrap_rust_version_check
-
- if use system-llvm; then
- llvm_pkg_setup
-
- local llvm_config="$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
- export LLVM_LINK_SHARED=1
- export RUSTFLAGS="${RUSTFLAGS} -Lnative=$("${llvm_config}" --libdir)"
- fi
-}
-
-src_prepare() {
- if ! use system-bootstrap; then
- local rust_stage0_root="${WORKDIR}"/rust-stage0
- local rust_stage0="rust-${RUST_STAGE0_VERSION}-$(rust_abi)"
-
- "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig \
- --without=rust-docs --destdir="${rust_stage0_root}" --prefix=/ || die
- fi
-
- default
-}
-
-src_configure() {
- local rust_target="" rust_targets="" arch_cflags
-
- # Collect rust target names to compile standard libs for all ABIs.
- for v in $(multilib_get_enabled_abi_pairs); do
- rust_targets="${rust_targets},\"$(rust_abi $(get_abi_CHOST ${v##*.}))\""
- done
- if use wasm; then
- rust_targets="${rust_targets},\"wasm32-unknown-unknown\""
- if use system-llvm; then
- # un-hardcode rust-lld linker for this target
- # https://bugs.gentoo.org/715348
- sed -i '/linker:/ s/rust-lld/wasm-ld/' compiler/rustc_target/src/spec/wasm32_base.rs || die
- fi
- fi
- rust_targets="${rust_targets#,}"
-
- local tools="\"cargo\","
- if use clippy; then
- tools="\"clippy\",$tools"
- fi
- if use miri; then
- tools="\"miri\",$tools"
- fi
- if use rls; then
- tools="\"rls\",\"analysis\",\"src\",$tools"
- fi
- if use rustfmt; then
- tools="\"rustfmt\",$tools"
- fi
-
- local rust_stage0_root
- if use system-bootstrap; then
- rust_stage0_root="$(rustc --print sysroot)"
- else
- rust_stage0_root="${WORKDIR}"/rust-stage0
- fi
-
- rust_target="$(rust_abi)"
-
- cat <<- _EOF_ > "${S}"/config.toml
- [llvm]
- download-ci-llvm = false
- optimize = $(toml_usex !debug)
- release-debuginfo = $(toml_usex debug)
- assertions = $(toml_usex debug)
- ninja = true
- targets = "${LLVM_TARGETS// /;}"
- experimental-targets = ""
- link-shared = $(toml_usex system-llvm)
- [build]
- build = "${rust_target}"
- host = ["${rust_target}"]
- target = [${rust_targets}]
- cargo = "${rust_stage0_root}/bin/cargo"
- rustc = "${rust_stage0_root}/bin/rustc"
- rustfmt = "${rust_stage0_root}/bin/rustfmt"
- docs = $(toml_usex doc)
- compiler-docs = false
- submodules = false
- python = "${EPYTHON}"
- locked-deps = true
- vendor = true
- extended = true
- tools = [${tools}]
- verbose = 2
- sanitizers = false
- profiler = false
- cargo-native-static = false
- [install]
- prefix = "${EPREFIX}/usr/lib/${PN}/${PV}"
- sysconfdir = "etc"
- docdir = "share/doc/rust"
- bindir = "bin"
- libdir = "lib"
- mandir = "share/man"
- [rust]
- # https://github.com/rust-lang/rust/issues/54872
- codegen-units-std = 1
- optimize = true
- debug = $(toml_usex debug)
- debug-assertions = $(toml_usex debug)
- debuginfo-level-rustc = 0
- backtrace = true
- incremental = false
- default-linker = "$(tc-getCC)"
- parallel-compiler = $(toml_usex parallel-compiler)
- channel = "$(usex nightly nightly stable)"
- description = "gentoo"
- rpath = false
- verbose-tests = true
- optimize-tests = $(toml_usex !debug)
- codegen-tests = true
- dist-src = false
- remap-debuginfo = true
- lld = $(usex system-llvm false $(toml_usex wasm))
- # only deny warnings if doc+wasm are NOT requested, documenting stage0 wasm std fails without it
- # https://github.com/rust-lang/rust/issues/74976
- # https://github.com/rust-lang/rust/issues/76526
- deny-warnings = $(usex wasm $(usex doc false true) true)
- backtrace-on-ice = true
- jemalloc = false
- [dist]
- src-tarball = false
- _EOF_
-
- for v in $(multilib_get_enabled_abi_pairs); do
- rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
- arch_cflags="$(get_abi_CFLAGS ${v##*.})"
-
- cat <<- _EOF_ >> "${S}"/config.env
- CFLAGS_${rust_target}=${arch_cflags}
- _EOF_
-
- cat <<- _EOF_ >> "${S}"/config.toml
- [target.${rust_target}]
- cc = "$(tc-getBUILD_CC)"
- cxx = "$(tc-getBUILD_CXX)"
- linker = "$(tc-getCC)"
- ar = "$(tc-getAR)"
- _EOF_
- # librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true;
- if use elibc_musl; then
- cat <<- _EOF_ >> "${S}"/config.toml
- crt-static = false
- _EOF_
- fi
- if use system-llvm; then
- cat <<- _EOF_ >> "${S}"/config.toml
- llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
- _EOF_
- fi
- done
- if use wasm; then
- cat <<- _EOF_ >> "${S}"/config.toml
- [target.wasm32-unknown-unknown]
- linker = "$(usex system-llvm lld rust-lld)"
- _EOF_
- fi
-
- if [[ -n ${I_KNOW_WHAT_I_AM_DOING_CROSS} ]]; then # whitespace intentionally shifted below
- # experimental cross support
- # discussion: https://bugs.gentoo.org/679878
- # TODO: c*flags, clang, system-llvm, cargo.eclass target support
- # it would be much better if we could split out stdlib
- # complilation to separate ebuild and abuse CATEGORY to
- # just install to /usr/lib/rustlib/<target>
-
- # extra targets defined as a bash array
- # spec format: <LLVM target>:<rust-target>:<CTARGET>
- # best place would be /etc/portage/env/dev-lang/rust
- # Example:
- # RUST_CROSS_TARGETS=(
- # "AArch64:aarch64-unknown-linux-gnu:aarch64-unknown-linux-gnu"
- # )
- # no extra hand holding is done, no target transformations, all
- # values are passed as-is with just basic checks, so it's up to user to supply correct values
- # valid rust targets can be obtained with
- # rustc --print target-list
- # matching cross toolchain has to be installed
- # matching LLVM_TARGET has to be enabled for both rust and llvm (if using system one)
- # only gcc toolchains installed with crossdev are checked for now.
-
- # BUG: we can't pass host flags to cross compiler, so just filter for now
- # BUG: this should be more fine-grained.
- filter-flags '-mcpu=*' '-march=*' '-mtune=*'
-
- local cross_target_spec
- for cross_target_spec in "${RUST_CROSS_TARGETS[@]}";do
- # extracts first element form <LLVM target>:<rust-target>:<CTARGET>
- local cross_llvm_target="${cross_target_spec%%:*}"
- # extracts toolchain triples, <rust-target>:<CTARGET>
- local cross_triples="${cross_target_spec#*:}"
- # extracts first element after before : separator
- local cross_rust_target="${cross_triples%%:*}"
- # extracts last element after : separator
- local cross_toolchain="${cross_triples##*:}"
- use llvm_targets_${cross_llvm_target} || die "need llvm_targets_${cross_llvm_target} target enabled"
- command -v ${cross_toolchain}-gcc > /dev/null 2>&1 || die "need ${cross_toolchain} cross toolchain"
-
- cat <<- _EOF_ >> "${S}"/config.toml
- [target.${cross_rust_target}]
- cc = "${cross_toolchain}-gcc"
- cxx = "${cross_toolchain}-g++"
- linker = "${cross_toolchain}-gcc"
- ar = "${cross_toolchain}-ar"
- _EOF_
- if use system-llvm; then
- cat <<- _EOF_ >> "${S}"/config.toml
- llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
- _EOF_
- fi
- if [[ "${cross_toolchain}" == *-musl* ]]; then
- cat <<- _EOF_ >> "${S}"/config.toml
- musl-root = "$(${cross_toolchain}-gcc -print-sysroot)/usr"
- _EOF_
- fi
-
- # append cross target to "normal" target list
- # example 'target = ["powerpc64le-unknown-linux-gnu"]'
- # becomes 'target = ["powerpc64le-unknown-linux-gnu","aarch64-unknown-linux-gnu"]'
-
- rust_targets="${rust_targets},\"${cross_rust_target}\""
- sed -i "/^target = \[/ s#\[.*\]#\[${rust_targets}\]#" config.toml || die
-
- ewarn
- ewarn "Enabled ${cross_rust_target} rust target"
- ewarn "Using ${cross_toolchain} cross toolchain"
- ewarn
- if ! has_version -b 'sys-devel/binutils[multitarget]' ; then
- ewarn "'sys-devel/binutils[multitarget]' is not installed"
- ewarn "'strip' will be unable to strip cross libraries"
- ewarn "cross targets will be installed with full debug information"
- ewarn "enable 'multitarget' USE flag for binutils to be able to strip object files"
- ewarn
- ewarn "Alternatively llvm-strip can be used, it supports stripping any target"
- ewarn "define STRIP=\"llvm-strip\" to use it (experimental)"
- ewarn
- fi
- done
- fi # I_KNOW_WHAT_I_AM_DOING_CROSS
-
- einfo "Rust configured with the following flags:"
-
- echo "RUSTFLAGS=\"${RUSTFLAGS:-}\""
- echo "RUSTFLAGS_BOOTSTRAP=\"${RUSTFLAGS_BOOTSTRAP:-}\""
- echo "RUSTFLAGS_NOT_BOOTSTRAP=\"${RUSTFLAGS_NOT_BOOTSTRAP:-}\""
- echo
- einfo "config.toml contents:"
- cat "${S}"/config.toml || die
- echo
-}
-
-src_compile() {
- # we need \n IFS to have config.env with spaces loaded properly. #734018
- (
- IFS=$'\n'
- env $(cat "${S}"/config.env) RUST_BACKTRACE=1\
- "${EPYTHON}" ./x.py dist -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
- )
-}
-
-src_test() {
- # https://rustc-dev-guide.rust-lang.org/tests/intro.html
-
- # those are basic and codegen tests.
- local tests=(
- codegen
- codegen-units
- compile-fail
- incremental
- mir-opt
- pretty
- run-make
- )
-
- # fails if llvm is not built with ALL targets.
- # and known to fail with system llvm sometimes.
- use system-llvm || tests+=( assembly )
-
- # fragile/expensive/less important tests
- # or tests that require extra builds
- # TODO: instead of skipping, just make some nonfatal.
- if [[ ${ERUST_RUN_EXTRA_TESTS:-no} != no ]]; then
- tests+=(
- rustdoc
- rustdoc-js
- rustdoc-js-std
- rustdoc-ui
- run-make-fulldeps
- ui
- ui-fulldeps
- )
- fi
-
- local i failed=()
- einfo "rust_src_test: enabled tests ${tests[@]/#/src/test/}"
- for i in "${tests[@]}"; do
- local t="src/test/${i}"
- einfo "rust_src_test: running ${t}"
- if ! (
- IFS=$'\n'
- env $(cat "${S}"/config.env) RUST_BACKTRACE=1 \
- "${EPYTHON}" ./x.py test -vv --config="${S}"/config.toml \
- -j$(makeopts_jobs) --no-doc --no-fail-fast "${t}"
- )
- then
- failed+=( "${t}" )
- eerror "rust_src_test: ${t} failed"
- fi
- done
-
- if [[ ${#failed[@]} -ne 0 ]]; then
- eerror "rust_src_test: failure summary: ${failed[@]}"
- die "aborting due to test failures"
- fi
-}
-
-src_install() {
- (
- IFS=$'\n'
- env $(cat "${S}"/config.env) DESTDIR="${D}" \
- "${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
- )
-
- # bug #689562, #689160
- rm -v "${ED}/usr/lib/${PN}/${PV}/etc/bash_completion.d/cargo" || die
- rmdir -v "${ED}/usr/lib/${PN}/${PV}"/etc{/bash_completion.d,} || die
- newbashcomp src/tools/cargo/src/etc/cargo.bashcomp.sh cargo
-
- local symlinks=(
- cargo
- rustc
- rustdoc
- rust-gdb
- rust-gdbgui
- rust-lldb
- )
-
- use clippy && symlinks+=( clippy-driver cargo-clippy )
- use miri && symlinks+=( miri cargo-miri )
- use rls && symlinks+=( rls )
- use rustfmt && symlinks+=( rustfmt cargo-fmt )
-
- einfo "installing eselect-rust symlinks and paths: ${symlinks[@]}"
- local i
- for i in "${symlinks[@]}"; do
- # we need realpath on /usr/bin/* symlink return version-appended binary path.
- # so /usr/bin/rustc should point to /usr/lib/rust/<ver>/bin/rustc-<ver>
- # need to fix eselect-rust to remove this hack.
- local ver_i="${i}-${PV}"
- if [[ -f "${ED}/usr/lib/${PN}/${PV}/bin/${i}" ]]; then
- einfo "Installing ${i} symlink"
- ln -v "${ED}/usr/lib/${PN}/${PV}/bin/${i}" "${ED}/usr/lib/${PN}/${PV}/bin/${ver_i}" || die
- else
- ewarn "${i} symlink requested, but source file not found"
- ewarn "please report this"
- fi
- dosym "../lib/${PN}/${PV}/bin/${ver_i}" "/usr/bin/${ver_i}"
- done
-
- # symlinks to switch components to active rust in eselect
- dosym "${PV}/lib" "/usr/lib/${PN}/lib-${PV}"
- dosym "${PV}/libexec" "/usr/lib/${PN}/libexec-${PV}"
- dosym "${PV}/share/man" "/usr/lib/${PN}/man-${PV}"
- dosym "rust/${PV}/lib/rustlib" "/usr/lib/rustlib-${PV}"
- dosym "../../lib/${PN}/${PV}/share/doc/rust" "/usr/share/doc/${P}"
-
- newenvd - "50${P}" <<-_EOF_
- LDPATH="${EPREFIX}/usr/lib/rust/lib"
- MANPATH="${EPREFIX}/usr/lib/rust/man"
- $(use amd64 && usex elibc_musl 'CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-C target-feature=-crt-static"' '')
- $(use arm64 && usex elibc_musl 'CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-C target-feature=-crt-static"' '')
- _EOF_
-
- rm -rf "${ED}/usr/lib/${PN}/${PV}"/*.old || die
- rm -rf "${ED}/usr/lib/${PN}/${PV}/doc"/*.old || die
-
- # note: eselect-rust adds EROOT to all paths below
- cat <<-_EOF_ > "${T}/provider-${P}"
- /usr/bin/cargo
- /usr/bin/rustdoc
- /usr/bin/rust-gdb
- /usr/bin/rust-gdbgui
- /usr/bin/rust-lldb
- /usr/lib/rustlib
- /usr/lib/rust/lib
- /usr/lib/rust/libexec
- /usr/lib/rust/man
- /usr/share/doc/rust
- _EOF_
-
- if use clippy; then
- echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
- echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
- fi
- if use miri; then
- echo /usr/bin/miri >> "${T}/provider-${P}"
- echo /usr/bin/cargo-miri >> "${T}/provider-${P}"
- fi
- if use rls; then
- echo /usr/bin/rls >> "${T}/provider-${P}"
- fi
- if use rustfmt; then
- echo /usr/bin/rustfmt >> "${T}/provider-${P}"
- echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
- fi
-
- insinto /etc/env.d/rust
- doins "${T}/provider-${P}"
-}
-
-pkg_postinst() {
- eselect rust update
-
- if has_version sys-devel/gdb || has_version dev-util/lldb; then
- elog "Rust installs a helper script for calling GDB and LLDB,"
- elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${PV}."
- fi
-
- if has_version app-editors/emacs; then
- elog "install app-emacs/rust-mode to get emacs support for rust."
- fi
-
- if has_version app-editors/gvim || has_version app-editors/vim; then
- elog "install app-vim/rust-vim to get vim support for rust."
- fi
-}
-
-pkg_postrm() {
- eselect rust cleanup
-}