rust/src
Zack M. Davis 5985b0b035 wherein the parens lint keeps its own counsel re args in nested macros
In #46980 ("in which the unused-parens lint..." (14982db2d6)), the
unused-parens lint was made to check function and method arguments,
which it previously did not (seemingly due to oversight rather than
willful design). However, in #47775 and discussion thereon,
user–developers of Geal/nom and graphql-rust/juniper reported that the
lint was seemingly erroneously triggering on certain complex macros in
those projects. While this doesn't seem like a bug in the lint in the
particular strict sense that the expanded code would, in fact, contain
unncecessary parentheses, it also doesn't seem like the sort of thing
macro authors should have to think about: the spirit of the
unused-parens lint is to prevent needless clutter in code, not to give
macro authors extra heartache in the handling of token trees.

We propose the expediency of declining to lint unused parentheses in
function or method args inside of nested expansions: we believe that
this should eliminate the petty, troublesome lint warnings reported
in the issue, without forgoing the benefits of the lint in simpler
macros.

It seemed like too much duplicated code for the `Call` and `MethodCall`
match arms to duplicate the nested-macro check in addition to each
having their own `for` loop, so this occasioned a slight refactor so
that the function and method cases could share code—hopefully the
overall intent is at least no less clear to the gentle reader.

This is concerning #47775.
2018-01-30 17:47:19 -08:00
..
binaryen@1c9bf65aa0
bootstrap Rollup merge of #47836 - Mark-Simulacrum:stage-flags, r=alexcrichton 2018-01-30 17:10:57 +08:00
build_helper Revert "Add a file to trivially disable tool building or testing" 2017-12-27 00:00:45 +08:00
ci rustc: Split Emscripten to a separate codegen backend 2018-01-28 18:32:45 -08:00
dlmalloc@d3812c3acc
doc Rollup merge of #47515 - jimmantooth:patch-1, r=QuietMisdreavus 2018-01-30 17:10:48 +08:00
etc Correct the return type for x86_mm256_sad_epu8 2017-12-21 22:58:03 +00:00
grammar
jemalloc@1f5a28755e
liballoc Document that Index ops can panic on HashMap & BTreeMap. 2018-01-28 21:51:33 -05:00
liballoc_jemalloc Make liballoc_jemalloc work on CloudABI. 2018-01-18 21:11:24 +01:00
liballoc_system Build the right platform module on CloudABI. 2017-12-31 13:21:46 +01:00
libarena Rollup merge of #47069 - Kagamihime:master, r=nrc 2018-01-13 02:26:23 +08:00
libbacktrace
libcompiler_builtins@0a95675bab Update compiler-builtins submodule 2018-01-24 18:26:27 -08:00
libcore Auto merge of #47204 - varkor:unsafecell-into_inner-safe, r=alexcrichton 2018-01-28 19:01:51 +00:00
libfmt_macros
libgetopts
libgraphviz Fix docs for future pulldown migration 2018-01-01 14:44:12 +01:00
liblibc@56444a4545 Update libc 2018-01-24 08:37:33 -02:00
libpanic_abort Let libpanic_abort call into libc's abort() on CloudABI. 2018-01-05 22:16:54 +01:00
libpanic_unwind Make libpanic_unwind build on CloudABI. 2018-01-04 17:55:44 +01:00
libproc_macro Auto merge of #46551 - jseyfried:improve_legacy_modern_macro_interaction, r=nrc 2018-01-12 10:00:09 +00:00
libprofiler_builtins
librustc rustc: replace "lvalue" terminology with "place" in the code. 2018-01-29 01:49:29 +02:00
librustc_allocator
librustc_apfloat in which the unused-parens lint comes to cover function and method args 2018-01-18 08:33:58 -08:00
librustc_asan
librustc_back rustc: Split Emscripten to a separate codegen backend 2018-01-28 18:32:45 -08:00
librustc_binaryen
librustc_borrowck rustc_borrowck: replace "lvalue" terminology with "place" in docs. 2018-01-29 11:48:17 +02:00
librustc_const_eval Auto merge of #47374 - topecongiro:issue-47096, r=nikomatsakis 2018-01-25 03:20:54 +00:00
librustc_const_math rustc: use {U,I}size instead of {U,I}s shorthands. 2018-01-04 03:12:04 +02:00
librustc_cratesio_shim
librustc_data_structures Make region inference use a dirty list 2018-01-26 21:56:49 -03:00
librustc_driver rustc: Split Emscripten to a separate codegen backend 2018-01-28 18:32:45 -08:00
librustc_errors Rollup merge of #47780 - varkor:cross-file-errors-line-col, r=estebank 2018-01-30 17:10:54 +08:00
librustc_incremental Allow runtime switching between trans backends 2018-01-19 20:27:10 +01:00
librustc_lint wherein the parens lint keeps its own counsel re args in nested macros 2018-01-30 17:47:19 -08:00
librustc_llvm rustc: Split Emscripten to a separate codegen backend 2018-01-28 18:32:45 -08:00
librustc_lsan
librustc_metadata rustc: Load the rustc_trans crate at runtime 2018-01-27 19:16:21 -08:00
librustc_mir Auto merge of #47837 - eddyb:going-places, r=nikomatsakis 2018-01-29 19:47:48 +00:00
librustc_msan
librustc_passes AST/HIR: Add a separate structure for labels 2018-01-22 23:13:12 +03:00
librustc_platform_intrinsics Correct the return type for x86_mm256_sad_epu8 2017-12-21 22:58:03 +00:00
librustc_plugin Don't include DefIndex in plugin- and proc-macro registrar fn symbol. 2018-01-16 17:30:11 +01:00
librustc_privacy Reexport -> re-export in prose and documentation comments 2018-01-15 13:36:53 -05:00
librustc_resolve Auto merge of #47767 - estebank:as-suggestion, r=petrochenkov 2018-01-28 07:44:14 +00:00
librustc_save_analysis Adds support for immovable generators. Move checking of invalid borrows across suspension points to borrowck. Fixes #44197, #45259 and #45093. 2018-01-23 05:10:38 +01:00
librustc_trans Rollup merge of #47826 - gnzlbg:patch-2, r=alexcrichton 2018-01-30 17:10:56 +08:00
librustc_trans_utils rustc: Load the rustc_trans crate at runtime 2018-01-27 19:16:21 -08:00
librustc_tsan
librustc_typeck rustc: replace "lvalue" terminology with "place" in the code. 2018-01-29 01:49:29 +02:00
librustdoc Rollup merge of #47855 - ollie27:rustdoc_hoedown_link_title, r=QuietMisdreavus 2018-01-30 17:11:00 +08:00
libserialize Auto merge of #46919 - michaelwoerister:new-leb128, r=sfackler 2018-01-20 02:00:13 +00:00
libstd Rollup merge of #47839 - frewsxcv:frewsxcv-map-index, r=QuietMisdreavus 2018-01-30 17:10:58 +08:00
libstd_unicode Reexport -> re-export in prose and documentation comments 2018-01-15 13:36:53 -05:00
libsyntax Auto merge of #47870 - kennytm:rollup, r=kennytm 2018-01-30 11:10:06 +00:00
libsyntax_ext rustc: replace "lvalue" terminology with "place" in the code. 2018-01-29 01:49:29 +02:00
libsyntax_pos end_point handling multibyte characters correctly. 2018-01-27 11:46:27 +00:00
libterm
libtest libtest: Failing benchmarks no longer crash the harness. 2018-01-26 19:46:04 +02:00
libunwind Auto merge of #47663 - malbarbo:mips-crt-static, r=alexcrichton 2018-01-28 23:30:15 +00:00
llvm@bc344d5bc2 Upgrade LLVM to incorporate a fix for #47364 2018-01-26 09:57:34 +01:00
llvm-emscripten@2717444753 rustc: Split Emscripten to a separate codegen backend 2018-01-28 18:32:45 -08:00
rt
rtstartup Remove impl Foo for .. in favor of auto trait Foo 2018-01-13 18:48:00 +03:00
rustc rustc: Load the rustc_trans crate at runtime 2018-01-27 19:16:21 -08:00
rustllvm Merge branch 'mlsm' of https://github.com/dotdash/rust into rollup 2018-01-26 06:53:18 -08:00
test wherein the parens lint keeps its own counsel re args in nested macros 2018-01-30 17:47:19 -08:00
tools Rollup merge of #47780 - varkor:cross-file-errors-line-col, r=estebank 2018-01-30 17:10:54 +08:00
Cargo.lock rustc: Load the rustc_trans crate at runtime 2018-01-27 19:16:21 -08:00
Cargo.toml rustc: Load the rustc_trans crate at runtime 2018-01-27 19:16:21 -08:00
stage0.txt Bump to 1.25.0 2018-01-04 07:21:22 -08:00