]> git.lizzy.rs Git - rust.git/commit
Consolidate pattern check errors
authorPramod Bisht <pramodpsb@outlook.com>
Tue, 2 Oct 2018 05:51:02 +0000 (05:51 +0000)
committerPramod Bisht <pramodpsb@outlook.com>
Tue, 2 Oct 2018 05:51:02 +0000 (05:51 +0000)
commite536e64702a12898ba7156c66de40b652ac21db1
tree90df5bbe78b8f9fb1e936eef56991f7fa7e2a918
parentde3d640f59c4fa4a09faf2a8d6b0a812aaa6d6cb
Consolidate pattern check errors

we are consolidating `cannot bind by-move and by-ref in the same
pattern` message present on the different lines into single diagnostic
message.

To do this, we are first gathering those spans into the vector
after that we are throwing them with the help of MultiSpan in
a separate block.

Addresses: #53840
src/librustc_mir/hair/pattern/check_match.rs
src/test/ui/issue-53840.rs [new file with mode: 0644]
src/test/ui/issue-53840.stderr [new file with mode: 0644]