]> git.lizzy.rs Git - rust.git/commit
Only bump error count when we are sure that the diagnostic is not a repetition.
authorRafael Fernández López <ereslibre@ereslibre.es>
Tue, 2 Jan 2018 19:00:12 +0000 (20:00 +0100)
committerRafael Fernández López <ereslibre@ereslibre.es>
Tue, 2 Jan 2018 23:42:12 +0000 (00:42 +0100)
commit063607eecbbdff53ee0cbc4b3f9a8ff49448f741
treeb9afbec5a28b4b2165f8895e7211ed369ae84d9e
parent687d3d15ba726dbb1ac6b85223ebe0e98c6820cc
Only bump error count when we are sure that the diagnostic is not a repetition.

This ensures that if we emit the same diagnostic twice, the error count will
match the real number of errors shown to the user.

Fixes #42106
src/librustc_errors/diagnostic.rs
src/librustc_errors/diagnostic_builder.rs
src/librustc_errors/lib.rs
src/test/ui/feature-gate/issue-43106-gating-of-rustc_deprecated.stderr
src/test/ui/feature-gate/issue-43106-gating-of-stable.stderr
src/test/ui/feature-gate/issue-43106-gating-of-unstable.stderr
src/test/ui/issue-42106.stderr
src/test/ui/span/macro-ty-params.stderr