- 09 6月, 2022 10 次提交
-
-
由 Michael Goulet 提交于
Suggest escaping `box` as identifier Fixes #97810.
-
由 Michael Goulet 提交于
Don't suggest adding `let` in certain `if` conditions Avoid being too eager to suggest `let` in an `if` condition with an `=`, namely when the LHS of the `=` isn't even valid as a pattern (to a first degree approximation). This heustic I came up with kinda sucks. Let me know if it needs to be refined.
-
由 Michael Goulet 提交于
Add std::alloc::set_alloc_error_hook example
-
由 Michael Goulet 提交于
Fix indices and remove some unwraps in arg mismatch algorithm This is a more conservative fix than #97542, addressing some indices which were used incorectly and unwraps which are bound to panic (e.g. when the provided and expected arg counts differ). Beta nominating this as it's quite easy to cause ICEs -- I wrote a fuzzer and found hundreds of examples of ICEs. cc `@jackh726` as author of #92364, and `@estebank` as reviewer of that PR. fixes #97484 r? `@jackh726` this should be _much_ easier to review than the other PR
😅 -
由 bors 提交于
Rollup of 5 pull requests Successful merges: - #97507 (Move rustfmt downloads from bootstrap.py to rustbuild) - #97813 (Sync rustc_codegen_gcc) - #97878 (Add regression test for anonymous lifetimes) - #97879 (remove unneeded code) - #97880 (Fix typo: fo->for) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
-
由 Matthias Krüger 提交于
Fix typo: fo->for
-
由 Matthias Krüger 提交于
remove unneeded code The init function isn't longer part of `Condvar`. Consequently, we removed the implementation for the target os `hermit`.
-
由 Matthias Krüger 提交于
Add regression test for anonymous lifetimes Fixes #84634. Seems like this issue was already solved. I added a regression test just in case so we can close it with peace in mind. r? `@notriddle`
-
由 Matthias Krüger 提交于
Sync rustc_codegen_gcc
-
由 Matthias Krüger 提交于
Move rustfmt downloads from bootstrap.py to rustbuild - Allow verifying CI downloads using src/stage0.json - Change download functions not to hard-code `ci-artifacts.rust-lang.org` - Change `format::format` to take a `Builder` so it has access to `download_component`. I think we may want to reconsider the distinction between Build and Builder at some point; I don't think it's particularly useful. - Move rustfmt downloads out of bootstrap.py Fixes https://github.com/rust-lang/rust/issues/95136. Helps with https://github.com/rust-lang/rust/issues/94829. This is based on https://github.com/rust-lang/rust/pull/96687 for simplicity.
-
- 08 6月, 2022 30 次提交
-
-
由 Chayim Refael Friedman 提交于
-
由 Stefan Lankes 提交于
-
由 bors 提交于
Rollup of 5 pull requests Successful merges: - #97276 (Stabilize `const_intrinsic_copy`) - #97763 (Allow ptr_from_addr_cast to fail) - #97846 (Specify DWARF alignment in bits, not bytes.) - #97848 (Impl Traits lowering minor refactors) - #97865 (remove `BorrowckMode`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
-
由 Guillaume Gomez 提交于
-
由 Dylan DPC 提交于
remove `BorrowckMode` dead code after #95565
-
由 Dylan DPC 提交于
Impl Traits lowering minor refactors This are unrelated changes on my RPIT refactor that may be better to merge before opening the main PR. r? `@cjgillot` cc `@nikomatsakis`
-
由 Dylan DPC 提交于
Specify DWARF alignment in bits, not bytes. In DWARF, alignment of types is specified in bits, as is made clear by the parameter name `AlignInBits`. However, `rustc` was incorrectly passing a byte alignment. This commit fixes that. This was noticed in upstream LLVM when I tried to check in a test consisting of LLVM IR generated from `rustc` and it triggered assertions [1]. [1]: https://reviews.llvm.org/D126835
-
由 Dylan DPC 提交于
Allow ptr_from_addr_cast to fail This is needed for https://github.com/rust-lang/miri/issues/2133: I would like to have an option in Miri to error when a int2ptr cast is executed.
-
由 Dylan DPC 提交于
Stabilize `const_intrinsic_copy` FCP has been completed: https://github.com/rust-lang/rust/issues/80697#issuecomment-1059825428 Closes #80697
-
由 Yuki Okushi 提交于
-
由 lcnr 提交于
-
由 bors 提交于
Rollup of 5 pull requests Successful merges: - #97595 (Remove unwrap from get_vtable) - #97597 (Preserve unused pointer to address casts) - #97819 (Recover `import` instead of `use` in item) - #97823 (Recover missing comma after match arm) - #97851 (Use repr(C) when depending on struct layout in ptr tests) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
-
由 Chayim Refael Friedman 提交于
-
由 Dylan DPC 提交于
Use repr(C) when depending on struct layout in ptr tests The test depends on the layout of this struct `Pair`, so it should use `repr(C)` instead of the default `repr(Rust)`.
-
由 Dylan DPC 提交于
Recover missing comma after match arm If we're missing a comma after a match arm expression, try parsing another pattern and a following `=>`. If we find both of those, then recover by suggesting to insert a `,`. Fixes #80112
-
由 Dylan DPC 提交于
Recover `import` instead of `use` in item When we definitely don't have a macro invocation (i.e. when we don't have `import ::`), then it's more productive to parse `import` as if it was incorrectly mistaken for `use`. Not sure if this needs to be a verbose suggestion, but it renders strangely when it's not verbose: ``` error: expected item, found `import` --> /home/michael/test.rs:1:1 | 1 | import std::{io::{self, Write}, rc::Rc}; | ^^^^^^ help: items are imported using the `use` keyword: `use` ``` Happy to change it to `span_suggestion` instead of `span_suggestion_verbose` though. Fixes #97788
-
由 Dylan DPC 提交于
Preserve unused pointer to address casts Fixes #97421. cc `@RalfJung`
-
由 Dylan DPC 提交于
Remove unwrap from get_vtable This avoids ICE on issue #97381 I think the bug is a bit deeper though, it compiles fine when `v` is `&v` which makes me think `Deref` is causing some issue with borrowck but it's fine I guess since this thing crashes since `nightly-2020-09-17`
😅 -
由 Michael Goulet 提交于
-
由 Michael Goulet 提交于
-
由 bors 提交于
Rollup of 5 pull requests Successful merges: - #97829 (Add regresion test for #95307) - #97831 (Remove `AlwaysLiveLocals` wrapper struct) - #97832 (Change `Direction::{is_forward,is_backward}` functions into constants) - #97840 (RustWrapper: adapt to APInt API changes in LLVM 15) - #97845 (Use more targeted suggestion when confusing i8 with std::i8) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
-
由 Nicholas Nethercote 提交于
This avoids the name clash with `rustc_serialize::Encoder` (a trait), and allows lots qualifiers to be removed and imports to be simplified (e.g. fewer `as` imports).
-
由 Ben Kimock 提交于
-
由 Nicholas Nethercote 提交于
This commit makes type folding more like the way chalk does it. Currently, `TypeFoldable` has `fold_with` and `super_fold_with` methods. - `fold_with` is the standard entry point, and defaults to calling `super_fold_with`. - `super_fold_with` does the actual work of traversing a type. - For a few types of interest (`Ty`, `Region`, etc.) `fold_with` instead calls into a `TypeFolder`, which can then call back into `super_fold_with`. With the new approach, `TypeFoldable` has `fold_with` and `TypeSuperFoldable` has `super_fold_with`. - `fold_with` is still the standard entry point, *and* it does the actual work of traversing a type, for all types except types of interest. - `super_fold_with` is only implemented for the types of interest. Benefits of the new model. - I find it easier to understand. The distinction between types of interest and other types is clearer, and `super_fold_with` doesn't exist for most types. - With the current model is easy to get confused and implement a `super_fold_with` method that should be left defaulted. (Some of the precursor commits fixed such cases.) - With the current model it's easy to call `super_fold_with` within `TypeFolder` impls where `fold_with` should be called. The new approach makes this mistake impossible, and this commit fixes a number of such cases. - It's potentially faster, because it avoids the `fold_with` -> `super_fold_with` call in all cases except types of interest. A lot of the time the compile would inline those away, but not necessarily always.
-
由 Nicholas Nethercote 提交于
-
由 Nicholas Nethercote 提交于
We already have `visit_unevaluated`, so this improves consistency. Also, define `TypeFoldable for Unevaluated<'tcx, ()>` in terms of `TypeFoldable for Unevaluated<'tcx>`, which is neater.
-
由 Nicholas Nethercote 提交于
Because `TypeFoldable::try_fold_mir_const` exists, and even though `visit_mir_const` isn't needed right now, the consistency makes the code easier to understand.
-
由 Nicholas Nethercote 提交于
For most types the default impls of these methods are good enough, and `EarlyBinder` is one such type.
-