]> git.lizzy.rs Git - rust.git/commit
Don't buffer lints.
authorDavid Wood <david@davidtw.co>
Tue, 16 Oct 2018 22:47:28 +0000 (00:47 +0200)
committerDavid Wood <david@davidtw.co>
Tue, 16 Oct 2018 22:47:28 +0000 (00:47 +0200)
commitd8db5299fae13a5ef321fd8f7be7364d735fecbb
tree55efb51bba3b6fb685f45ea72a9ada531d394ce3
parent99ab2f4071b959b0276862605d7107227c2fa76f
Don't buffer lints.

When lints are emitted from the AST borrow checker, they do not signal
an error as it is not known at that time whether, due to attributes,
that lint will error or warn. This means that when lints are buffered
in the MIR they will always be downgraded, as the AST borrowck will not
have been marked as having errored, even if a lint was upgraded to
an error after being emitted from the AST borrowck. The simple solution
to this is to not buffer any lints from the MIR borrowck.
src/librustc_mir/borrow_check/mod.rs