auto merge of #12396 : alexcrichton/rust/windows-env-var, r=huonw
auto merge of #12396 : alexcrichton/rust/windows-env-var, r=huonw

On windows, the GetEnvironmentVariable function will return the necessary buffer
size if the buffer provided was too small. This case previously fell through the
checks inside of fill_utf16_buf_and_decode, tripping an assertion in the `slice`
method.

This adds an extra case for when the return value is >= the buffer size, in
which case we assume the return value as the new buffer size and try again.

Closes #12376

Ryman/rust,rprichard/rust,reem/rust,nham/rust,barosl/rust,mdinger/rust,KokaKiwi/rust,AerialX/rust-rt-minimal,carols10cents/rust,nwin/rust,Ryman/rust,zachwick/rust,jbclements/rust,krzysz00/rust,GBGamer/rust,graydon/rust,l0kod/rust,defuz/rust,emk/rust,robertg/rust,omasanori/rust,mvdnes/rust,miniupnp/rust,quornian/rust,avdi/rust,jbclements/rust,aneeshusa/rust,P1start/rust,bombless/rust,pshc/rust,aepsil0n/rust,aidancully/rust,hauleth/rust,servo/rust,AerialX/rust,andars/rust,ktossell/rust,pczarn/rust,defuz/rust,rohitjoshi/rust,kwantam/rust,mvdnes/rust,philyoon/rust,stepancheg/rust-ide-rust,pczarn/rust,P1start/rust,mahkoh/rust,KokaKiwi/rust,jashank/rust,dinfuehr/rust,servo/rust,l0kod/rust,bhickey/rand,dwillmer/rust,TheNeikos/rust,vhbit/rust,avdi/rust,mihneadb/rust,jashank/rust,philyoon/rust,miniupnp/rust,0x73/rust,rohitjoshi/rust,huonw/rand,TheNeikos/rust,rohitjoshi/rust,erickt/rust,ktossell/rust,mdinger/rust,Ryman/rust,robertg/rust,pelmers/rust,emk/rust,mihneadb/rust,pshc/rust,aidancully/rust,andars/rust,TheNeikos/rust,emk/rust,miniupnp/rust,untitaker/rust,cllns/rust,andars/rust,pczarn/rust,victorvde/rust,aepsil0n/rust,hauleth/rust,hauleth/rust,quornian/rust,stepancheg/rust-ide-rust,AerialX/rust-rt-minimal,ebfull/rust,jroesch/rust,dwillmer/rust,richo/rust,Ryman/rust,ruud-v-a/rust,AerialX/rust,nham/rust,ktossell/rust,XMPPwocky/rust,mihneadb/rust,gifnksm/rust,arthurprs/rand,TheNeikos/rust,kwantam/rust,jbclements/rust,TheNeikos/rust,rohitjoshi/rust,l0kod/rust,jbclements/rust,XMPPwocky/rust,barosl/rust,vhbit/rust,KokaKiwi/rust,pythonesque/rust,zaeleus/rust,kimroen/rust,pelmers/rust,l0kod/rust,P1start/rust,jbclements/rust,stepancheg/rust-ide-rust,pelmers/rust,kwantam/rust,l0kod/rust,bombless/rust,servo/rust,nwin/rust,nwin/rust,pythonesque/rust,vhbit/rust,quornian/rust,barosl/rust,stepancheg/rust-ide-rust,ejjeong/rust,kwantam/rust,0x73/rust,jbclements/rust,emk/rust,pczarn/rust,michaelballantyne/rust-gpu,ebfull/rand,l0kod/rust,mvdnes/rust,cllns/rust,pczarn/rust,Ryman/rust,nwin/rust,mihneadb/rust,P1start/rust,aidancully/rust,jashank/rust,graydon/rust,philyoon/rust,barosl/rust,reem/rust,quornian/rust,ejjeong/rust,aneeshusa/rust,dinfuehr/rust,hauleth/rust,dinfuehr/rust,ruud-v-a/rust,bombless/rust-docs-chinese,rprichard/rust,Ryman/rust,bombless/rust,barosl/rust,untitaker/rust,cllns/rust,krzysz00/rust,seanrivera/rust,aturon/rust,vhbit/rust,XMPPwocky/rust,nham/rust,servo/rust,gifnksm/rust,omasanori/rust,GBGamer/rust,carols10cents/rust,achanda/rand,michaelballantyne/rust-gpu,nwin/rust,servo/rust,aneeshusa/rust,pelmers/rust,XMPPwocky/rust,KokaKiwi/rust,robertg/rust,omasanori/rust,aidancully/rust,nwin/rust,aturon/rust,barosl/rust,XMPPwocky/rust,erickt/rust,AerialX/rust,michaelballantyne/rust-gpu,mdinger/rust,andars/rust,zaeleus/rust,mdinger/rust,carols10cents/rust,pshc/rust,krzysz00/rust,mahkoh/rust,P1start/rust,dwillmer/rust,pshc/rust,mahkoh/rust,zachwick/rust,XMPPwocky/rust,mdinger/rust,l0kod/rust,miniupnp/rust,AerialX/rust,stepancheg/rust-ide-rust,dwillmer/rust,sae-bom/rust,ktossell/rust,mahkoh/rust,erickt/rust,avdi/rust,untitaker/rust,ruud-v-a/rust,servo/rust,bombless/rust,stepancheg/rust-ide-rust,bombless/rust,victorvde/rust,reem/rust,zubron/rust,aturon/rust,zaeleus/rust,zaeleus/rust,aneeshusa/rust,richo/rust,nham/rust,nham/rust,stepancheg/rust-ide-rust,jroesch/rust,miniupnp/rust,defuz/rust,philyoon/rust,aidancully/rust,seanrivera/rust,erickt/rust,0x73/rust,AerialX/rust-rt-minimal,pelmers/rust,ebfull/rust,richo/rust,aepsil0n/rust,0x73/rust,pshc/rust,kimroen/rust,jashank/rust,GrahamDennis/rand,jashank/rust,mvdnes/rust,erickt/rust,krzysz00/rust,nwin/rust,jbclements/rust,reem/rust,gifnksm/rust,michaelballantyne/rust-gpu,seanrivera/rust,0x73/rust,sae-bom/rust,pshc/rust,zubron/rust,emk/rust,kimroen/rust,pelmers/rust,mvdnes/rust,AerialX/rust-rt-minimal,gifnksm/rust,zaeleus/rust,victorvde/rust,kwantam/rust,mdinger/rust,cllns/rust,KokaKiwi/rust,jashank/rust,victorvde/rust,pythonesque/rust,ruud-v-a/rust,ktossell/rust,mahkoh/rust,AerialX/rust,jroesch/rust,sae-bom/rust,rohitjoshi/rust,pythonesque/rust,rprichard/rust,robertg/rust,aidancully/rust,KokaKiwi/rust,sae-bom/rust,GBGamer/rust,mvdnes/rust,krzysz00/rust,kwantam/rust,pythonesque/rust,zaeleus/rust,zachwick/rust,ktossell/rust,robertg/rust,defuz/rust,aturon/rust,defuz/rust,ruud-v-a/rust,kimroen/rust,mihneadb/rust,ktossell/rust,ejjeong/rust,pczarn/rust,dwillmer/rust,TheNeikos/rust,pythonesque/rust,kimroen/rust,richo/rust,carols10cents/rust,quornian/rust,mahkoh/rust,ejjeong/rust,bluss/rand,bombless/rust,dwillmer/rust,0x73/rust,carols10cents/rust,emk/rust,jroesch/rust,seanrivera/rust,quornian/rust,rohitjoshi/rust,aepsil0n/rust,0x73/rust,GBGamer/rust,andars/rust,GBGamer/rust,rprichard/rust,omasanori/rust,avdi/rust,sae-bom/rust,robertg/rust,waynenilsen/rand,jroesch/rust,krzysz00/rust,graydon/rust,seanrivera/rust,untitaker/rust,dwillmer/rust,quornian/rust,hauleth/rust,avdi/rust,kimroen/rust,richo/rust,dinfuehr/rust,jroesch/rust,miniupnp/rust,AerialX/rust-rt-minimal,aturon/rust,ruud-v-a/rust,defuz/rust,zachwick/rust,gifnksm/rust,graydon/rust,reem/rust,graydon/rust,pshc/rust,jroesch/rust,gifnksm/rust,emk/rust,vhbit/rust,shepmaster/rand,pythonesque/rust,rprichard/rust,omasanori/rust,michaelballantyne/rust-gpu,ebfull/rust,sae-bom/rust,aturon/rust,michaelballantyne/rust-gpu,graydon/rust,barosl/rust,avdi/rust,vhbit/rust,nwin/rust,rprichard/rust,miniupnp/rust,dinfuehr/rust,philyoon/rust,reem/rust,erickt/rust,P1start/rust,vhbit/rust,dwillmer/rust,jbclements/rust,servo/rust,ejjeong/rust,GBGamer/rust,kimroen/rust,aturon/rust,jashank/rust,nham/rust,P1start/rust,zachwick/rust,GBGamer/rust,ejjeong/rust,richo/rust,victorvde/rust,aneeshusa/rust,ebfull/rust,zubron/rust,zubron/rust,ebfull/rust,miniupnp/rust,pshc/rust,mihneadb/rust,Ryman/rust,pczarn/rust,hauleth/rust,aepsil0n/rust,zubron/rust,dinfuehr/rust,AerialX/rust-rt-minimal,GBGamer/rust,zachwick/rust,AerialX/rust,jbclements/rust,zubron/rust,jroesch/rust,nham/rust,andars/rust,untitaker/rust,carols10cents/rust,philyoon/rust,retep998/rand,omasanori/rust,zubron/rust,cllns/rust,aepsil0n/rust,michaelballantyne/rust-gpu,l0kod/rust,victorvde/rust,jashank/rust,untitaker/rust,ebfull/rust,seanrivera/rust,zubron/rust,aneeshusa/rust,cllns/rust,vhbit/rust,erickt/rust