- 24 8月, 2021 9 次提交
-
-
由 bors 提交于
Get piece unchecked in `write` We already use specialized `zip`, but it seems like we can do a little better by not checking `pieces` length at all. `Arguments` constructors are now unsafe. So the `format_args!` expansion now includes an `unsafe` block. <details> <summary>Local Bench Diff</summary> ```text name before ns/iter after ns/iter diff ns/iter diff % speedup fmt::write_str_macro1 22,967 19,718 -3,249 -14.15% x 1.16 fmt::write_str_macro2 35,527 32,654 -2,873 -8.09% x 1.09 fmt::write_str_macro_debug 571,953 575,973 4,020 0.70% x 0.99 fmt::write_str_ref 9,579 9,459 -120 -1.25% x 1.01 fmt::write_str_value 9,573 9,572 -1 -0.01% x 1.00 fmt::write_u128_max 176 173 -3 -1.70% x 1.02 fmt::write_u128_min 138 134 -4 -2.90% x 1.03 fmt::write_u64_max 139 136 -3 -2.16% x 1.02 fmt::write_u64_min 129 135 6 4.65% x 0.96 fmt::write_vec_macro1 24,401 22,273 -2,128 -8.72% x 1.10 fmt::write_vec_macro2 37,096 35,602 -1,494 -4.03% x 1.04 fmt::write_vec_macro_debug 588,291 589,575 1,284 0.22% x 1.00 fmt::write_vec_ref 9,568 9,732 164 1.71% x 0.98 fmt::write_vec_value 9,516 9,625 109 1.15% x 0.99 ``` </details>
-
由 bors 提交于
Rollup of 6 pull requests Successful merges: - #87976 (Account for tabs when highlighting multiline code suggestions) - #88174 (Clarify some wording in Rust 2021 lint docs) - #88188 (Greatly improve limitation handling on parallel rustdoc GUI test run) - #88230 (Fix typos “a”→“an”) - #88232 (Add notes to macro-not-found diagnostics to point out how things with the same name were not a match.) - #88259 (Do not mark `-Z thir-unsafeck` as unsound anymore) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
-
由 Mara Bos 提交于
Do not mark `-Z thir-unsafeck` as unsound anymore The initial implementation of the THIR unsafety checker is now complete (rust-lang/project-thir-unsafeck#7). r? `@oli-obk`
-
由 Mara Bos 提交于
Add notes to macro-not-found diagnostics to point out how things with the same name were not a match. This adds notes like: ``` error: cannot find derive macro `Serialize` in this scope --> $DIR/issue-88206.rs:22:10 | LL | #[derive(Serialize)] | ^^^^^^^^^ | note: `Serialize` is imported here, but it is not a derive macro --> $DIR/issue-88206.rs:17:11 | LL | use hey::{Serialize, Deserialize}; | ^^^^^^^^^ ``` Fixes https://github.com/rust-lang/rust/issues/88206 Includes https://github.com/rust-lang/rust/pull/88229 r? `@estebank`
-
由 Mara Bos 提交于
Fix typos “a”→“an” Fix typos in comments; found using a regex to find some easy instance of incorrect usage of a vs. an. While automation was used to find these, every change was checked manually. Changes in submodules get separate PRs: * https://github.com/rust-lang/stdarch/pull/1201 * https://github.com/rust-lang/cargo/pull/9821 * https://github.com/rust-lang/miri/pull/1874 * https://github.com/rust-lang/rls/pull/1746 * https://github.com/rust-analyzer/rust-analyzer/pull/9984 _folks @ rust-analyzer are fast at merging…_ * https://github.com/rust-analyzer/rust-analyzer/pull/9985 * https://github.com/rust-analyzer/rust-analyzer/pull/9987 * https://github.com/rust-analyzer/rust-analyzer/pull/9989 _For `clippy`, I don’t know if the changes should better better be moved to a PR to the original repo._ <hr> This has some overlap with #88226, but neither is a strict superset of the other. If you want multiple commits, I can split it up; in that case, make sure to suggest a criterion for splitting.
-
由 Mara Bos 提交于
Greatly improve limitation handling on parallel rustdoc GUI test run Follow-up of https://github.com/rust-lang/rust/pull/88082. r? `@dns2utf8`
-
由 Mara Bos 提交于
Clarify some wording in Rust 2021 lint docs Also added some inline code styling.
-
由 Mara Bos 提交于
Account for tabs when highlighting multiline code suggestions Address `'\t'` case in #87972. Before: ![Screen Shot 2021-08-12 at 8 52 27 AM](https://user-images.githubusercontent.com/1606434/129228214-e5cfd203-9aa8-41c7-acd9-ce255ef8a21e.png) After: ![Screen Shot 2021-08-12 at 8 52 15 AM](https://user-images.githubusercontent.com/1606434/129228236-57c951fc-c8cf-4901-989f-b9b5aa5eebca.png)
-
由 bors 提交于
2229: Handle MutBorrow/UniqueImmBorrow better We only want to use UniqueImmBorrow when the capture place is truncated and we drop Deref of a MutRef. r? `@nikomatsakis` Fixes: https://github.com/rust-lang/project-rfc-2229/issues/56
-
- 23 8月, 2021 31 次提交
-
-
由 Mara Bos 提交于
-
由 Mara Bos 提交于
-
由 Mara Bos 提交于
-
由 Mara Bos 提交于
-
由 Mara Bos 提交于
-
由 Mara Bos 提交于
-
由 Mara Bos 提交于
-
由 Mara Bos 提交于
-
由 Mara Bos 提交于
-
由 Mara Bos 提交于
-
由 Mara Bos 提交于
-
由 bors 提交于
Improve error reporting for closure return type mismatches Fixes #87461.
-
由 Esteban Kuber 提交于
-
由 Léo Lanteri Thauvin 提交于
-
由 Guillaume Gomez 提交于
-
由 Esteban Kuber 提交于
-
由 Esteban Kuber 提交于
-
由 Esteban Kuber 提交于
-
由 Esteban Kuber 提交于
-
由 bors 提交于
⬆ rust-analyzer -
由 bors 提交于
Implement `AsFd` etc. for `UnixListener`. Implement `AsFd`, `From<OwnedFd>`, and `Into<OwnedFd>` for `UnixListener`. This is a follow-up to #87329. r? `@joshtriplett`
-
由 Laurențiu Nicola 提交于
-
由 bors 提交于
Add doctests for HashMap's into_values and into_keys methods Fixes #87591
-
由 bors 提交于
Test TAITs different lifetimes in defining uses fail r? `@oli-obk` Related to #86727
-
由 Dan Gohman 提交于
-
由 bors 提交于
Stop emitting the `dso_local` LLVM attribute for external symbols under the static relocation model on macOS. This matches Clang's behavior: https://github.com/llvm/llvm-project/blob/973cb2c326be9f256da0897c4d2ef117dc22761d/clang/lib/CodeGen/CodeGenModule.cpp#L1038-L1040 Even if `dso_local` were properly supported in this way on macOS, it seems incorrect to add this annotation as liberally as we did. The `dso_local` annotation is for symbols that ultimately end up in the same linkage unit, but we were adding this annotation even for `static` values inside `extern` blocks marked with `#[link(type="framework")]`, which should be considered dynamically linked. Note that Clang likewise avoids emitting `dso_local` for `dllimport` symbols: https://github.com/llvm/llvm-project/blob/973cb2c326be9f256da0897c4d2ef117dc22761d/clang/lib/CodeGen/CodeGenModule.cpp#L1005-L1007 This issue caused breakage in the `ring` crate, which links to a symbol defined in `Security.framework` that ultimately resolves to address `0x0`: https://github.com/briansmith/ring/blob/b94d61e044b42827fefd71d5f61e8c58a7659870/src/rand.rs#L390 For this symbol, the use of `dso_local` causes LLVM to emit a relocation of type `X86_64_RELOC_SIGNED`, which is a 32-bit signed PC-relative offset. If the binary is large enough, `0x0` might be out of range, and the link will fail. Avoiding `dso_local` causes LLVM to use the GOT instead, emitting a relocation of type `X86_64_RELOC_GOT_LOAD`, which will properly handle the large offset and cause the link to succeed. As a side note, the static relocation model is effectively deprecated for security reasons on macOS, as it prohibits PIE. It's also completely unsupported on Apple Silicon, so I don't think it's worth going to the effort of properly supporting this model on that platform.
-
由 bors 提交于
Rollup of 7 pull requests Successful merges: - #86747 (Improve wording of the `drop_bounds` lint) - #87166 (Show discriminant before overflow in diagnostic for duplicate values.) - #88077 (Generate an iOS LLVM target with a specific version) - #88164 (PassWrapper: adapt for LLVM 14 changes) - #88211 (cleanup: `Span::new` -> `Span::with_lo`) - #88229 (Suggest importing the right kind of macro.) - #88238 (Stop tracking namespace in used_imports.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
-
由 Guillaume Gomez 提交于
Stop tracking namespace in used_imports. This changes `used_imports` from a `FxHashSet<(NodeId, Namespace)>` to a `FxHashSet<NodeId>`, as the Namespace information isn't used. The only point that uses it did three lookups, `|=`'ing them together. r? `@estebank`
-
由 Guillaume Gomez 提交于
Suggest importing the right kind of macro. Fixes #88228. r? `@estebank`
-
由 Guillaume Gomez 提交于
cleanup: `Span::new` -> `Span::with_lo` Extracted from https://github.com/rust-lang/rust/pull/84373 as suggested in https://github.com/rust-lang/rust/pull/84373#issuecomment-857773867. It turned out less useful then I expected, but anyway. r? `@cjgillot` `@bors` rollup
-
由 Guillaume Gomez 提交于
PassWrapper: adapt for LLVM 14 changes These API changes appear to have all taken place in https://reviews.llvm.org/D105007, which moved HWAddressSanitizerPass and AddressSanitizerPass to only accept their options type as a ctor argument instead of the sequence of bools etc. This required a couple of parameter additions, which I made match the default prior to the mentioned upstream LLVM change. This patch restores rustc to building (though not quite passing all tests, I've mailed other patches for those issues) against LLVM HEAD.
-