- 01 7月, 2022 1 次提交
-
-
由 Josh Stone 提交于
-
- 29 6月, 2022 1 次提交
-
-
由 Josh Stone 提交于
-
- 28 6月, 2022 29 次提交
-
-
由 bors 提交于
Rollup of 9 pull requests Successful merges: - #97346 (Remove a back-compat hack on lazy TAIT) - #98261 (Remove `MAX_SUGGESTION_HIGHLIGHT_LINES`) - #98337 ([RFC 2011] Optimize non-consuming operators) - #98384 (Fix RSS reporting on macOS) - #98420 (translation: lint fix + more migration) - #98430 (Refactor iter adapters with less macros) - #98555 (Hermit: Fix initializing lazy locks) - #98595 (Implement `Send` and `Sync` for `ThinBox<T>`) - #98597 (Remove unstable CStr/CString change from 1.62 release note) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
-
由 Dylan DPC 提交于
Remove unstable CStr/CString change from 1.62 release note (Discovered in https://github.com/rust-lang/rust/pull/98571#discussion_r907469604) The change to move CStr/CString to core/alloc is currently behind feature flags as stated in https://github.com/rust-lang/rust/issues/98314
-
由 Dylan DPC 提交于
Implement `Send` and `Sync` for `ThinBox<T>` Just like `Box<T>`, `ThinBox<T>` owns its data on the heap, so it should implement `Send` and `Sync` when `T` does. This extends tracking issue #92791.
-
由 Dylan DPC 提交于
Hermit: Fix initializing lazy locks Closes https://github.com/hermitcore/rusty-hermit/issues/322. The initialization function of hermit's `Condvar` is not called since https://github.com/rust-lang/rust/pull/97647 and was erroneously removed in https://github.com/rust-lang/rust/pull/97879. r? ``@m-ou-se`` CC: ``@stlankes``
-
由 Dylan DPC 提交于
Refactor iter adapters with less macros Just some code cleanup. Introduced a util `and_then_or_clear` for each of chain, flatten and fuse iter adapter impls. This reduces code nicely for flatten, but admittedly the other modules are more of a lateral move replacing macros with a function. But I think consistency across the modules and avoiding macros when possible is good.
-
由 Dylan DPC 提交于
translation: lint fix + more migration - Unfortunately, the diagnostic lints are very broken and trigger much more often than they should. This PR corrects the conditional which checks if the function call being made is to a diagnostic function so that it returns in every intended case. - The `rustc_lint_diagnostics` attribute is used by the diagnostic translation/struct migration lints to identify calls where non-translatable diagnostics or diagnostics outwith impls are being created. Any function used in creating a diagnostic should be annotated with this attribute so this PR adds the attribute to many more functions. - Port the diagnostics from the `rustc_privacy` crate and enable the lints for that crate. r? ``@compiler-errors``
-
由 Dylan DPC 提交于
Fix RSS reporting on macOS > NOTE: This is a duplicate of #98164, which I closed because I borked my rustc fork Currently, `rustc_data_structures::profiling::get_resident_set_size()` always returns `None` on macOS. This is because macOS does not implement procfs used in the unix version of the function: ```rust ... else if #[cfg(unix)] { pub fn get_resident_set_size() -> Option<usize> { let field = 1; let contents = fs::read("/proc/self/statm").ok()?; let contents = String::from_utf8(contents).ok()?; let s = contents.split_whitespace().nth(field)?; let npages = s.parse::<usize>().ok()?; Some(npages * 4096) } ... ``` The proposed solution uses libproc, and more specifically `proc_pidinfo`, which has been available on macOS since 10.5 if the function signature inside libproc.h is to be believed: ```c int proc_pidinfo(int pid, int flavor, uint64_t arg, void *buffer, int buffersize) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0); ```
-
由 Dylan DPC 提交于
[RFC 2011] Optimize non-consuming operators Tracking issue: https://github.com/rust-lang/rust/issues/44838 Fifth step of https://github.com/rust-lang/rust/pull/96496 The most non-invasive approach that will probably have very little to no performance impact. ## Current behaviour Captures are handled "on-the-fly", i.e., they are performed in the same place expressions are located. ```rust // `let a = 1; let b = 2; assert!(a > 1 && b < 100);` if !( { ***try capture `a` and then return `a`*** } > 1 && { ***try capture `b` and then return `b`*** } < 100 ) { panic!( ... ); } ``` As such, some overhead is likely to occur (Specially with very large chains of conditions). ## New behaviour for non-consuming operators When an operator is known to not take `self`, then it is possible to capture variables **AFTER** the condition. ```rust // `let a = 1; let b = 2; assert!(a > 1 && b < 100);` if !( a > 1 && b < 100 ) { { ***try capture `a`*** } { ***try capture `b`*** } panic!( ... ); } ``` So the possible impact on the runtime execution time will be diminished. r? ````@oli-obk````
-
由 Dylan DPC 提交于
Remove `MAX_SUGGESTION_HIGHLIGHT_LINES` After #97798 the `MAX_SUGGESTION_HIGHLIGHT_LINES` constant doesn't really make sense since we always show full suggestions. This PR removes last usages of the constant and the constant itself. r? ``@flip1995`` (this mostly does changes in clippy)
-
由 Dylan DPC 提交于
Remove a back-compat hack on lazy TAIT This PR's motivation is here: https://github.com/rust-lang/rust/issues/72614#issuecomment-1134595446 ~~But removing a hack doesn't seem to reject the code on the issue, there're some more hacks?~~ r? ``@oli-obk``
-
由 bors 提交于
attempt to optimise vectored write benchmarked: old: ``` test io::cursor::tests::bench_write_vec ... bench: 68 ns/iter (+/- 2) test io::cursor::tests::bench_write_vec_vectored ... bench: 913 ns/iter (+/- 31) ``` new: ``` test io::cursor::tests::bench_write_vec ... bench: 64 ns/iter (+/- 0) test io::cursor::tests::bench_write_vec_vectored ... bench: 747 ns/iter (+/- 27) ``` More unsafe than I wanted (and less gains) in the end, but it still does the job
-
由 bors 提交于
Only keep a single query for well-formed checking There are currently 3 queries to perform wf checks on different item-likes. This complexity is not required. This PR replaces the query by: - one query per item; - one query to invoke it for a whole module. This allows to remove HIR `ParItemLikeVisitor`.
-
由 Weiyi Wang 提交于
(Discovered in https://github.com/rust-lang/rust/pull/98571#discussion_r907469604) The change to move CStr/CString to core/alloc is currently behind feature flags as stated in https://github.com/rust-lang/rust/issues/98314
-
由 Josh Stone 提交于
Just like `Box<T>`, `ThinBox<T>` owns its data on the heap, so it should implement `Send` and `Sync` when `T` does.
-
由 bors 提交于
Rollup of 9 pull requests Successful merges: - #98331 (Fix rustdoc argument error) - #98506 (Fix span issues in object safety suggestions) - #98563 (interpret: refactor allocation info query) - #98576 (small regions refactoring) - #98577 (Fix "kind" for associated types in trait implementations in rustdoc JSON) - #98578 (Remove eddyb from miri failure pings) - #98579 (liballoc tests: avoid int2ptr cast) - #98581 (Add triagebot mentions.) - #98587 (libcore tests: avoid int2ptr casts) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
-
由 Matthias Krüger 提交于
libcore tests: avoid int2ptr casts We don't need any of these pointers to actually be dereferenceable so using `ptr::invalid` should be fine. And then we can run Miri with strict provenance enforcement on the tests.
-
由 Matthias Krüger 提交于
Add triagebot mentions. This migrates the configuration of mentions from highfive to triagebot. I also fixed a few broken paths (error_codes.rs src/librustdoc/html/static/themes src/librustdoc/html/static/themes/ayu.css).
-
由 Matthias Krüger 提交于
liballoc tests: avoid int2ptr cast I think we don't need `ptr::from_exposed_addr` here; `ptr::invalid` should be enough for this test. (And this makes Miri less unhappy when running these tests.)
-
由 Matthias Krüger 提交于
Remove eddyb from miri failure pings r? `@EddyB`
-
由 Matthias Krüger 提交于
Fix "kind" for associated types in trait implementations in rustdoc JSON Fixes https://github.com/rust-lang/rust/issues/81340. Contrary to what is suggested in the issue, I really think we should distinguish between associated items and "normal" constants and types. cc `@CraftSpider` `@SimonSapin` r? `@notriddle`
-
由 Matthias Krüger 提交于
small regions refactoring these commits should be fairly self-contained r? rust-lang/types
-
由 Matthias Krüger 提交于
interpret: refactor allocation info query We now have an infallible function that also tells us which kind of allocation we are talking about. Also we do longer have to distinguish between data and function allocations for liveness. This will help us to avoid "catching" `InterpError`s in Miri. r? `@oli-obk`
-
由 Matthias Krüger 提交于
Fix span issues in object safety suggestions Fixes #98500
-
由 Matthias Krüger 提交于
Fix rustdoc argument error Fixes #88756. It's a take over of #88831. I cherry-picked the commits, fixed the merge conflict and the failing test. cc `@inashivb` `@jyn514` r? `@notriddle`
-
由 bors 提交于
catch unwind in parallel mode during wfcheck Update #75760 When performing wfcheck, from the test results, the parallel mode will stop all checks when an `item`'s check failed, (e.g. the first ui test failure raised from [here](https://github.com/rust-lang/rust/blob/master/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs#L249))while the serial mode will output each `item`'s check result via `catch_unwind`. This leads to inconsistencies in the final output of the two mode. In my local environment, this modification prevents the following ui tests from failing when set `parallel-compiler = true` in `config.toml`: ``` [ui] src/test\ui\associated-types\defaults-cyclic-fail-1.rs [ui] src/test\ui\associated-types\defaults-cyclic-fail-2.rs [ui] src/test\ui\associated-types\hr-associated-type-bound-2.rs [ui] src/test\ui\associated-types\impl-wf-cycle-1.rs [ui] src/test\ui\associated-types\impl-wf-cycle-2.rs [ui] src/test\ui\issues\issue-20413.rs [ui] src/test\ui\parallel_test\defaults-cyclic-fail-para.rs ```
-
由 Eric Huss 提交于
-
由 Ralf Jung 提交于
-
由 bors 提交于
Rollup of 5 pull requests Successful merges: - #97389 (Improve memory ordering diagnostics) - #97780 (Check ADT field is well-formed before checking it is sized) - #98530 (compiletest: add issue number param to `known-bug`) - #98556 (Fix builds on Windows (closes #98546)) - #98561 (Fix spelling in SAFETY comment) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
-
- 27 6月, 2022 9 次提交
-
-
由 Ralf Jung 提交于
-
由 Ralf Jung 提交于
-
由 Oli Scherer 提交于
-
由 lcnr 提交于
-
由 Guillaume Gomez 提交于
-
由 Guillaume Gomez 提交于
-
由 lcnr 提交于
-
由 lcnr 提交于
see comment added to the field in `VerifyBoundCx`.
-
由 Yuki Okushi 提交于
-