auto merge of #15385 : jroweboy/rust/master, r=brson
auto merge of #15385 : jroweboy/rust/master, r=brson

This enables the docs search function to be more forgiving for spelling mistakes. The algorithm works as a dynamic programming algorithm to detect the minimum number of changes required to the search parameter string in order to match any string in the search index. If the number of changes is less then a threshold (currently defined as 3), then the search parameter will be included as it is a possible misspelling of the word. Any results returned by the algorithm are sorted by distance and are ranked lower than results that are partial or exact matches (aka the matches returned by the original search algorithm). Additionally, the increment in the for loops in this file were using one of three different ways to increment (`i += 1` `i++` and `++i`) so I just standardized it to `++i`.

As an example, consider searching for the word `String` and accidentally typing in `Strnig`. The old system would return no results because it is a misspelling, but the Levenshtein distance between these two inputs is only two, which means that this will return `String` as a result. Additionally, it will return a few other results such as `strong`, and `StdRng` because these are also similar to `Strnig`. Because of the ranking system though, this change should be unobtrusive to anyone that spells the words correctly, as those are still ranked first before any Levenshtein results.

GBGamer/rust,aidancully/rust,0x73/rust,reem/rust,nwin/rust,jbclements/rust,kimroen/rust,zubron/rust,jbclements/rust,richo/rust,graydon/rust,dinfuehr/rust,ruud-v-a/rust,KokaKiwi/rust,kwantam/rust,jbclements/rust,AerialX/rust-rt-minimal,defuz/rust,jashank/rust,kwantam/rust,mahkoh/rust,cllns/rust,pelmers/rust,pelmers/rust,mihneadb/rust,rohitjoshi/rust,mvdnes/rust,victorvde/rust,pshc/rust,graydon/rust,cllns/rust,kwantam/rust,carols10cents/rust,P1start/rust,philyoon/rust,carols10cents/rust,ejjeong/rust,dwillmer/rust,robertg/rust,dinfuehr/rust,pshc/rust,TheNeikos/rust,carols10cents/rust,sae-bom/rust,rprichard/rust,emk/rust,victorvde/rust,jashank/rust,pshc/rust,pshc/rust,omasanori/rust,AerialX/rust-rt-minimal,carols10cents/rust,ejjeong/rust,kimroen/rust,zaeleus/rust,ruud-v-a/rust,miniupnp/rust,krzysz00/rust,AerialX/rust,philyoon/rust,erickt/rust,ktossell/rust,aneeshusa/rust,dwillmer/rust,barosl/rust,0x73/rust,seanrivera/rust,dwillmer/rust,XMPPwocky/rust,GBGamer/rust,zachwick/rust,mvdnes/rust,l0kod/rust,0x73/rust,pelmers/rust,krzysz00/rust,avdi/rust,TheNeikos/rust,GBGamer/rust,seanrivera/rust,mihneadb/rust,untitaker/rust,ktossell/rust,victorvde/rust,KokaKiwi/rust,jroesch/rust,mdinger/rust,quornian/rust,AerialX/rust-rt-minimal,aidancully/rust,jroesch/rust,pelmers/rust,untitaker/rust,rprichard/rust,P1start/rust,aneeshusa/rust,ebfull/rust,mdinger/rust,AerialX/rust,mahkoh/rust,zubron/rust,gifnksm/rust,avdi/rust,AerialX/rust,AerialX/rust,mdinger/rust,aepsil0n/rust,carols10cents/rust,dwillmer/rust,richo/rust,dwillmer/rust,seanrivera/rust,andars/rust,bombless/rust,ktossell/rust,aidancully/rust,ebfull/rust,zubron/rust,kimroen/rust,avdi/rust,zubron/rust,bombless/rust,pshc/rust,reem/rust,TheNeikos/rust,krzysz00/rust,aepsil0n/rust,andars/rust,aepsil0n/rust,sae-bom/rust,rprichard/rust,erickt/rust,jashank/rust,robertg/rust,vhbit/rust,jroesch/rust,ruud-v-a/rust,rohitjoshi/rust,kwantam/rust,andars/rust,miniupnp/rust,defuz/rust,vhbit/rust,defuz/rust,TheNeikos/rust,mihneadb/rust,XMPPwocky/rust,pshc/rust,kimroen/rust,erickt/rust,defuz/rust,seanrivera/rust,sae-bom/rust,jroesch/rust,dinfuehr/rust,rohitjoshi/rust,GBGamer/rust,barosl/rust,cllns/rust,pelmers/rust,0x73/rust,omasanori/rust,cllns/rust,nham/rust,sae-bom/rust,AerialX/rust-rt-minimal,nwin/rust,hauleth/rust,vhbit/rust,emk/rust,l0kod/rust,P1start/rust,P1start/rust,dwillmer/rust,defuz/rust,gifnksm/rust,quornian/rust,bombless/rust,robertg/rust,omasanori/rust,barosl/rust,krzysz00/rust,philyoon/rust,reem/rust,miniupnp/rust,graydon/rust,mvdnes/rust,zachwick/rust,mvdnes/rust,GBGamer/rust,quornian/rust,mvdnes/rust,aneeshusa/rust,rprichard/rust,ejjeong/rust,jbclements/rust,carols10cents/rust,zachwick/rust,erickt/rust,gifnksm/rust,untitaker/rust,kimroen/rust,rohitjoshi/rust,miniupnp/rust,barosl/rust,avdi/rust,graydon/rust,quornian/rust,philyoon/rust,erickt/rust,bombless/rust,AerialX/rust-rt-minimal,nham/rust,jashank/rust,hauleth/rust,0x73/rust,jbclements/rust,philyoon/rust,zaeleus/rust,jashank/rust,aidancully/rust,reem/rust,rohitjoshi/rust,aneeshusa/rust,GBGamer/rust,omasanori/rust,aepsil0n/rust,omasanori/rust,cllns/rust,mahkoh/rust,aidancully/rust,mihneadb/rust,ktossell/rust,graydon/rust,vhbit/rust,vhbit/rust,ejjeong/rust,nwin/rust,pshc/rust,richo/rust,GBGamer/rust,ebfull/rust,XMPPwocky/rust,jroesch/rust,zaeleus/rust,zachwick/rust,andars/rust,kwantam/rust,kimroen/rust,l0kod/rust,untitaker/rust,emk/rust,AerialX/rust-rt-minimal,pshc/rust,ejjeong/rust,rprichard/rust,rohitjoshi/rust,quornian/rust,ebfull/rust,rprichard/rust,nwin/rust,ruud-v-a/rust,sae-bom/rust,l0kod/rust,erickt/rust,P1start/rust,robertg/rust,zaeleus/rust,hauleth/rust,mihneadb/rust,l0kod/rust,ktossell/rust,zubron/rust,hauleth/rust,reem/rust,miniupnp/rust,dinfuehr/rust,barosl/rust,nham/rust,seanrivera/rust,bombless/rust-docs-chinese,TheNeikos/rust,nwin/rust,ebfull/rust,mdinger/rust,0x73/rust,bombless/rust,avdi/rust,ejjeong/rust,robertg/rust,andars/rust,quornian/rust,emk/rust,reem/rust,KokaKiwi/rust,dinfuehr/rust,ruud-v-a/rust,zaeleus/rust,zubron/rust,jashank/rust,victorvde/rust,mahkoh/rust,aidancully/rust,nwin/rust,dwillmer/rust,miniupnp/rust,zubron/rust,XMPPwocky/rust,aneeshusa/rust,avdi/rust,emk/rust,nham/rust,zachwick/rust,mdinger/rust,untitaker/rust,ruud-v-a/rust,XMPPwocky/rust,jbclements/rust,bombless/rust,barosl/rust,vhbit/rust,P1start/rust,KokaKiwi/rust,l0kod/rust,mvdnes/rust,gifnksm/rust,aepsil0n/rust,nwin/rust,nwin/rust,aepsil0n/rust,l0kod/rust,mahkoh/rust,AerialX/rust,jroesch/rust,quornian/rust,zubron/rust,vhbit/rust,victorvde/rust,krzysz00/rust,hauleth/rust,barosl/rust,robertg/rust,zachwick/rust,dwillmer/rust,philyoon/rust,nham/rust,untitaker/rust,richo/rust,vhbit/rust,jbclements/rust,jroesch/rust,dinfuehr/rust,TheNeikos/rust,jroesch/rust,GBGamer/rust,aneeshusa/rust,emk/rust,krzysz00/rust,sae-bom/rust,ebfull/rust,cllns/rust,victorvde/rust,hauleth/rust,jbclements/rust,nham/rust,gifnksm/rust,jashank/rust,seanrivera/rust,richo/rust,nham/rust,l0kod/rust,gifnksm/rust,graydon/rust,pelmers/rust,zaeleus/rust,jashank/rust,XMPPwocky/rust,kimroen/rust,P1start/rust,richo/rust,miniupnp/rust,mahkoh/rust,miniupnp/rust,0x73/rust,emk/rust,kwantam/rust,defuz/rust,mihneadb/rust,KokaKiwi/rust,KokaKiwi/rust,mdinger/rust,ktossell/rust,ktossell/rust,omasanori/rust,erickt/rust,AerialX/rust,jbclements/rust,andars/rust