This website requires JavaScript.
Explore
Help
Sign In
nordic-dev.net
/
rust
Watch
2
Star
0
Fork
0
You've already forked rust
mirror of
https://github.com/rust-lang/rust.git
synced
2024-12-15 01:55:03 +00:00
Code
Issues
Packages
Projects
Releases
Wiki
Activity
1ee4651ca1
rust
/
tests
/
ui
/
author.rs
5 lines
68 B
Rust
Raw
Normal View
History
Unescape
Escape
Fix author lint The author lint was generating invalid code as shown on issue: https://github.com/rust-lang-nursery/rust-clippy/issues/2442 I've changed the generated code to properly track cast expressions. Unfortunatelly, I've had to rewrite the `visit_decl` method, to avoid that last if of the chain will be added. After looking at the code, this last line was being added because of the `let x: char` part, but not because of the `0x45df as char` expression. It seems that let statements should not generate code on the author lint, but I'm not sure that this is true or if I'm breaking something on other code generation parts. Finally, I've added a test for the author lint, but I'm not sure that this needs to be added to the testsuite.
2018-02-24 01:02:48 +00:00
fn
main
(
)
{
Use the new scoped tool attributes
2018-05-19 12:04:57 +00:00
#[
clippy::author
]
Fix author lint The author lint was generating invalid code as shown on issue: https://github.com/rust-lang-nursery/rust-clippy/issues/2442 I've changed the generated code to properly track cast expressions. Unfortunatelly, I've had to rewrite the `visit_decl` method, to avoid that last if of the chain will be added. After looking at the code, this last line was being added because of the `let x: char` part, but not because of the `0x45df as char` expression. It seems that let statements should not generate code on the author lint, but I'm not sure that this is true or if I'm breaking something on other code generation parts. Finally, I've added a test for the author lint, but I'm not sure that this needs to be added to the testsuite.
2018-02-24 01:02:48 +00:00
let
x
:
char
=
0x45
as
char
;
}
Reference in New Issue
Copy Permalink