rust/crates
bors[bot] 0a41412ced
Merge #3806
3806: lower bool literal value r=flodiebold a=JoshMcguigan

Following up on #3805, this PR adds the literal value to `ast::LiteralKind` so when we lower we can use the actual value from the source code rather than the default value for the type. Ultimately I plan to use this for exhaustiveness checking in #3706.

I didn't include this in the previous PR because I wasn't sure if it made sense to add this information to `ast::LiteralKind` or provide some other mechanism to get this from `ast::Literal`.

For now I've only implemented this for boolean literals, but I think it could be easily extended to other types. A possible exception to this are string literals, since we may not want to clone around an owned string to hold onto in `ast::LiteralKind`, and it'd be nice to avoid adding a generic lifetime as well. Perhaps we won't ever care about the actual value of a string literal? 

Co-authored-by: Josh Mcguigan <joshmcg88@gmail.com>
2020-04-01 17:38:00 +00:00
..
ra_arena Use resize_with 2020-03-31 09:02:12 -04:00
ra_assists When adding match arm, don't let the floating comma 2020-03-31 14:52:20 +02:00
ra_cfg
ra_db Merge #3727 2020-03-26 17:09:32 +00:00
ra_flycheck Centralize defaults 2020-04-01 18:56:47 +02:00
ra_fmt update itertools version to 0.9.0 2020-03-23 16:22:46 -07:00
ra_hir Cleanup memory usage stats 2020-03-25 19:35:46 +01:00
ra_hir_def lower bool literal with the value from source code rather than default bool value 2020-04-01 04:47:41 -07:00
ra_hir_expand Implement ra_proc_macro client logic 2020-03-31 22:20:18 +08:00
ra_hir_ty Simplify 2020-03-31 19:00:23 +03:00
ra_ide Merge #3797 2020-04-01 12:18:34 +00:00
ra_ide_db Reload only the properties that do not affect vfs 2020-03-30 13:39:14 +03:00
ra_mbe Remove deps on tt_mbe 2020-03-27 00:46:40 +08:00
ra_parser Fix parsing lambdas with return type 2020-03-25 17:01:28 +01:00
ra_proc_macro Redirect stderr to null 2020-03-31 22:20:19 +08:00
ra_prof Fix race in the tests 2020-03-30 11:33:01 +02:00
ra_project_model Reduce scope of deserialization 2020-04-01 18:51:16 +02:00
ra_syntax lower bool literal with the value from source code rather than default bool value 2020-04-01 04:47:41 -07:00
ra_text_edit
ra_tt Implement ra_proc_macro client logic 2020-03-31 22:20:18 +08:00
rust-analyzer Fix pointer syntax 2020-04-01 19:27:45 +02:00
stdx Fix typo 2020-03-30 18:51:30 +02:00
test_utils