auto merge of #12670 : dmski/rust/master, r=nick29581
auto merge of #12670 : dmski/rust/master, r=nick29581

CodeMap.span_to_* perform a lookup of a BytePos(sp.hi), which lands into the next filemap if the last byte of range denoted by Span is also the last byte of the filemap, which results in ICEs or incorrect error reports.

        Example:
            ````

            pub fn main() {
                let mut num = 3;
                let refe = &mut num;
                *refe = 5;
                println!("{}", num);
            }````

(note the empty line in the beginning and the absence of newline at the end)

The above would have caused ICE when trying to report where "refe" borrow ends.
The above without an empty line in the beginning would have reported borrow end to be the first line.

Most probably, this is also responsible for (at least some occurrences of) issue #8256.

The issue is fixed by always adding a newline at the end of non-empty filemaps in case there isn't a new line there already.

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