-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rollup of 8 pull requests #107052
Rollup of 8 pull requests #107052
Commits on Jan 12, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 0be510e - Browse repository at this point
Copy the full SHA 0be510eView commit details
Commits on Jan 14, 2023
-
rustdoc: simplify JS search routine by not messing with lev distance
Since the sorting function accounts for an `index` field, there's not much reason to also be applying changes to the levenshtein distance. Instead, we can just not treat `lev` as a filter if there's already a non-sentinel value for `index`. This change gives slightly more weight to the index and path part, as search criteria, than it used to. This changes some of the test cases, but not in any obviously-"worse" way, and, in particular, substring matches are a bigger deal than levenshtein distances (we're assuming that a typo is less likely than someone just not typing the entire name). Based on rust-lang#103710 (comment)
Configuration menu - View commit details
-
Copy full SHA for 59ba74c - Browse repository at this point
Copy the full SHA 59ba74cView commit details -
Configuration menu - View commit details
-
Copy full SHA for db558b4 - Browse repository at this point
Copy the full SHA db558b4View commit details
Commits on Jan 16, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 3a4fdcf - Browse repository at this point
Copy the full SHA 3a4fdcfView commit details
Commits on Jan 18, 2023
-
Stop using
BREAK
&CONTINUE
in compilerSwitching them to `Break(())` and `Continue(())` instead. libs-api would like to remove these constants, so stop using them in compiler to make the removal PR later smaller.
Configuration menu - View commit details
-
Copy full SHA for 925dc37 - Browse repository at this point
Copy the full SHA 925dc37View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5a685a1 - Browse repository at this point
Copy the full SHA 5a685a1View commit details -
Configuration menu - View commit details
-
Copy full SHA for b84b1da - Browse repository at this point
Copy the full SHA b84b1daView commit details -
Configuration menu - View commit details
-
Copy full SHA for f99b273 - Browse repository at this point
Copy the full SHA f99b273View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3d87a8e - Browse repository at this point
Copy the full SHA 3d87a8eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 45aa5c0 - Browse repository at this point
Copy the full SHA 45aa5c0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 685c32f - Browse repository at this point
Copy the full SHA 685c32fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 34127c5 - Browse repository at this point
Copy the full SHA 34127c5View commit details -
Configuration menu - View commit details
-
Copy full SHA for f672436 - Browse repository at this point
Copy the full SHA f672436View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7d57685 - Browse repository at this point
Copy the full SHA 7d57685View commit details -
rustdoc: put focus on the help link when opening it from keyboard
This prevents some strange blur-event-related bugs with the "?" command by ensuring that the focus remains in the same spot when the settings area closes.
Configuration menu - View commit details
-
Copy full SHA for deb0575 - Browse repository at this point
Copy the full SHA deb0575View commit details -
rustdoc: fix "?" keyboard command when radio button is focused
This extends the special case with checkbox settings to also cover radios.
Configuration menu - View commit details
-
Copy full SHA for bb5fb53 - Browse repository at this point
Copy the full SHA bb5fb53View commit details -
rustdoc: remove redundant rule
#settings .setting-line
Since the current version of settings.js always nests things below a div with ID `settings`, this rule always overrode the one above.
Configuration menu - View commit details
-
Copy full SHA for 9ee4df0 - Browse repository at this point
Copy the full SHA 9ee4df0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 34d595d - Browse repository at this point
Copy the full SHA 34d595dView commit details -
Rollup merge of rust-lang#105796 - notriddle:notriddle/rustdoc-search…
…-stop-doing-demerits, r=GuillaumeGomez rustdoc: simplify JS search routine by not messing with lev distance Since the sorting function accounts for an `index` field, there's not much reason to also be applying changes to the levenshtein distance. Instead, we can just not treat `lev` as a filter if there's already a non-sentinel value for `index`. <details> This change gives slightly more weight to the index and path part, as search criteria, than it used to. This changes some of the test cases, but not in any obviously-"worse" way, and, in particular, substring matches are a bigger deal than levenshtein distances (we're assuming that a typo is less likely than someone just not typing the entire name). The biggest change is the addition of a `path_lev` field to result items. It's always zero if the search query has no parent path part and for type queries, making the check in the `sortResults` function a no-op. When it's present, it is used to implement different precedence for the parent path and the tail. Consider the query `hashset::insert`, a test case [that already exists and can be found here](https://github.com/rust-lang/rust/blob/5c6a1681a9a7b815febdd9de2f840da338984e68/src/test/rustdoc-js-std/path-ordering.js). We want the ordering shown in the test case: ``` { 'path': 'std::collections::hash_set::HashSet', 'name': 'insert' }, { 'path': 'std::collections::hash_set::HashSet', 'name': 'get_or_insert' }, { 'path': 'std::collections::hash_set::HashSet', 'name': 'get_or_insert_with' }, { 'path': 'std::collections::hash_set::HashSet', 'name': 'get_or_insert_owned' }, { 'path': 'std::collections::hash_map::HashMap', 'name': 'insert' }, ``` We do not want this ordering, which is the ordering that would occur if substring position took priority over `path_lev`: ``` { 'path': 'std::collections::hash_set::HashSet', 'name': 'insert' }, { 'path': 'std::collections::hash_map::HashMap', 'name': 'insert' }, // BAD { 'path': 'std::collections::hash_set::HashSet', 'name': 'get_or_insert' }, { 'path': 'std::collections::hash_set::HashSet', 'name': 'get_or_insert_with' }, { 'path': 'std::collections::hash_set::HashSet', 'name': 'get_or_insert_owned' }, ``` We also do not want `HashSet::iter` to appear before `HashMap::insert`, which is what would happen if `path_lev` took priority over the appearance of any substring match. This is why the `sortResults` function has `path_lev` sandwiched between a `index < 0` check and a `index` comparison check: ``` { 'path': 'std::collections::hash_set::HashSet', 'name': 'insert' }, { 'path': 'std::collections::hash_set::HashSet', 'name': 'get_or_insert' }, { 'path': 'std::collections::hash_set::HashSet', 'name': 'get_or_insert_with' }, { 'path': 'std::collections::hash_set::HashSet', 'name': 'get_or_insert_owned' }, { 'path': 'std::collections::hash_set::HashSet', 'name': 'iter' }, // BAD { 'path': 'std::collections::hash_map::HashMap', 'name': 'insert' }, ``` The old code implemented a similar feature by manipulating the `lev` member based on whether a substring match was found and averaging in the path distance (`item.lev = name_lev + path_lev / 10`), so the path lev wound up acting like a tie breaker, but it gives slightly different results for `Vec::new`, [changing the test case](https://github.com/rust-lang/rust/pull/105796/files#diff-b346e2ef72a407915f438063c8c2c04f7a621df98923d441b41c0312211a5b21) because of the slight changes to ordering priority. </details> Based on rust-lang#103710 (comment) Previews: * https://notriddle.com/notriddle-rustdoc-demos/rustdoc-search-stop-doing-demerits/std/index.html * https://notriddle.com/notriddle-rustdoc-demos/rustdoc-search-stop-doing-demerits-compiler/index.html
Configuration menu - View commit details
-
Copy full SHA for f7066f7 - Browse repository at this point
Copy the full SHA f7066f7View commit details -
Rollup merge of rust-lang#106753 - compiler-errors:rpitit-not-suggest…
…able, r=spastorino Make sure that RPITITs are not considered suggestable Makes no sense to suggest `where impl Future<Output = ()>: Send`, for example.
Configuration menu - View commit details
-
Copy full SHA for 685c773 - Browse repository at this point
Copy the full SHA 685c773View commit details -
Rollup merge of rust-lang#106917 - compiler-errors:const-closure-fore…
…ign, r=tmiasko Encode const mir for closures if they're const Fixes rust-lang#106913
Configuration menu - View commit details
-
Copy full SHA for a637e2a - Browse repository at this point
Copy the full SHA a637e2aView commit details -
Rollup merge of rust-lang#107004 - compiler-errors:new-solver-new-can…
…didates-2, r=lcnr Implement some candidates for the new solver (redux) Based on rust-lang#106718, so the diff is hard to read without it. See [here](rust-lang/rust@98700cf...compiler-errors:rust:new-solver-new-candidates-2) for an easier view until that one lands. Of note: * 44af916020fb43c12070125c45b6dee4ec303bbc fixes a bug where we need to make the query response *inside* of a probe, or else we make no inference progress (I think) * 50daad5acd2f163d03e7ffab942534f09bc36e2e implements `consider_assumption` for traits and predicates. I'm not sure if using `sup` here is necessary or if `eq` is fine. * We decided that all of the `instantiate_constituent_tys_for_*` functions are verbose but ok, since they need to be exhaustive and the logic between each of them is not similar enough, right? r? ``@lcnr``
Configuration menu - View commit details
-
Copy full SHA for cf5068b - Browse repository at this point
Copy the full SHA cf5068bView commit details -
Rollup merge of rust-lang#107023 - scottmcm:stop-shouting, r=Nilstrieb
Stop using `BREAK` & `CONTINUE` in compiler Switching them to `Break(())` and `Continue(())` instead. Entirely search-and-replace, though there's one spot where rustfmt insisted on a reformatting too. libs-api would like to remove these constants (rust-lang#102697 (comment)), so stop using them in compiler to make the removal PR later smaller.
Configuration menu - View commit details
-
Copy full SHA for 2eef516 - Browse repository at this point
Copy the full SHA 2eef516View commit details -
Rollup merge of rust-lang#107030 - albertlarsan68:patch-3, r=lcnr
Correct typo rust-lang#106718 (comment)
Configuration menu - View commit details
-
Copy full SHA for 5d562be - Browse repository at this point
Copy the full SHA 5d562beView commit details -
Rollup merge of rust-lang#107042 - notriddle:notriddle/rustdoc-js-que…
…stion, r=GuillaumeGomez rustdoc: fix corner cases with "?" JS keyboard command
Configuration menu - View commit details
-
Copy full SHA for 6595127 - Browse repository at this point
Copy the full SHA 6595127View commit details -
Rollup merge of rust-lang#107045 - notriddle:notriddle/settings-css-s…
…etting-line, r=GuillaumeGomez rustdoc: remove redundant CSS rule `#settings .setting-line` Since the current version of settings.js always nests things below a div with ID `settings`, this rule always overrode the one above.
Configuration menu - View commit details
-
Copy full SHA for e12c6b2 - Browse repository at this point
Copy the full SHA e12c6b2View commit details