about summary refs log tree commit diff
path: root/tests
AgeCommit message (Collapse)AuthorLines
2024-11-15Rollup merge of #133074 - ferrocene:ja-make-ui-test-os-agnostic, r=NoratriebGuillaume Gomez-11/+9
make UI test OS-agnostic the internal representation of `std::sync::Mutex` depends on the compilation target. due to this, the compiler produces different number of errors for UI test `issue-17431-6.rs` depending on the compilation target. for example, when compiling the UI test to an `*-apple-*` or `*-qnx7*` target, the "cycle detected" error is not reported ``` console $ cat src/lib.rs use std::sync::Mutex; enum Foo { X(Mutex<Option<Foo>>), } impl Foo { fn bar(self) {} } fn main() {} $ cargo check --target x86_64-apple-ios 2>&1 | rg '^error\[' error[E0072]: recursive type `Foo` has infinite size ``` whereas rustc produces two errors for other OSes, like Linux, which is what the UI test expects ``` console $ cargo check --target x86_64-unknown-linux-gnu 2>&1 | rg '^error\[' error[E0072]: recursive type `Foo` has infinite size error[E0391]: cycle detected when computing when `Foo` needs drop ``` this commit replaces the problematic `Mutex` with `UnsafeCell`, which has the same internal representation regardless of the compilation target. with that change, rustc reports two errors for all compilation targets. ``` console $ cat src/lib.rs use std::cell::UnsafeCell; enum Foo { X(UnsafeCell<Option<Foo>>), } impl Foo { fn bar(self) {} } fn main() {} $ cargo check --target x86_64-apple-ios 2>&1 | rg '^error\[' error[E0072]: recursive type `Foo` has infinite size error[E0391]: cycle detected when computing when `Foo` needs drop ``` with this change, we can remove the `ignore-apple` directive as the UI test now also passes on apple targets.
2024-11-15Rollup merge of #132978 - WaffleLapkin:very-semantic-change-kind, ↵Guillaume Gomez-109/+74
r=compiler-errors Mention both release *and* edition breakage for never type lints This PR makes ~~two changes~~ a change to the never type lints (`dependency_on_unit_never_type_fallback` and `never_type_fallback_flowing_into_unsafe`): 1. Change the wording of the note to mention that the breaking change will be made in an edition _and_ in a future release 2. ~~Make these warnings be reported in deps (hopefully the lints are matured enough)~~ r? ``@compiler-errors`` cc ``@ehuss`` closes #132930
2024-11-15Rollup merge of #132936 - surechen:fix_131989, r=NadrierilGuillaume Gomez-40/+180
For expr `return (_ = 42);` unused_paren lint should not be triggered fixes #131989
2024-11-15Auto merge of #133079 - matthiaskrgr:rollup-k8u7syk, r=matthiaskrgrbors-19/+60
Rollup of 4 pull requests Successful merges: - #132817 (Recurse into APITs in `impl_trait_overcaptures`) - #133021 (Refactor `configure_annotatable`) - #133045 (tests: Test pac-ret flag merging on clang with LTO) - #133049 (Change Visitor::visit_precise_capturing_arg so it returns a Visitor::Result) r? `@ghost` `@rustbot` modify labels: rollup
2024-11-15Rollup merge of #133045 - mrkajetanp:pauth-test-clang-lto-flag-merge, r=jieyouxuMatthias Krüger-3/+15
tests: Test pac-ret flag merging on clang with LTO Extend the test for pac-ret with clang and LTO by checking that different branch protection flags are preserved after the LTO step. There was an issue in older LLVM versions that was causing this to behave incorrectly. try-job: aarch64-gnu-debug
2024-11-15Rollup merge of #132817 - compiler-errors:impl-trait-overcaptures-apit, ↵Matthias Krüger-16/+45
r=BoxyUwU Recurse into APITs in `impl_trait_overcaptures` We were previously not detecting cases where an RPIT was located in the return type of an async function, leading to underfiring of the `impl_trait_overcaptures`. This PR does this recursion properly now. cc https://github.com/rust-lang/rust/issues/132809
2024-11-15Auto merge of #132992 - RalfJung:check-consts-feature-gate, r=compiler-errorsbors-1/+1
check_consts: fix error requesting feature gate when that gate is not actually needed When working on https://github.com/rust-lang/hashbrown/pull/586 I noticed that the compiler asks for the `rustc_private` feature to be enabled if one forgets to set `rustc_const_stable_indirect` on a function -- but enabling `rustc_private` would not actually help. This fixes the diagnostics. r? `@compiler-errors`
2024-11-15make UI test OS-agnosticJorge Aparicio-11/+9
the internal representation of `std::sync::Mutex` depends on the compilation target. due to this, the compiler produces different number of errors for UI test `issue-17431-6.rs` depending on the compilation target. for example, when compiling the UI test to an `*-apple-*` or `*-qnx7*` target, the "cycle detected" error is not reported ``` console $ cat src/lib.rs use std::sync::Mutex; enum Foo { X(Mutex<Option<Foo>>), } impl Foo { fn bar(self) {} } fn main() {} $ cargo check --target x86_64-apple-ios 2>&1 | rg '^error\[' error[E0072]: recursive type `Foo` has infinite size ``` whereas rustc produces two errors for other OSes, like Linux, which is what the UI test expects ``` console $ cargo check --target x86_64-unknown-linux-gnu 2>&1 | rg '^error\[' error[E0072]: recursive type `Foo` has infinite size error[E0391]: cycle detected when computing when `Foo` needs drop ``` this commit replaces the problematic `Mutex` with `UnsafeCell`, which has the same internal representation regardless of the compilation target. with that change, rustc reports two errors for all compilation targets. ``` console $ cat src/lib.rs use std::cell::UnsafeCell; enum Foo { X(UnsafeCell<Option<Foo>>), } impl Foo { fn bar(self) {} } fn main() {} $ cargo check --target x86_64-apple-ios 2>&1 | rg '^error\[' error[E0072]: recursive type `Foo` has infinite size error[E0391]: cycle detected when computing when `Foo` needs drop ``` with this change, we can remove the `ignore-apple` directive as the UI test now also passes on apple targets.
2024-11-15tests: Test pac-ret flag merging on clang with LTOKajetan Puchalski-3/+15
Extend the test for pac-ret with clang and LTO by checking that different branch protection flags are preserved after the LTO step. There was an issue in older LLVM versions that was causing this to behave incorrectly. Tests the LLVM behaviour added in: https://github.com/llvm/llvm-project/commit/1782810b8440144a0141c24192acbaeb55a1545d
2024-11-14Rollup merge of #133053 - liushuyu:simd-test-x86-baseline-fix, r=workingjubileeJubilee-6/+4
tests: Fix the SIMD FFI tests with certain x86 configuration This pull request fixes the SIMD FFI tests with certain x86 configurations by gating the SSE2 intrinsic behind the `sse2` feature gate. A generic LLVM intrinsic that is easy to un-fuse on those platforms is added to compensate for those platforms.
2024-11-14Rollup merge of #133050 - tgross35:inline-f16-f128, r=saethlinJubilee-0/+29
Always inline functions signatures containing `f16` or `f128` There are a handful of tier 2 and tier 3 targets that cause a LLVM crash or linker error when generating code that contains `f16` or `f128`. The cranelift backend also does not support these types. To work around this, every function in `std` or `core` that contains these types must be marked `#[inline]` in order to avoid sending any code to the backend unless specifically requested. However, this is inconvenient and easy to forget. Introduce a check for these types in the frontend that automatically inlines any function signatures that take or return `f16` or `f128`. Note that this is not a perfect fix because it does not account for the types being passed by reference or as members of aggregate types, but this is sufficient for what is currently needed in the standard library. Fixes: https://github.com/rust-lang/rust/issues/133035 Closes: https://github.com/rust-lang/rust/pull/133037
2024-11-14Rollup merge of #132905 - xingxue-ibm:link-unwind, r=bjorn3Jubilee-9/+5
[AIX] Add crate "unwind" to link with libunwind The Rust on IBM AIX uses LLVM's `libunwind`. Since crate `unwind` is a dependency of crate `std` and `#![no_std]` is specified in the test case, `libunwind` is not included in the link command by default. As a result, the test case fails to link with the error "Undefined symbol: ._Unwind_Resume" on AIX. This PR explicitly adds crate `unwind` for AIX, along with feature `panic_unwind`, which is required to include the `unwind` crate.
2024-11-14tests/run-make/simd-ffi: use a generic LLVM intrinsics ...liushuyu-5/+3
... to do more comprehensive type checking
2024-11-14Always inline functions signatures containing `f16` or `f128`Trevor Gross-0/+29
There are a handful of tier 2 and tier 3 targets that cause a LLVM crash or linker error when generating code that contains `f16` or `f128`. The cranelift backend also does not support these types. To work around this, every function in `std` or `core` that contains these types must be marked `#[inline]` in order to avoid sending any code to the backend unless specifically requested. However, this is inconvenient and easy to forget. Introduce a check for these types in the frontend that automatically inlines any function signatures that take or return `f16` or `f128`. Note that this is not a perfect fix because it does not account for the types being passed by reference or as members of aggregate types, but this is sufficient for what is currently needed in the standard library. Fixes: https://github.com/rust-lang/rust/issues/133035 Closes: https://github.com/rust-lang/rust/pull/133037
2024-11-14Auto merge of #133047 - matthiaskrgr:rollup-9se1vth, r=matthiaskrgrbors-0/+68
Rollup of 4 pull requests Successful merges: - #128197 (Skip locking span interner for some syntax context checks) - #133040 ([rustdoc] Fix handling of footnote reference in footnote definition) - #133043 (rustdoc-search: case-sensitive only when capitals are used) - #133046 (Clippy subtree update) r? `@ghost` `@rustbot` modify labels: rollup
2024-11-14tests/run-make/simd-ffi: fix test crashing on x86 targets ...liushuyu-2/+2
... that do not have SSE2 support (e.g. i586)
2024-11-14Rollup merge of #133043 - notriddle:master, r=fmeaseMatthias Krüger-0/+48
rustdoc-search: case-sensitive only when capitals are used This is the "smartcase" behavior, described by vim and dtolnay. Fixes https://github.com/rust-lang/rust/issues/133017
2024-11-14rustdoc-search: case-sensitive only when capitals are usedMichael Howell-0/+48
This is the "smartcase" behavior, described by vim and dtolnay.
2024-11-14Add regression test for #131946Guillaume Gomez-0/+20
2024-11-14Include the "unwind" crate to link with libunwind instead of the "libc" crate.Xing Xue-9/+5
2024-11-14Rollup merge of #133005 - notriddle:notriddle/trie-search, r=GuillaumeGomezGuillaume Gomez-23/+45
rustdoc: use a trie for name-based search Potentially https://github.com/rust-lang/rust/issues/131156 — need to try reproducing the problem with `windows` Preview and profiler results ---------------------------- Here's some quick profiling in Firefox done on the rust compiler docs: - Before: https://share.firefox.dev/3UPm3M8 - After: https://share.firefox.dev/40LXvYb Here's the results for the node.js profiler: - https://notriddle.com/rustdoc-html-demo-15/trie-perf/index.html Here's a copy that you can use to try it out. Compare it with [the nightly]. Try typing `typecheckercontext` one character at a time, slowly. - https://notriddle.com/rustdoc-html-demo-15/compiler-doc-trie/index.html [the nightly]: https://doc.rust-lang.org/nightly/nightly-rustc/ The fuzzy match algo is based on [Fast String Correction with Levenshtein-Automata] and the corresponding implementation code in [moman] and [Lucene]; the bit-packing representation comes from Lucene, but the actual matcher is more based on `fsc.py`. As suggested in the paper, a trie is used to represent the FSA dictionary. The same trie is used for prefix matching. Substring matching is done with a side table of three-character[^1] windows that point into the trie. [Fast String Correction with Levenshtein-Automata]: https://github.com/tpn/pdfs/blob/master/Fast%20String%20Correction%20with%20Levenshtein-Automata%20(2002)%20(10.1.1.16.652).pdf [Lucene]: https://fossies.org/linux/lucene/lucene/core/src/java/org/apache/lucene/util/automaton/Lev1TParametricDescription.java [moman]: https://gitlab.com/notriddle/moman-rustdoc User-visible changes -------------------- I don't expect anybody to notice anything, but it does cause two changes: - Substring matches, in the middle of a name, only apply if there's three or more characters in the search query. - Levenshtein distance limit now maxes out at two. In the old version, the limit was w/3, so you could get looser matches for queries with 9 or more characters[^1] in them. - It uses more RAM. - It's faster (assuming you don't swap thrash). [^1]: technically utf-16 code units
2024-11-14Rollup merge of #132172 - dianne:suggest-borrow-generic, r=matthewjasperGuillaume Gomez-51/+210
borrowck diagnostics: suggest borrowing function inputs in generic positions # Summary This generalizes borrowck's existing suggestions to borrow instead of moving when passing by-value to a function that's generic in that input. Previously, this was special-cased to `AsRef`/`Borrow`-like traits and `Fn`-like traits. This PR changes it to test if, for a moved place with type `T`, that the callee's signature and clauses don't break if you substitute in `&T` or `&mut T`. For instance, it now works with `Read`/`Write`-like traits. Fixes https://github.com/rust-lang/rust/issues/131413 # Incidental changes - No longer spuriously suggests mutable borrows of closures in some situations (see e.g. the tests in [tests/ui/closures/2229_closure_analysis/](https://github.com/rust-lang/rust/compare/master...dianne:rust:suggest-borrow-generic?expand=1#diff-8dfb200c559f0995d0f2ffa2f23bc6f8041b263e264e5c329a1f4171769787c0)). - No longer suggests cloning closures that implement `Fn`, since they can be borrowed (see e.g. [tests/ui/moves/borrow-closures-instead-of-move.stderr](https://github.com/rust-lang/rust/compare/master...dianne:rust:suggest-borrow-generic?expand=1#diff-5db268aac405eec56d099a72d8b58ac46dab523cf013e29008104840168577fb)). This keeps the behavior to suppress suggestions of `fn_once.clone()()`. I think it might make sense to suggest it with a "but this might not be your desired behavior" caveat, as is done when something is used after being consumed as the receiver for a method call. That's probably out of the scope of this PR though. # Limitations and possible improvements - This doesn't work for receivers of method calls. This is a small change, and I have it implemented locally, but I'm not sure it's useful on its own. In most cases I've found borrowing the receiver would change the call's output type (see below). In other cases (e.g. `Iterator::sum`), borrowing the receiver isn't useful since it's consumed. - This doesn't work when it would change the call's output type. In general, I figure inserting references into the output type is an unwanted change. However, this also means it doesn't work in cases where the new output type would be effectively the same as the old one. For example, from the rand crate, the iterator returned by [`Rng::sample_iter`](https://docs.rs/rand/latest/rand/trait.Rng.html#method.sample_iter) is effectively the same (modulo regions) whether you borrow or consume the receiver `Rng`, so common usage involves borrowing it. I'm not sure whether the best approach is to add a more complex check of approximate equivalence, to forego checking the call's output type and give spurious suggestions, or to leave it as-is. - This doesn't work when it would change the call's other input types. Instead, it could suggest borrowing any others that have the same parameter type (but only when suggesting shared borrows). I think this would be a pretty easy change, but I don't think it's very useful so long as the normalized output type can't change. I'm happy to implement any of these (or other potential improvements to this), but I'm not sure which are common enough patterns to justify the added complexity. Please let me know if any sound worthwhile.
2024-11-14Rollup merge of #132773 - jakos-sec:fix-asan-win32, r=jieyouxuGuillaume Gomez-0/+29
PassWrapper: disable UseOdrIndicator for Asan Win32 As described in https://reviews.llvm.org/D137227 UseOdrIndicator should be disabled on Windows since link.exe does not support duplicate weak definitions. Fixes https://github.com/rust-lang/rust/issues/124390. Credits also belong to `@1c3t3a` who worked with me on this. We are currently testing this on a Windows machine.
2024-11-14Rollup merge of #132310 - jieyouxu:max-llvm-version, r=onur-ozkanGuillaume Gomez-5/+5
compiletest: add `max-llvm-major-version` directive To complement existing `min-llvm-version` so contributors don't have to use `ignore-llvm-version: 20 - 99` to emulate `max-llvm-major-version: 19`. Closes #132305. cc `@workingjubilee` who suggested this. ### Implementation steps - [x] 1. Implement the directive (this PR) - [x] 2. Open an accompanying dev-guide PR to describe the directive (https://github.com/rust-lang/rustc-dev-guide/pull/2129) r? bootstrap
2024-11-14tests: use `max-llvm-major-version` instead of `ignore-llvm-version` range ↵许杰友 Jieyou Xu (Joe)-5/+5
like `N - 99` For tests that use `ignore-llvm-version: N - M`, replace that with `max-llvm-major-version: N-1`.
2024-11-13Rollup merge of #133012 - Eclips4:issue-125670, r=compiler-errorsJubilee-0/+124
Add test cases for #125918 Closes #125670 r? `@jieyouxu`
2024-11-13Rollup merge of #132971 - BoxyUwU:handle_infers_in_anon_consts, ↵Jubilee-0/+52
r=compiler-errors Handle infer vars in anon consts on stable Fixes #132955 Diagnostics will sometimes try to replace generic parameters with inference variables in failing goals. This means that if we have some failing goal with an array repeat expr count anon const in it, we will wind up with some `ty::ConstKind::Unevaluated(anon_const_def, [?x])` during diagnostics which will then ICE if we do not handle inference variables correctly on stable when normalizing type system consts. r? ```@compiler-errors```
2024-11-14Mark `never_type_fallback_flowing_into_unsafe` as a semantic changeMaybe Lapkin-30/+30
...rather than a future error
2024-11-13Suggest borrowing arguments in generic positions when trait bounds are satisfieddianne-141/+170
This subsumes the suggestions to borrow arguments with `AsRef`/`Borrow` bounds and those to borrow arguments with `Fn` and `FnMut` bounds. It works for other traits implemented on references as well, such as `std::io::Read`, `std::io::Write`, and `core::fmt::Write`. Incidentally, by making the logic for suggesting borrowing closures general, this removes some spurious suggestions to mutably borrow `FnMut` closures in assignments, as well as an unhelpful suggestion to add a `Clone` constraint to an `impl Fn` argument.
2024-11-14Adding `BreakValue` to UnusedDelimsCtx to make `UnusedParens` and ↵surechen-43/+174
`UnusedBraces` checking `break`
2024-11-13Use a common subdiagnostic format for generic borrowsdianne-16/+16
This is setup for unifing the logic for suggestions to borrow arguments in generic positions. As of this commit, it's still special cases for `AsRef`/`Borrow`-like traits and `Fn`-like traits.
2024-11-13Provide borrow-instead-of-move suggestions for calls of fn-like items from ↵dianne-0/+130
other crates This also downgrades its applicability to MaybeIncorrect. Its suggestion can result in ill-typed code when the type parameter it suggests providing a different generic argument for appears elsewhere in the callee's signature or predicates.
2024-11-14Mention both release *and* edition breakage for never type lintsMaybe Lapkin-57/+57
2024-11-13Add test casesKirill Podoprigora-0/+124
2024-11-14PassWrapper: disable UseOdrIndicator for Asan Win32Jakob Koschel-0/+29
As described here UseOdrIndicator should be disabled on Windows since link.exe does not support duplicate weak definitions (https://reviews.llvm.org/D137227). Co-Authored-By: Bastian Kersting <bkersting@google.com>
2024-11-13Rollup merge of #133001 - lcnr:test-next-solver, r=compiler-errorsMatthias Krüger-1/+15
actually test next solver uwu r? `@compiler-errors`
2024-11-13Rollup merge of #133000 - GuillaumeGomez:footnote-ids, r=notriddleMatthias Krüger-0/+41
[rustdoc] Fix duplicated footnote IDs Fixes https://github.com/rust-lang/rust/issues/131901. Footnote IDs were increased locally (ie, on the docblock) and not globally (ie, on the whole item page). cc `@aDotInTheVoid` r? `@notriddle`
2024-11-13Rollup merge of #132996 - clubby789:unn-let-space, r=jieyouxuMatthias Krüger-4/+4
Trim extra space when suggesting removing bad `let` Fixes #132969
2024-11-13Rollup merge of #132995 - Eclips4:issue-132348, r=jieyouxuMatthias Krüger-2/+1
compiletest: Add ``exact-llvm-major-version`` directive Now contributors don't need to use `min-llvm-version: X` + `ignore-llvm-version: X+1 - 99`, so they can simply use `exact-llvm-major-version: X` To be honest, I didn't find any usages of that hack other than the one mentioned in the issue. ( `tests/codegen/try_question_mark_nop.rs`) Closes #132348. rustc-dev-guide PR for `//@ exact-llvm-major-version`: https://github.com/rust-lang/rustc-dev-guide/pull/2135 r? jieyouxu
2024-11-13Rollup merge of #132842 - veluca93:abi-checks-tier2, r=workingjubileeMatthias Krüger-20/+51
ABI checks: add support for tier2 arches See #131800 for the data collection behind this change. r? RalfJung
2024-11-13Rollup merge of #132302 - fmease:rustdoc-better-vis-for-macro-decl, r=notriddleMatthias Krüger-20/+10
rustdoc: Treat declarative macros more like other item kinds Apparently at some time in the past we were unable to generate an href for the module path inside the visibility of decl macros 2.0 (`pub(in ...)`). As a result of this, a whole separate function was introduced specifically for printing the visibility of decl macros that didn't attempt to generate any links. The description of PR https://github.com/rust-lang/rust/pull/84074 states: > This fixes the overly-complex invariant mentioned in https://github.com/rust-lang/rust/pull/83237#issuecomment-815346570, where the macro source can't have any links in it only because the cache hasn't been populated yet. I can no longer reproduce the original issue. Reusing the existing visibility rendering logic *seems* to work just fine (I couldn't come up with any counterexamples, though I invite you to prove me wrong). * Fixes #83000 * Fixes the visibility showing up "twice" in rustdoc-JSON output: Once as the `visibility` field, once baked into the source[^1] * Fixes `#[doc(hidden)]` not getting rendered on doc(hidden) decl macros 2.0 under `--document-hiden-items` (for decl macros 1.2 the issue remains; I will address this separately when fixing #132304). --- <details><summary>Outdated Section</summary> NOTE: The current version of this PR is committing a UI crime, I'd like to receive feedback on that. Maybe you have a satisfactory solution for how to remedy it. Namely, as you know we have two different ways of / modes for highlighting code with color: 1. Only highlighting links / item paths and avoiding to highlight tokens by kind like keywords (to reduce visual noise and maybe also artifact size). Used for item declarations(\*). 2. Highlighting tokens by kind. Used for code blocks written by the user. (\*): With the notable exception being macro declarations! Well, since this PR reuses the same function for rendering the item visibility (which only makes sense), we have a clash of modes: We now use both ways of highlighting code for decl macros: №1 for the visibility, №2 for the rest. This awkward. See for yourself: * On master: ![Screenshot 2024-10-29 at 03-37-48 by_example_vis_named in decl_macro a b c - Rust](https://github.com/user-attachments/assets/22f0ab6e-9ba9-4c4e-8fb0-0741c91d360b) * On this branch: ![Screenshot 2024-10-29 at 03-36-41 by_example_vis_named in decl_macro a b c - Rust](https://github.com/user-attachments/assets/b11d81a3-3e2e-43cb-a5b8-6773a3048732) </details> Furthermore, we now no longer syntax-highlight declarative macros (be it `macro_rules!` or `macro`) since that was inconsistent with the way we render all other item kinds. See (collapsed) *Outdated Section* above. See also https://github.com/rust-lang/rust/pull/132302#discussion_r1821310783. | On master | On this branch | |---|---| | ![Screenshot 2024-11-13 at 16-12-46 by_example_vis_named in decl_macro a b c - Rust](https://github.com/user-attachments/assets/cb3aeb42-a56d-4ced-80d9-f2694f369af1) | ![Screenshot 2024-11-13 at 16-13-22 by_example_vis_named in decl_macro a b c - Rust](https://github.com/user-attachments/assets/b73bee50-1b85-4862-afba-5ad471443ccc) | [^1]: E.g., `"visibility":{"restricted":{"parent":1,"path":"::a"}},/*OMITTED*/,"inner":{"macro":"pub(in a) macro by_example_vis_named($foo:expr) {\n ...\n}"}`
2024-11-13rustdoc: use a trie for name-based searchMichael Howell-23/+45
Preview and profiler results ---------------------------- Here's some quick profiling in Firefox done on the rust compiler docs: - Before: https://share.firefox.dev/3UPm3M8 - After: https://share.firefox.dev/40LXvYb Here's the results for the node.js profiler: - https://notriddle.com/rustdoc-html-demo-15/trie-perf/index.html Here's a copy that you can use to try it out. Compare it with [the nightly]. Try typing `typecheckercontext` one character at a time, slowly. - https://notriddle.com/rustdoc-html-demo-15/compiler-doc-trie/index.html [the nightly]: https://doc.rust-lang.org/nightly/nightly-rustc/ The fuzzy match algo is based on [Fast String Correction with Levenshtein-Automata] and the corresponding implementation code in [moman] and [Lucene]; the bit-packing representation comes from Lucene, but the actual matcher is more based on `fsc.py`. As suggested in the paper, a trie is used to represent the FSA dictionary. The same trie is used for prefix matching. Substring matching is done with a side table of three-character[^1] windows that point into the trie. [Fast String Correction with Levenshtein-Automata]: https://github.com/tpn/pdfs/blob/master/Fast%20String%20Correction%20with%20Levenshtein-Automata%20(2002)%20(10.1.1.16.652).pdf [Lucene]: https://fossies.org/linux/lucene/lucene/core/src/java/org/apache/lucene/util/automaton/Lev1TParametricDescription.java [moman]: https://gitlab.com/notriddle/moman-rustdoc User-visible changes -------------------- I don't expect anybody to notice anything, but it does cause two changes: - Substring matches, in the middle of a name, only apply if there's three or more characters in the search query. - Levenshtein distance limit now maxes out at two. In the old version, the limit was w/3, so you could get looser matches for queries with 9 or more characters[^1] in them. [^1]: technically utf-16 code units
2024-11-13actually test next solverlcnr-1/+15
2024-11-13Add regression test for #131901Guillaume Gomez-0/+41
2024-11-13rustdoc: Treat decl macros like other itemsLeón Orell Valerian Liehr-20/+10
2024-11-13Trim extra space when suggesting removing bad `let`clubby789-4/+4
2024-11-13Add ``exact-llvm-major-version`` directiveKirill Podoprigora-2/+1
2024-11-13check_consts: fix error requesting feature gate when that gate is not ↵Ralf Jung-1/+1
actually needed
2024-11-12Rollup merge of #132702 - 1c3t3a:issue-132615, r=rcvalleMatthias Krüger-0/+19
CFI: Append debug location to CFI blocks Currently we're not appending debug locations to the inserted CFI blocks. This shows up in #132615 and #100783. This change fixes that by passing down the debug location to the CFI type-test generation and appending it to the blocks. Credits also belong to `@jakos-sec` who worked with me on this.
2024-11-12Handle infer vars in anon consts on stableBoxy-0/+52