Uh oh!
There was an error while loading. Please reload this page.
encode ; stmt without expr as StmtKind::Empty - #69506
Conversation
Centril
commented
Feb 27, 2020
Let's see whether this happens to regress perf: @bors try @rust-timer queue |
rust-timer
commented
Feb 27, 2020
Awaiting bors try build completion |
bors
commented
Feb 27, 2020
encode `;` stmt without expr as `StmtKind::Semi(None)` Instead of encoding `;` statements without a an expression as a tuple in AST, we modify `ast::StmtKind::Semi` to accept an `Option<_>` and then encode the `;` with `StmtKind::Semi(None)`. r? @petrochenkov
bors
commented
Feb 27, 2020
☀️ Try build successful - checks-azure |
rust-timer
commented
Feb 27, 2020
Queued 1d82a25 with parent 0c15adc, future comparison URL. |
Centril
commented
Feb 28, 2020
Seems like this resulted in a perf win rather than a regression, ostensibly because we avoid |
petrochenkov
commented
Feb 29, 2020
Let's make it a separate The semicolon statement is subtly different from macro_rules! empty {() => {}}fnfoo() -> u8{{0}empty!();}
The PR that turned redundant semicolons into statements in AST for diagnostics walked some dangerous road, I really hope it didn't introduce anything incompatible with the macro expansion plans. |
Uh oh!
There was an error while loading. Please reload this page.
Centril
commented
Feb 29, 2020
Hmm... Do you have any naming suggestions? |
petrochenkov
commented
Feb 29, 2020
It actually regressed some things, but it looks like it's possible to fix them backward-compatibly. macro_rules! empty {() => {}}fnfoo() -> u8{{0}empty!();;// Works on 1.38, error on 1.39} |
petrochenkov
commented
Feb 29, 2020
Well. In C++ it's officially known as null statement, but I can't say I like that naming. |
Centril
commented
Feb 29, 2020
|
; stmt without expr as StmtKind::Semi(None); stmt without expr as StmtKind::EmptyCentril
commented
Feb 29, 2020
Changed to |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
petrochenkov
commented
Feb 29, 2020
r=me with the remaining nit addressed. |
Centril
commented
Feb 29, 2020
@bors r=petrochenkov |
bors
commented
Feb 29, 2020
📌 Commit 6a5de134879c7781a713d9b0d23a22aa5fdd5131 has been approved by |
This comment has been minimized.
This comment has been minimized.
Centril
commented
Mar 1, 2020
@bors r=petrochenkov |
bors
commented
Mar 1, 2020
📌 Commit 176fe3f has been approved by |
bors
commented
Mar 3, 2020
bors
commented
Mar 3, 2020
☀️ Test successful - checks-azure |
rust-highfive
commented
Mar 3, 2020
📣 Toolstate changed by #69506! Tested on commit 4ad6248. 💔 clippy-driver on windows: test-pass → test-fail (cc @mcarton@oli-obk@Manishearth@flip1995@yaahc@phansch@llogiq). |
Tested on commit rust-lang/rust@4ad6248. Direct link to PR: <rust-lang/rust#69506> 💔 clippy-driver on windows: test-pass → test-fail (cc @mcarton@oli-obk@Manishearth@flip1995@yaahc@phansch@llogiq). 💔 clippy-driver on linux: test-pass → test-fail (cc @mcarton@oli-obk@Manishearth@flip1995@yaahc@phansch@llogiq).
Rustup to rust-lang/rust#69506 changelog: none
Changes: ```` Rustup to rust-lang#69506 Revive rls integration test use question mark operator Add regression test Use `try_eval_usize` over `eval_usize` Add path for display trait Use lang items instead of get_trait_def_id where possible Update stderr Don't lint debug formatting in debug impl Whitelist unused attribute for use items. add test for rust-lang#5238 ````
submodules: update clippy from 8b7f7e6 to 74eae9d Changes: ```` Rustup to #69506 Revive rls integration test use question mark operator Add regression test Use `try_eval_usize` over `eval_usize` Add path for display trait Use lang items instead of get_trait_def_id where possible Update stderr Don't lint debug formatting in debug impl Whitelist unused attribute for use items. add test for #5238 ```` Makes clippy tests pass again. r? @oli-obk
Changes: ```` Apply suggestions from code review Simplify if_chain. Move NumericLiteral to its own module. Included binary and octal cases. Resolve false positives for hex int cast. Test for unnecessary_cast of hex int literal. run-rustfix Lint `if let Some` in question_mark lint Add restrictive pat use in full binded struct Update test case answers to match cargo dev fmt Ran cargo dev fmt Rustup to rust-lang#69506 Recommended changes from flip1995 Revive rls integration test use question mark operator Add regression test Use `try_eval_usize` over `eval_usize` Add path for display trait Use lang items instead of get_trait_def_id where possible Update stderr Don't lint debug formatting in debug impl Whitelist unused attribute for use items. Fix one last test issue Refactor suggested by krishna-veerareddy Fixed compile error from merging Changed test output to reflect cargo fmt Run cargo dev fmt Finished checking for cases of absolute values add test for rust-lang#5238 Some bugfixing Created floating point abs lint and test, but not yet run ````
submodules: update clippy from 8b7f7e6 to 74eae9d Changes: ```` Rustup to #69506 Revive rls integration test use question mark operator Add regression test Use `try_eval_usize` over `eval_usize` Add path for display trait Use lang items instead of get_trait_def_id where possible Update stderr Don't lint debug formatting in debug impl Whitelist unused attribute for use items. add test for #5238 ```` Makes clippy tests pass again. r? @oli-obk
Changes: ```` Apply suggestions from code review Simplify if_chain. Move NumericLiteral to its own module. Included binary and octal cases. Resolve false positives for hex int cast. Test for unnecessary_cast of hex int literal. run-rustfix Lint `if let Some` in question_mark lint Add restrictive pat use in full binded struct Update test case answers to match cargo dev fmt Ran cargo dev fmt Rustup to rust-lang/rust#69506 Recommended changes from flip1995 Revive rls integration test use question mark operator Add regression test Use `try_eval_usize` over `eval_usize` Add path for display trait Use lang items instead of get_trait_def_id where possible Update stderr Don't lint debug formatting in debug impl Whitelist unused attribute for use items. Fix one last test issue Refactor suggested by krishna-veerareddy Fixed compile error from merging Changed test output to reflect cargo fmt Run cargo dev fmt Finished checking for cases of absolute values add test for rust-lang#5238 Some bugfixing Created floating point abs lint and test, but not yet run ````
Instead of encoding
;statements without a an expression as a tuple in AST, encode it asast::StmtKind::Empty.r? @petrochenkov