about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2023-01-18update project to emulate a projection cachelcnr-14/+124
2023-01-18add `eq` to `InferCtxtExt`lcnr-38/+49
2023-01-18remove assembly context and impl a bit morelcnr-163/+317
2023-01-18instantiate canonical vars eagerlylcnr-496/+509
2023-01-18update cachelcnr-112/+91
2023-01-18Auto merge of #107021 - matthiaskrgr:rollup-0dzxfyi, r=matthiaskrgrbors-165/+512
Rollup of 7 pull requests Successful merges: - #106244 (Improve Markdown styling in README) - #106747 (Add 'static lifetime suggestion when GAT implied 'static requirement from HRTB) - #106873 (dont randomly use `_` to print out const generic arguments) - #106992 (Remove unused `#![feature(box_syntax)]` in `alloc`) - #106995 (bump failing assembly & codegen tests from LLVM 14 to LLVM 15) - #106996 (rustdoc: instead of `.setting-name { width: 100% }`, use default div CSS) - #106997 (Add heapsort fallback in `select_nth_unstable`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-01-18Rollup merge of #106997 - Sp00ph:introselect, r=scottmcmMatthias Krüger-0/+22
Add heapsort fallback in `select_nth_unstable` Addresses #102451 and #106933. `slice::select_nth_unstable` uses a quick select implementation based on the same pattern defeating quicksort algorithm that `slice::sort_unstable` uses. `slice::sort_unstable` uses a recursion limit and falls back to heapsort if there were too many bad pivot choices, to ensure O(n log n) worst case running time (known as introsort). However, `slice::select_nth_unstable` does not have such a fallback strategy, which leads to it having a worst case running time of O(n²) instead. #102451 links to a playground which generates pathological inputs that show this quadratic behavior. On my machine, a randomly generated slice of length `1 << 19` takes ~200µs to calculate its median, whereas a pathological input of the same length takes over 2.5s. This PR adds an iteration limit to `select_nth_unstable`, falling back to heapsort, which ensures an O(n log n) worst case running time (introselect). With this change, there was no noticable slowdown for the random input, but the same pathological input now takes only ~1.2ms. In the future it might be worth implementing something like Median of Medians or Fast Deterministic Selection instead, which guarantee O(n) running time for all possible inputs. I've left this as a `FIXME` for now and only implemented the heapsort fallback to minimize the needed code changes. I still think we should clarify in the `select_nth_unstable` docs that the worst case running time isn't currently O(n) (the original reason that #102451 was opened), but I think it's a lot better to be able to guarantee O(n log n) instead of O(n²) for the worst case.
2023-01-18Rollup merge of #106996 - notriddle:notriddle/settings-line-div, ↵Matthias Krüger-5/+28
r=GuillaumeGomez rustdoc: instead of `.setting-name { width: 100% }`, use default div CSS This has no discernible change in appearance.
2023-01-18Rollup merge of #106995 - lukas-code:align_offset_assembly_test, r=cuviperMatthias Krüger-2/+2
bump failing assembly & codegen tests from LLVM 14 to LLVM 15 These tests need LLVM 15. Found by ```@Robert-Cunningham``` in https://github.com/rust-lang/rust/pull/100601#issuecomment-1385400008 Passed tests at 006506e93fc80318ebfd7939fe1fd4dc19ecd8cb in https://github.com/rust-lang/rust/actions/runs/3942442730/jobs/6746104740.
2023-01-18Rollup merge of #106992 - joboet:alloc_remove_box_syntax, r=thomccMatthias Krüger-1/+0
Remove unused `#![feature(box_syntax)]` in `alloc`
2023-01-18Rollup merge of #106873 - BoxyUwU:ty_const_formatting, r=compiler-errorsMatthias Krüger-80/+112
dont randomly use `_` to print out const generic arguments const generics seem to get printed out as `_` for no reason a lot of the time, as someone who spends a lot of time with const generics this has gotten :sparkles: very annoying :sparkles:. Latest example would be #106423 where the ICE messaged formatted a `ty::Const` containing no infer vars, as `_`. For some reason printing of the const argument on arrays was custom instead of using the existing logic for printing `ty::Const`. Additionally the existing logic for printing `ty::Const` would print out `_` for anon consts that are in a separate crate leading to weird diagnostics (see second commit). There ought to be less cases of consts randomly getting printed as `_` hiding valuable info now.
2023-01-18Rollup merge of #106747 - yanchen4791:issue-105507-fix, r=estebankMatthias Krüger-4/+258
Add 'static lifetime suggestion when GAT implied 'static requirement from HRTB Fix for issue #105507 The problem: When generic associated types (GATs) are from higher-ranked trait bounds (HRTB), they are implied 'static requirement (see [Implied 'static requirement from higher-ranked trait bounds](https://blog.rust-lang.org/2022/10/28/gats-stabilization.html#implied-static-requirement-from-higher-ranked-trait-bounds) for more details). If the user did not explicitly specify the `'static` lifetime when using the GAT, the current error message will only point out the type `does not live long enough` where the type is used, but not where the GAT is specified and how to fix the problem. The solution: Add notes at the span where the problematic GATs are specified and suggestions of how to fix the problem by adding `'static` lifetime at the right spans.
2023-01-18Rollup merge of #106244 - atouchet:readme3, r=workingjubileeMatthias Krüger-73/+90
Improve Markdown styling in README Update Readme to use consistent line lengths. Also update some formatting and links. (Followup to https://github.com/rust-lang/rust/pull/105553). r? ``@workingjubilee``
2023-01-18i am freeBoxy-15/+18
2023-01-18actually print out non local anon constsBoxy-5/+5
2023-01-18test for non local anon const printingBoxy-0/+36
2023-01-18defer array len printing to const arg printingBoxy-66/+59
2023-01-18Auto merge of #106952 - petrochenkov:docglob, r=notriddle,GuillaumeGomezbors-4/+28
rustdoc: Fix glob import inlining Filter away names that are not actually imported by the glob, e.g. because they are shadowed by something else. Fixes the issue found in https://github.com/rust-lang/rust/pull/94857#issuecomment-1382912356.
2023-01-17rustdoc: stop using deprecated `window.event` when there's an `ev` paramMichael Howell-1/+1
2023-01-18Auto merge of #107010 - weihanglo:update-cargo, r=weihanglobors-10/+10
Update cargo 9 commits in 1cd6d3803dfb0b342272862a8590f5dfc9f72573..a5d47a72595dd6fbe7d4e4f6ec20dc5fe724edd1 2023-01-12 18:40:36 +0000 to 2023-01-16 18:51:50 +0000 - Add network container tests (rust-lang/cargo#11583) - Show progress of crates.io index update even `net.git-fetch-with-cli` option enabled (rust-lang/cargo#11579) - `cargo metadata` supports artifact dependencies (rust-lang/cargo#11550) - fix(docs): add required "inherits" option to example profile (rust-lang/cargo#11504) - add documentation that SSH markers aren't supported (rust-lang/cargo#11586) - Fix typo (rust-lang/cargo#11585) - Enable source_config_env test on Windows (rust-lang/cargo#11582) - Support `codegen-backend` and `rustflags` in profiles in config file (rust-lang/cargo#11562) - ci: reflect to clap updates (rust-lang/cargo#11578) r? `@ghost`
2023-01-17rustdoc: remove function `handleClick` that's only used onceMichael Howell-8/+3
2023-01-18special case removing `&` suggestionEzra Shaw-12/+45
2023-01-17Update cargoWeihang Lo-10/+10
9 commits in 1cd6d3803dfb0b342272862a8590f5dfc9f72573..a5d47a72595dd6fbe7d4e4f6ec20dc5fe724edd1 2023-01-12 18:40:36 +0000 to 2023-01-16 18:51:50 +0000 - Add network container tests (rust-lang/cargo#11583) - Show progress of crates.io index update even `net.git-fetch-with-cli` option enabled (rust-lang/cargo#11579) - `cargo metadata` supports artifact dependencies (rust-lang/cargo#11550) - fix(docs): add required "inherits" option to example profile (rust-lang/cargo#11504) - add documentation that SSH markers aren't supported (rust-lang/cargo#11586) - Fix typo (rust-lang/cargo#11585) - Enable source_config_env test on Windows (rust-lang/cargo#11582) - Support `codegen-backend` and `rustflags` in profiles in config file (rust-lang/cargo#11562) - ci: reflect to clap updates (rust-lang/cargo#11578)
2023-01-17add miri regression testThe 8472-0/+6
2023-01-17Don't do pointer arithmetic on pointers to deallocated memoryThe 8472-3/+9
vec::Splice can invalidate the slice::Iter inside vec::Drain. So we replace them with dangling pointers which, unlike ones to deallocated memory, are allowed.
2023-01-17Auto merge of #106998 - matthiaskrgr:rollup-hmfisji, r=matthiaskrgrbors-366/+412
Rollup of 7 pull requests Successful merges: - #104505 (Remove double spaces after dots in comments) - #106784 (prevent E0512 from emitting [type error] by checking the references_error) - #106834 (new trait solver: only consider goal changed if response is not identity) - #106889 (Mention the lack of `windows_mut` in `windows`) - #106963 (Use `scope_expr_id` from `ProbeCtxt`) - #106970 (Switch to `EarlyBinder` for `item_bounds` query) - #106980 (Hide `_use_mk_alias_ty_instead` in `<AliasTy as Debug>::fmt`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-01-17Add 'static lifetime suggestion when GAT implied 'static requirement from HRTByanchen4791-4/+258
2023-01-17Rollup merge of #106980 - Nilstrieb:_use_mk_manual_debug_impl_instead, r=lcnrMatthias Krüger-3/+12
Hide `_use_mk_alias_ty_instead` in `<AliasTy as Debug>::fmt`
2023-01-17Rollup merge of #106970 - kylematsuda:earlybinder-item-bounds, r=lcnrMatthias Krüger-20/+16
Switch to `EarlyBinder` for `item_bounds` query Part of the work to finish #105779 (also see https://github.com/rust-lang/types-team/issues/78). Several queries `X` have a `bound_X` variant that wraps the output in `EarlyBinder`. This adds `EarlyBinder` to the return type of the `item_bounds` query and removes `bound_item_bounds`. r? `@lcnr`
2023-01-17Rollup merge of #106963 - compiler-errors:scope-expr-dupe, r=michaelwoeristerMatthias Krüger-3/+3
Use `scope_expr_id` from `ProbeCtxt` We already store it in the `ProbeCtxt`, so just retrieve it from there.
2023-01-17Rollup merge of #106889 - scottmcm:windows-mut, r=cuviperMatthias Krüger-0/+16
Mention the lack of `windows_mut` in `windows` This is a common request, going back to at least 2015 (#23783), so mention in the docs that it can't be done and offer a workaround using <https://doc.rust-lang.org/std/cell/struct.Cell.html#method.as_slice_of_cells>. (See also URLO threads like <https://internals.rust-lang.org/t/a-windows-mut-method-on-slice/16941/10?u=scottmcm>.)
2023-01-17Rollup merge of #106834 - compiler-errors:new-solver-did-changed, r=lcnrMatthias Krüger-1/+17
new trait solver: only consider goal changed if response is not identity I think this is the right way of implementing it.. r? `@lcnr`
2023-01-17Rollup merge of #106784 - lyming2007:issue-106695-fix, r=WaffleLapkinMatthias Krüger-26/+15
prevent E0512 from emitting [type error] by checking the references_error but still emit E0512 this will fix #106695
2023-01-17Rollup merge of #104505 - WaffleLapkin:no-double-spaces-in-comments, r=jackh726Matthias Krüger-313/+333
Remove double spaces after dots in comments Most of the comments do not have double spaces, so I assume these are typos.
2023-01-17rustdoc: add test cases for settings radio button layoutMichael Howell-0/+27
2023-01-17bump failing assembly & codegen tests from LLVM 14 to LLVM 15Lukas Markeffsky-2/+2
2023-01-17rustdoc: instead of `.setting-name { width: 100% }`, use default div CSSMichael Howell-5/+1
2023-01-17Add heapsort fallback in `select_nth_unstable`Markus Everling-0/+22
2023-01-17refactor[alloc]: remove unused box syntax featurejoboet-1/+0
2023-01-17new trait solver: only consider goal changed if response is not identityMichael Goulet-1/+17
2023-01-17Auto merge of #106294 - Nilstrieb:noundef-everything, r=nikicbors-109/+130
Put `noundef` on all scalars that don't allow uninit Previously, it was only put on scalars with range validity invariants like bool, was uninit was obviously invalid for those. Since then, we have normatively declared all uninit primitives to be undefined behavior and can therefore put `noundef` on them. The remaining concern was the `mem::uninitialized` function, which cause quite a lot of UB in the older parts of the ecosystem. After #99182, this function now doesn't return uninit values anymore, making users of it safe from this change. The only real sources of UB where people could encounter uninit primitives are `MaybeUninit::uninit().assume_init()`, which has always be clear in the docs about being UB and from heap allocations (like reading from the spare capacity of a vec). This is hopefully rare enough to not break anything. cc `@nagisa` `@scottmcm` `@nikic`
2023-01-17delay E0512 as a bug by checking the references_errorYiming Lei-26/+15
fix #106695
2023-01-17fix missing subst in clippy utilsKyle Matsuda-2/+2
2023-01-17change item_bounds query to return EarlyBinder; remove bound_item_bounds queryKyle Matsuda-19/+15
2023-01-17change usages of item_bounds query to bound_item_boundsKyle Matsuda-1/+1
2023-01-17Add more codegen testsNilstrieb-139/+166
2023-01-17Auto merge of #106984 - Dylan-DPC:rollup-xce8263, r=Dylan-DPCbors-106/+310
Rollup of 5 pull requests Successful merges: - #101698 (Constify `TypeId` ordering impls) - #106148 (Fix unused_parens issue for higher ranked function pointers) - #106922 (Avoid unsafe code in `to_ascii_[lower/upper]case()`) - #106951 (Remove ineffective run of SimplifyConstCondition) - #106962 (Fix use suggestion span) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-01-17Rollup merge of #106962 - compiler-errors:use-sugg-span, r=oli-obkDylan DPC-46/+48
Fix use suggestion span Fixes #106954
2023-01-17Rollup merge of #106951 - tmiasko:rm-simplify-initial, r=oli-obkDylan DPC-1/+0
Remove ineffective run of SimplifyConstCondition There are no constant conditions at this stage.
2023-01-17Rollup merge of #106922 - ChayimFriedman2:patch-5, r=workingjubileeDylan DPC-8/+6
Avoid unsafe code in `to_ascii_[lower/upper]case()`