- 02 8月, 2023 5 次提交
-
-
由 Michael Goulet 提交于
-
由 bors 提交于
Move doc comment desugaring out of `TokenCursor`. It's awkward that `TokenCursor` sometimes desugars doc comments on the fly, but usually doesn't. r? `@petrochenkov`
-
由 bors 提交于
cleanup: remove pointee types This can't be merged until the oldest LLVM version we support uses opaque pointers, which will be the case after #114148. (Also note `-Cllvm-args="-opaque-pointers=0"` can technically be used in LLVM 15, though I don't think we should support that configuration.) I initially hoped this would provide some minor perf win, but in https://github.com/rust-lang/rust/pull/105412#issuecomment-1341224450 it had very little impact, so this is only valuable as a cleanup. As a followup, this will enable #96242 to be resolved. r? `@ghost` `@rustbot` label S-blocked
-
由 bors 提交于
aarch64-msvc: remove CI hack for bad Windows SDK version This removes hack which manually replaced windows sdk version, as it looks like useless now, as CI uses newer version: https://github.com/rust-lang-ci/rust/actions/runs/5596259246/jobs/10233070602#step:24:929 `C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt_io.h` (look at version) related https://github.com/rust-lang/rust/issues/88796 It's nice to have some way to assert bad version, but i don't see anything except checking env https://github.com/rust-lang/cc-rs/pull/646
-
由 bors 提交于
Rollup of 7 pull requests Successful merges: - #100455 (Implement RefUnwindSafe for Backtrace) - #113428 (coverage: Replace `ExpressionOperandId` with enum `Operand`) - #114283 (Use parking lot's rwlock even without parallel-rustc) - #114288 (Improve diagnostic for wrong borrow on binary operations) - #114296 (interpret: fix alignment handling for Repeat expressions) - #114306 ([rustc_data_structures][perf] Simplify base_n::push_str.) - #114320 (Cover statements for stable_mir) r? `@ghost` `@rustbot` modify labels: rollup
-
- 01 8月, 2023 35 次提交
-
-
由 Matthias Krüger 提交于
Cover statements for stable_mir Added missing statements to stable_mir, used opaque types for few types that are only used for diagnostic. cc https://github.com/rust-lang/project-stable-mir/issues/16 r? `@oli-obk`
-
由 Matthias Krüger 提交于
[rustc_data_structures][perf] Simplify base_n::push_str. This minor change removes the need to reverse resulting digits. Since reverse is O(|digit_num|) but bounded by 128, it's unlikely to be a noticeable in practice. At the same time, this code is also a 1 line shorter, so combined with tiny perf win, why not? I ran https://gist.github.com/ttsugriy/ed14860ef597ab315d4129d5f8adb191 on M1 macbook air and got a small improvement ``` Running benches/base_n_benchmark.rs (target/release/deps/base_n_benchmark-825fe5895b5c2693) push_str/old time: [14.180 µs 14.313 µs 14.462 µs] Performance has improved. Found 5 outliers among 100 measurements (5.00%) 4 (4.00%) high mild 1 (1.00%) high severe push_str/new time: [13.741 µs 13.839 µs 13.973 µs] Performance has improved. Found 8 outliers among 100 measurements (8.00%) 3 (3.00%) high mild 5 (5.00%) high severe ```
-
由 Matthias Krüger 提交于
interpret: fix alignment handling for Repeat expressions
-
由 Matthias Krüger 提交于
Improve diagnostic for wrong borrow on binary operations This PR improves the diagnostic for wrong borrow on binary operations by suggesting to reborrow on appropriate expressions. ```diff + = note: an implementation for `&Foo * &Foo` exist + help: consider reborrowing both sides + | + LL | let _ = &*ref_mut_foo * &*ref_mut_foo; + | ++ ++ ``` Fixes https://github.com/rust-lang/rust/issues/109352
-
由 Matthias Krüger 提交于
Use parking lot's rwlock even without parallel-rustc Considering that this doesn't affect perf, I think we should use the simplest solution.
-
由 Matthias Krüger 提交于
coverage: Replace `ExpressionOperandId` with enum `Operand` *This is one step in my larger coverage refactoring ambitions described at <https://github.com/rust-lang/compiler-team/issues/645>.* LLVM coverage has a concept of “mapping expressions” that allow a span's execution count to be computed as a simple arithmetic expression over other counters/expressions, instead of requiring a dedicated physical counter for every control-flow branch. These expressions have an operator (`+` or `-`) and two operands. Operands are currently represented as `ExpressionOperandId`, which wraps a `u32` with the following semantics: - 0 represents a special counter that always has a value of zero - Values ascending from 1 represent counter IDs - Values descending from `u32::MAX` represent the IDs of other expressions --- This change replaces that whole `ExpressionOperandId` scheme with a simple enum that explicitly distinguishes between the three cases. This lets us remove a lot of fiddly code for dealing with the different operand kinds: - Previously it was only possible to distinguish between counter-ID operands and expression-ID operands by comparing the operand ID with the total number of counters in a function. This is unnecessary now that the enum distinguishes them explicitly. - There's no need for expression IDs to descend from `u32::MAX` and then get translated into zero-based indices in certain places. Now that they ascend from zero, they can be used as indices directly. - There's no need to reserve ID number 0 for the special zero operand, since it can just have its own variant in the enum, so counter IDs can count up from 0. (Making counter IDs ascend from 0 also lets us fix an off-by-one error in the query for counting the total number of counters, which would cause LLVM to emit an extra unused counter for every instrumented function.) --- This PR may be easiest to review as individual patches, since that breaks it up into clearly distinct parts: - Replace a `u32` wrapper with an explicit enum, without changing the semantics of the underlying IDs being stored. - Change the numbering scheme used by `Operand::Expression` to make expression IDs ascend from 0 (instead of descending from `u32::MAX`). - Change the numbering scheme used by `Operand::Counter` to make counter IDs ascend from 0 (instead of ascending from 1).
-
由 Matthias Krüger 提交于
Implement RefUnwindSafe for Backtrace Backtrace doesn't have visible mutable state. See also https://internals.rust-lang.org/t/should-backtrace-be-refunwindsafe/17169?u=xfix
-
由 ouz-a 提交于
-
由 bors 提交于
Change default panic handler message format. This changes the default panic hook's message format from: ``` thread '{thread}' panicked at '{message}', {location} ``` to ``` thread '{thread}' panicked at {location}: {message} ``` This puts the message on its own line without surrounding quotes, making it easiser to read. For example: Before: ``` thread 'main' panicked at 'env variable `IMPORTANT_PATH` should be set by `wrapper_script.sh`', src/main.rs:4:6 ``` After: ``` thread 'main' panicked at src/main.rs:4:6: env variable `IMPORTANT_PATH` should be set by `wrapper_script.sh` ``` --- See this PR by `@nyurik,` which does that for only multi-line messages (specifically because of `assert_eq`): https://github.com/rust-lang/rust/pull/111071 This is the change that does that for *all* panic messages.
-
由 Yuri Astrakhan 提交于
-
由 ouz-a 提交于
-
由 bors 提交于
Rollup of 7 pull requests Successful merges: - #111081 (impl SliceIndex<str> for (Bound<usize>, Bound<usize>)) - #113394 (style-guide: Document style editions, start 2024 style edition) - #113588 (bootstrap: use git merge-base for LLVM CI download logic) - #113743 (Directly link more target docs) - #114262 (Improve the rust style guide doc) - #114309 (Update books) - #114313 ([rustc_data_structures] Simplify SortedMap::insert.) r? `@ghost` `@rustbot` modify labels: rollup
-
由 Urgau 提交于
-
由 Oli Scherer 提交于
-
由 Matthias Krüger 提交于
[rustc_data_structures] Simplify SortedMap::insert. It looks like current usage of `swap` is aimed at achieving what `std::mem::replace` does but more concisely and idiomatically.
-
由 Matthias Krüger 提交于
Update books ## rust-lang/reference 7 commits in 1ea0178266b3f3f613b0fabdaf16a83961c99cdb..9cd5c5a6ccbd4c07c65ab5c69a53286280308c95 2023-07-29 22:29:51 UTC to 2023-07-16 20:12:46 UTC - Fix merge queue building twice. (rust-lang/reference#1383) - Clarify UB around immutability & mutation (rust-lang/reference#1385) - mention the extra const UB (rust-lang/reference#1273) - Operator expressions: make the note about division by zero clearer. (rust-lang/reference#1384) - Make unsafe keyword docs less confusing (rust-lang/reference#1379) - Say that division by zero for primitive types panics (rust-lang/reference#1382) - Add CI trigger for merge queues. (rust-lang/reference#1381) ## rust-lang/rust-by-example 3 commits in 8a87926a985ce32ca1fad1be4008ee161a0b91eb..07e0df2f006e59d171c6bf3cafa9d61dbeb520d8 2023-07-24 11:37:55 UTC to 2023-07-24 11:35:36 UTC - Added attribute unused_labels - fixed warning. (rust-lang/rust-by-example#1729) - more explanation about panic (rust-lang/rust-by-example#1728) - chore: add the portuguese version of this project to `readme.md` (rust-lang/rust-by-example#1727) ## rust-lang/rustc-dev-guide 26 commits in b5a12d95e32ae53791cc6ab44417774667ed2ac6..24eebb6df96d037aad285e4f7793bd0393a66878 2023-07-30 11:23:23 UTC to 2023-07-11 06:02:34 UTC - fix(name-resolution): remove unnecessary closing paranthesis (rust-lang/rustc-dev-guide#1760) - fix(macro-expansion.md): fix the article `an` to `a` (rust-lang/rustc-dev-guide#1759) - fix(serialization.md): fix the name of a derive macro (rust-lang/rustc-dev-guide#1756) - fix(serialization.md): add a necessary plural suffix (rust-lang/rustc-dev-guide#1757) - fix(salsa.md): add punctuation to prevent confusion (rust-lang/rustc-dev-guide#1754) - fix(salsa.md): remove duplicate "To Be" verb (rust-lang/rustc-dev-guide#1755) - feat(fuzzing.md): make `halfempty` word a link (rust-lang/rustc-dev-guide#1750) - fix(about.md): use `a` instead of `an` (rust-lang/rustc-dev-guide#1751) - refactor(git.md): make git-scm links clickable (rust-lang/rustc-dev-guide#1747) - fix(walkthrough.md) add a comma operator to eliminate ambiguity (rust-lang/rustc-dev-guide#1749) - fix(git.md): remove a confusing end of sentence character (rust-lang/rustc-dev-guide#1748) - refactor(profiling/with_perf): remove a wrong to be verb (rust-lang/rustc-dev-guide#1746) - refactor(tests/headers): remove duplicate list item (rust-lang/rustc-dev-guide#1745) - refactor(test/headers.md): make the meaning more obvious (rust-lang/rustc-dev-guide#1744) - refactor(tests/ui): remove unnecessary duplicate word (rust-lang/rustc-dev-guide#1743) - refactor(compiletest): remove unnecessary duplicate word (rust-lang/rustc-dev-guide#1742) - generic_arguments.md: substs -> GenericArgs (rust-lang/rustc-dev-guide#1741) - fix(suggested): remove an unnecessary and confusing statement (rust-lang/rustc-dev-guide#1739) - fix(how-to-build-and-run): fix a typo ("fromer" -> "former") (rust-lang/rustc-dev-guide#1736) - fix(how-to-build-and-run): remove a wrong paragraph (rust-lang/rustc-dev-guide#1735) - coverage code has moved (rust-lang/rustc-dev-guide#1728) - linked issue is closed (rust-lang/rustc-dev-guide#1729) - remove duplicate reference in about-this-guide.md (rust-lang/rustc-dev-guide#1734) - Explain more in depth what early and late bound generic parameters are (rust-lang/rustc-dev-guide#1732) - add section for normalization with the new solver (rust-lang/rustc-dev-guide#1731) - Improve cleanup-crew.md with an example post (rust-lang/rustc-dev-guide#1730)
-
由 Matthias Krüger 提交于
Improve the rust style guide doc - Make the levels of headings consistent in this whole document. Before this change, the highest level of headings in some file is level 1, but in most of the files the that is level 2. Not consistent. - Fix some headings - Follow the markdown linter advices - Remove redundant empty lines - Surround each heading with empty lines - Use the same symbol for different levels of unordered list entries
-
由 Matthias Krüger 提交于
Directly link more target docs Some platforms were not linked from platform-support.md This fixes that, but errs towards extremely conservative, only directly linking platform docs if the docs actively mention the target, as otherwise I do not necessarily know if there was a reason for the omission.
-
由 Matthias Krüger 提交于
bootstrap: use git merge-base for LLVM CI download logic Fixes https://github.com/rust-lang/rust/issues/101907 I tested this with a local branch that has extra merge commits due to Miri, and it worked fine there. But I am sure there are tons of other situations I did not think of... r? `@jyn514`
-
由 Matthias Krüger 提交于
style-guide: Document style editions, start 2024 style edition Link to a snapshot for the 2015/2018/2021 style edition. This is a draft, because I'd like to wait for a few style guide fixes to merge before snapshotting the 2015/2018/2021 style edition: - https://github.com/rust-lang/rust/pull/113145 - https://github.com/rust-lang/rust/pull/113380 - https://github.com/rust-lang/rust/pull/113384 - https://github.com/rust-lang/rust/pull/113385 - https://github.com/rust-lang/rust/pull/113386 - https://github.com/rust-lang/rust/pull/113392 I'd like to wait for these for two reasons: to make it easier to see the differences between the 2015/2018/2021 style edition and the 2024 style edition (without the noise of guide-wide changes), and to minimize confusion so that bugfixes to the style guide that we include in the previous edition don't look like they're only part of the 2024 style edition. I've used "Miscellaneous `rustfmt` bugfixes" as a starting point for the list of 2024 changes, for now. We can update that when we add more 2024 changes. The section added in this PR can then serve as a baseline for our drafts of 2024 style edition changes. In the meantime, I'd like to get someone from `@rust-lang/style` to review and approve the text here; I'll update it with a commit hash when the above PRs have merged.
-
由 Matthias Krüger 提交于
impl SliceIndex<str> for (Bound<usize>, Bound<usize>) This impl is conspicuously missing.
-
由 bors 提交于
Only consider places with the same local in each_borrow_involving_path. This avoids having a busy loop that repeatedly checks for equality of locals.
-
由 Jubilee Young 提交于
Some platforms were not linked from platform-support.md This fixes that, but errs towards extremely conservative, only directly linking platform docs if the docs actively mention the target, as otherwise I do not necessarily know if there was a reason for the omission.
-
由 Zalathar 提交于
Operand types are now tracked explicitly, so there is no need to reserve ID 0 for the special always-zero counter. As part of the renumbering, this change fixes an off-by-one error in the way counters were counted by the `coverageinfo` query. As a result, functions should now have exactly the number of counters they actually need, instead of always having an extra counter that is never used.
-
由 Zalathar 提交于
Operand types are now tracked explicitly, so there is no need for expression IDs to avoid counter IDs by descending from `u32::MAX`. Instead they can just count up from 0, and can be used directly as indices when necessary.
-
由 Zalathar 提交于
Because the three kinds of operand are now distinguished explicitly, we no longer need fiddly code to disambiguate counter IDs and expression IDs based on the total number of counters/expressions in a function. This does increase the size of operands from 4 bytes to 8 bytes, but that shouldn't be a big deal since they are mostly stored inside boxed structures, and the current coverage code is not particularly size-optimized anyway.
-
由 Zalathar 提交于
The actual motivation here is to prevent `rustfmt` from suddenly reformatting these enum variants onto a single line, when they become slightly shorter in the future. But there's no harm in adding some helpful documentation at the same time.
-
由 bors 提交于
Update Clippy r? `@Manishearth` This is a bit delayed, because I thought it is a difficult conflict resolution and didn't have time for that over the weekend. Turns out, I just used the wrong merge base and it was actually easy... Don't do syncs in the middle of the night (even though I broke this rule with this PR again).
-
由 Josh Triplett 提交于
-
由 Josh Triplett 提交于
Link to a snapshot for the 2015/2018/2021 style edition.
-
由 Taras Tsugrii 提交于
It looks like current usage of `swap` is aimed at achieving what `std::mem::replace` does but more concisely and idiomatically.
-
由 bors 提交于
Rollup of 7 pull requests Successful merges: - #109318 (Make `Debug` representations of `[Lazy, Once]*[Cell, Lock]` consistent with `Mutex` and `RwLock`) - #113701 (Re-export core::ffi::FromBytesUntilNulError in std::ffi) - #113804 (Resolve correct archive version name in `opt-dist`) - #114165 (Add missing rvalues to smir) - #114182 (clean up after 113312) - #114193 (Update lexer emoji diagnostics to Unicode 15.0) - #114200 (Detect trait upcasting through struct tail unsizing in new solver select) r? `@ghost` `@rustbot` modify labels: rollup
-
由 Philipp Krones 提交于
-
由 bors 提交于
Rollup of 8 pull requests Successful merges: - #112858 (Update Android system definitions and add riscv-linux-android as tier 3 target) - #113717 (remove repetitive words) - #113725 (Move MinGW linker dist option to proper section) - #113740 (Update `.gitmodules` to use shallow submodule clones) - #113889 (Fix ice tests when librustc-driver is linked dynamically) - #113906 (etc: add `RUSTC_BOOTSTRAP` to rust-analyzer config) - #113920 (fix(resolve): report unresolved imports firstly) - #114111 (Improve test case for experimental API remove_matches) r? `@ghost` `@rustbot` modify labels: rollup
-
由 rustbot 提交于
-