Previously, it would walk each directory twice: once in the main `Walk`
iterator, and once to count the number of entries in the directory. Now
it only walks each directory once.
- Skip files in `skip` wherever possible to avoid reading their contents
- Don't look for `tidy-alphabetic-start` in tests. It's never currently used and slows the check down a lot.
- Add new `filter_not_rust` helper function
Rollup of 9 pull requests
Successful merges:
- #109102 (Erase escaping late-bound regions when probing for ambiguous associated types)
- #109200 (Fix index out of bounds in `suggest_trait_fn_ty_for_impl_fn_infer`)
- #109211 (E0206 - update description )
- #109222 (Do not ICE for unexpected lifetime with ConstGeneric rib)
- #109235 (fallback to lstat when stat fails on Windows)
- #109248 (Pass the right HIR back from `get_fn_decl`)
- #109251 (Suggest surrounding the macro with `{}` to interpret as a statement)
- #109256 (Check for llvm-tools before install)
- #109257 (resolve: Improve debug impls for `NameBinding`)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
resolve: Improve debug impls for `NameBinding`
Print at least the Some/None/Ok/Err status of the nested bindings if not the bindings themselves.
Noticed while reviewing https://github.com/rust-lang/rust/pull/108729.
Pass the right HIR back from `get_fn_decl`
Fixes#109232
Makes sure that the `fn_id: HirId` that we pass to `suggest_missing_return_type` matches up with the `fn_decl: hir::FnDecl` that we pass to it, so the late-bound vars that we fetch from the former match up with the types in the latter...
This HIR suggestion code really needs a big refactor. I've tried to do it in the past (a couple of attempts), but it's a super tangled mess. It really shouldn't be passing around things like `hir::Node` and just deal with `LocalDefId`s everywhere... Anyways, I'd rather fix this ICE, now.
Do not ICE for unexpected lifetime with ConstGeneric rib
Fixes#109143
r? ````@petrochenkov````
Combining this test with the previous test will affect the previous diagnostics, so I added a separate test case.
- only borrow the refcell once per loop
- avoid complex matches to reduce branch paths in the hot loop
- use a by-ref fast path that avoids mutations at the expense of having false negatives
- Separate out functions so that each unit test doesn't create a file on disk
- Add a few unit tests
Notably, verifying that we generate valid toml relies on python 3.11 so
we can use `tomllib`.