- 31 8月, 2021 1 次提交
-
-
由 Mara Bos 提交于
-
- 30 8月, 2021 7 次提交
-
-
由 bors 提交于
Update unstable docs for `asm!` macro This adds documentation that SPIR-V is supported, expands on the restrictions for labels, and has some minor cleanups or clarifications. r? `@joshtriplett`
-
由 bors 提交于
Fix: don't document private macros by default As part of #88019, I made it so private macros are documented in `--document-private-items` mode. Unfortunately, it appears that I also accidentally made them be documented when *not* in `--document-private-items` mode. This PR fixes that and adds a regression test. r? `@jyn514` (I hope you don't mind that I keep sending PRs your way) Fixes #88453.
-
由 bors 提交于
rustc_target: `TyAndLayout::field` should never error. This refactor (making `TyAndLayout::field` return `TyAndLayout` without any `Result` around it) is based on a simple observation, regarding `TyAndLayout::field`: If `cx.layout_of(ty)` succeeds (for some `cx` and `ty`), then `.field(cx, i)` on the resulting `TyAndLayout` should *always* succeed in computing `cx.layout_of(field_ty)` (where `field_ty` is the type of the `i`th field of `ty`). The reason for this is that no matter which field is chosen, `cx.layout_of(field_ty)` *will have already been computed*, as part of computing `cx.layout_of(ty)`, as we cannot determine the layout of *any* type without considering the layouts of *all* of its fields. And so it should be fine to turn any errors into ICEs, since they likely indicate a `cx` mismatch, or some other edge case that is due to a compiler bug (as opposed to ever being an user-facing error). <hr/> Each commit should probably be reviewed separately, though note that there's some `where` clauses (in `rustc_target::abi::call::*`) that change in most commits. cc `@nagisa` `@oli-obk`
-
由 Eduard-Mihai Burtescu 提交于
-
由 Eduard-Mihai Burtescu 提交于
-
由 bors 提交于
Handle match statements with non exhaustive variants in closures This PR ensures that the behavior for match statements with non exhaustive variants is the same inside and outside closures. If we have a non-exhaustive SingleVariant which is defined in a different crate, then we should handle the case the same way we would handle a MultiVariant: borrow the match discriminant. Closes https://github.com/rust-lang/project-rfc-2229/issues/59 r? `@nikomatsakis`
-
由 bors 提交于
Cow'ify some pprust methods Reduce number of potential needless de/allocations by using `Cow<'static, str>` instead of explicit `String` type.
-
- 29 8月, 2021 32 次提交
-
-
由 bors 提交于
Rollup of 13 pull requests Successful merges: - #80543 (Notify when an `I-prioritize` issue is closed or reopened) - #83251 (Suggestion for call on immutable binding of mutable type) - #85534 (add rustc-demangle assertion on mangled symbol) - #88173 (Refactor Markdown length-limited summary implementation) - #88349 (Add const and static TAIT tests) - #88357 (add unsized coercion test) - #88381 (Handle stack_t.ss_sp type change for DragonFlyBSD) - #88387 (Remove vestigial rustfix tests.) - #88396 (Bump vulnerable crates) - #88407 (Fix formatting in release notes from 52a98834) - #88411 (Remove `Session.if_let_suggestions`) - #88417 (RELEASES.md: fix broken link) - #88419 (Fix code blocks color in Ayu theme) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
-
由 Guillaume Gomez 提交于
Fix code blocks color in Ayu theme Fixes #88415. cc `@camelid` r? `@notriddle`
-
由 Guillaume Gomez 提交于
RELEASES.md: fix broken link
-
由 Guillaume Gomez 提交于
Remove `Session.if_let_suggestions` We can instead if either the LHS or RHS types contain `TyKind::Error`. In addition to covering the case where we would have previously updated `if_let_suggestions`, this might also prevent redundant errors in other cases as well.
-
由 Guillaume Gomez 提交于
Fix formatting in release notes from 52a98834 I neglected to add a line that allowed the `[cargo/9663]` short-hand to resolve to an actual link in the rendered markdown on github.
-
由 Guillaume Gomez 提交于
Bump vulnerable crates crossbeam-deque v0.7.3 -> v0.7.4: https://rustsec.org/advisories/RUSTSEC-2021-0093 https://github.com/crossbeam-rs/crossbeam/pull/728/files openssl-src v111.15.0+1.1.1k -> v111.16.0+1.1.1l: https://rustsec.org/advisories/RUSTSEC-2021-0097 https://rustsec.org/advisories/RUSTSEC-2021-0098 https://www.openssl.org/news/vulnerabilities-1.1.1.html tar v0.4.35 -> v0.4.37: https://rustsec.org/advisories/RUSTSEC-2021-0080 updated to 0.4.37 as there breaking change in 0.4.36: https://github.com/alexcrichton/tar-rs/pull/260
-
由 Guillaume Gomez 提交于
Remove vestigial rustfix tests. The directory `src/test/rustfix` is not actually tested. It looks like a mistake was made when rustfix tests were originally introduced in #50084. In commit 6f2d0230 they were moved to `src/test/ui`, but the tests in the original directory weren't deleted.
-
由 Guillaume Gomez 提交于
Handle stack_t.ss_sp type change for DragonFlyBSD stack_t.ss_sp is now c_void on DragonFlyBSD, like the rest of the BSDs. Changed in https://github.com/rust-lang/libc/commit/02922ef7504906589d02c2e4d97d1172fa247cc3.
-
由 Guillaume Gomez 提交于
add unsized coercion test we had no tests in our test suite for this case
-
由 Guillaume Gomez 提交于
Add const and static TAIT tests r? ``@oli-obk`` Related to #86727
-
由 Guillaume Gomez 提交于
Refactor Markdown length-limited summary implementation This PR is a new approach to #79749. This PR refactors the implementation of `markdown_summary_with_limit()`, separating the logic of determining when the limit has been reached from the actual rendering process. The main advantage of the new approach is that it guarantees that all HTML tags are closed, whereas the previous implementation could generate tags that were never closed. It also ensures that no empty tags are generated (e.g., `<em></em>`). The new implementation consists of a general-purpose struct `HtmlWithLimit` that manages the length-limiting logic and a function `markdown_summary_with_limit()` that renders Markdown to HTML using the struct. r? `@GuillaumeGomez`
-
由 Guillaume Gomez 提交于
add rustc-demangle assertion on mangled symbol cc https://github.com/rust-lang/rust/issues/60705#issuecomment-844880365 r? `@michaelwoerister`
-
由 Guillaume Gomez 提交于
Suggestion for call on immutable binding of mutable type When calling a method requiring a mutable self borrow on an inmutable to a mutable borrow of the type, suggest making the binding mutable. Fix #83241.
-
由 Guillaume Gomez 提交于
Notify when an `I-prioritize` issue is closed or reopened Companion PR to rust-lang/triagebot#1078, blocked on that PR. r? ``@spastorino`` cc ``@rust-lang/wg-prioritization``
-
由 bors 提交于
ast_lowering: Introduce `lower_span` for catching all spans entering HIR This PR cherry-picks the `fn lower_span` change from https://github.com/rust-lang/rust/pull/84373. I also introduced `fn lower_ident` for lowering spans in identifiers, and audited places where HIR structures with spans or identifiers are constructed and added a few missing `lower_span`s/`lower_ident`s. Having a hook for spans entering HIR can be useful for things other than https://github.com/rust-lang/rust/pull/84373, e.g. https://github.com/rust-lang/rust/issues/35148. I also want to check whether this change causes perf regressions due to some accidental inlining issues. r? `@cjgillot`
-
由 bors 提交于
Treat types in unnormalized function signatures as well-formed Fixes #87748 r? `@nikomatsakis`
-
由 Esteban Kuber 提交于
-
由 Esteban Kuber 提交于
-
由 Esteban Küber 提交于
When calling a method requiring a mutable self borrow on an inmutable to a mutable borrow of the type, suggest making the binding mutable. Fix #83241.
-
由 inquisitivecrystal 提交于
-
由 Vadim Petrochenkov 提交于
-
由 bors 提交于
Update the stdarch submodule This notably brings in a number of codegen updates to ensure that wasm simd intrinsics generate the expected instruction with LLVM 13
-
由 inquisitivecrystal 提交于
-
由 bors 提交于
Make `-Z gcc-ld=lld` work for Apple targets `-Z gcc-ld=lld` was introduced in #85961. It does not work on Macos because lld needs be either named `ld64` or passed `-flavor darwin` as the first two arguments in order to select the Mach-O flavor. Rust invokes cc (=clang) on Macos for linking which calls `ld` as linker binary and not `ld64`, so just creating an `ld64` binary and modifying the search path with `-B` does not work. In order to solve this patch does: * Set the `lld_flavor` for all Apple-derived targets to `LldFlavor::Ld64`. As far as I can see this actually works towards fixing `-Xlinker=rust-lld` as all those targets use the Mach-O object format. * Copy/hardlink rust-lld to the gcc-ld subdirectory as ld64 next to ld. * If `-Z gcc-ld=lld` is used and the target lld flavor is Ld64 add `-fuse-ld=/path/to/ld64` to the linker invocation. Fixes #86945.
-
由 bors 提交于
Forbid inline const block referencing params from being used in patterns Fix #82518
-
由 Roxane 提交于
-
由 bors 提交于
Add Saturating type (based on Wrapping type) Tracking #87920 ### Unresolved Questions <!-- Include any open questions that need to be answered before the feature can be stabilised. --> - [x] ~`impl Div for Saturating<T>` falls back on inner integer division - which seems alright?~ - [x] add `saturating_div`? (to respect division by `-1`) - [x] There is no `::saturating_shl` and `::saturating_shr`. (How to) implement `Shl`, `ShlAssign`, `Shr` and `ShrAssign`? - [naively](3f7d2ce2) - [x] ~`saturating_neg` is only implemented on [signed integer types](https://doc.rust-lang.org/std/?search=saturating_n)~ - [x] Is the implementation copied over from the `Wrapping`-type correct for `Saturating`? - [x] `Saturating::rotate_left` - [x] `Saturating::rotate_right` - [x] `Not` - [x] `BitXorOr` and `BitXorOrAssign` - [x] `BitOr` and `BitOrAssign` - [x] `BitAnd` and `BitAndAssign` - [x] `Saturating::swap_bytes` - [x] `Saturating::reverse_bits`
-
由 Roxane 提交于
-
由 Roxane 提交于
-
由 Roxane 提交于
-
由 bors 提交于
Macros 2.0-ify rustc_arena For the purpose of battle-testing macros 2.0 I'm looking to dogfood it in rustc, one crate at a time. (Note that there are only 12 changed lines if you ignore whitespace.)
-
由 bors 提交于
build llvm libunwind.a in rustbuild This PR move the building of llvm-libunwind from build script of libunwind to rustbuild, so user don't need a C compiler and recompile this C/C++ library when using build-std, and user can use codegen flags `link-self-contained` and cargo flag `build-std-features` to control the behavior of libunwind linking.
-