about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/ArchiveWrapper.cpp
diff options
context:
space:
mode:
authorNoah Lev <camelidcamel@gmail.com>2021-11-09 18:23:08 -0800
committerNoah Lev <camelidcamel@gmail.com>2021-11-09 20:05:42 -0800
commitcf6a73c1a4a363a1239f2db32b89ff3d2affb6c2 (patch)
tree14d47b5406e6f871cc9ab46f46e81f176b7d2e8c /compiler/rustc_llvm/llvm-wrapper/ArchiveWrapper.cpp
parent169b84fee38827d0e4e437696baf7149d9c2adf7 (diff)
downloadrust-cf6a73c1a4a363a1239f2db32b89ff3d2affb6c2.tar.gz
rust-cf6a73c1a4a363a1239f2db32b89ff3d2affb6c2.zip
Remove where bound from `clean_fn_decl_with_args`
Basically, this entails moving the arguments cleaning to the call site.

I extracted several local variables because:

1. It makes the code easier to read and understand.

2. If I hadn't, the extra `clean()` calls would have caused complicated
   tuples to be split across several lines.

3. I couldn't just extract local variables for `args` because then the
   arguments would be cleaned *before* the generics, while rustdoc expects
   them to be cleaned *after*. Only extracting `args` caused panics like
   this:

       thread 'rustc' panicked at 'assertion failed: cx.impl_trait_bounds.is_empty()',
       src/librustdoc/clean/utils.rs:462:5

   Extracting variables makes the control flow -- and the required
   order of cleaning -- more explicit.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/ArchiveWrapper.cpp')
0 files changed, 0 insertions, 0 deletions