Rollup of 11 pull requests#153330
Closed
JonathanBrouwer wants to merge 27 commits intorust-lang:mainfrom
Closed
Conversation
on s390x 128bit types have a smaller alignment then on x86[^1]. This leads to the tests falling due to different errors emitted. As this affects the same infrastructure as rust-lang#149056 lets also for now disable the tests on s390x. [^1]: s390x ELF ABI Table 1.1, Page 12 https://github.com/IBM/s390x-abi
The behavior in the test case matches rustc's:
test-dingus % ls
main.rs
test-dingus % mkdir foobar
test-dingus % rustc --emit=dep-info main.rs --out-dir=foobar
test-dingus % ls
foobar main.rs
test-dingus % ls foobar
main.d
test-dingus % rustc --emit=dep-info=testfile.d main.rs --out-dir=foobar
test-dingus % ls
foobar main.rs testfile.d
test-dingus % ls foobar
main.d
This refactor will make an upcoming change smaller, and also adds exhaustive matching.
This adds a variant `NoneWithError` to AST and HIR representations of the “rest” or “tail”, which is currently always treated identically to the `None` variant.
This prevents spurious errors when a field is intended to be present
but a preceding syntax error caused it not to be parsed. For example,
StructName { foo: 1 bar: 2 }
will not successfully parse a field `bar`, and we will report the syntax
error but not the missing field.
The HermitCore name was dropped a while ago, the project is now simply called "Hermit".
The HermitCore name was dropped a while ago, the project is now simply called "Hermit".
* Adjust macro description * Copy Cargo's release notes for more details * Apply suggestions from code review Co-authored-by: 许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com> Co-authored-by: alexey semenyuk <alexsemenyuk88@gmail.com> Co-authored-by: León Orell Valerian Liehr <me@fmease.dev>
…tersperse_with regarding fused/non-fused iterators
prefer actual ABI-controling fields over target.abi when making ABI decisions We don't actually check that `abi` is consistent with the fields that control the ABI, e.g. one could set `llvm_abiname` to "ilp32e" on a riscv target without setting a matching `abi`. So, if we need to make actual decisions, better to use the source of truth we forward to LLVM than the informational string we forward to the user. This is a breaking change for aarch64 JSON target specs: setting `abi` to "softfloat" is no longer enough; one has to also set `rustc_abi` to "softfloat". That is consistent with riscv and arm32, but it's still surprising. Cc @Darksonn in case this affects the Linux kernel. Also see rust-lang#153035 which does something similar for PowerPC, and [Zulip](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/De-spaghettifying.20ABI.20controls/with/575095372). Happy to delay this PR if someone has a better idea. Cc @folkertdev @workingjubilee
…ebank Don’t report missing fields in struct exprs with syntax errors. @Noratrieb [told me](https://internals.rust-lang.org/t/custom-cargo-command-to-show-only-errors-avoid-setting-rustflags-every-time/24032/7?u=kpreid) that “it is a bug if this recovery causes follow-up errors that would not be there if the user fixed the first error.” So, here’s a contribution to hide a follow-up error that annoyed me recently. Specifically, if the user writes a struct literal with a syntax error, such as ```rust StructName { foo: 1 bar: 2 } ``` the compiler will no longer report that the field `bar` is missing in addition to the syntax error. This is my first time attempting any change to the parser or AST; please let me know if there is a better way to do what I’ve done here. ~~The part I’m least happy with is the blast radius of adding another field to `hir::ExprKind::Struct`, but this seems to be in line with the style of the rest of the code. (If this were my own code, I would consider changing `hir::ExprKind::Struct` to a nested struct, the same way it is in `ast::ExprKind`.)~~ The additional information is now stored as an additional variant of `ast::StructRest` / `hir::StructTailExpr`. **Note to reviewers:** I recommend reviewing each commit separately, and in the case of the first one with indentation changes ignored.
…hpratt Clarified doc comments + added tests confirming current behavior for intersperse/intersperse_with This PR builds on top of rust-lang#152855. I just added clarifying comments to `intersperse`/`intersperse_with` about its guarantees for fused iterators (and how behavior for non-fused iterators are subject to change). I also added in tests for non-fused iterators demonstrating its current behavior; fused iterators are already tested for in existing tests for `intersperse`/`intersperse_with`.
… r=Kivooeo Migrate 11 tests from tests/ui/issues to specific directories Moved 11 regression tests from `tests/ui/issues` to their relevant subdirectories (`imports`, `pattern`, `lint`, and `typeck`). * Added standard issue tracking comments at the top of each file. * Relocated associated `aux-build` files. * Ran `./x.py test --bless` successfully.
rustdoc: make `--emit` and `--out-dir` mimic rustc
The behavior in the test case matches rustc's:
test-dingus % ls
main.rs
test-dingus % mkdir foobar
test-dingus % rustc --emit=dep-info main.rs --out-dir=foobar
test-dingus % ls
foobar main.rs
test-dingus % ls foobar
main.d
test-dingus % rustc --emit=dep-info=testfile.d main.rs --out-dir=foobar
test-dingus % ls
foobar main.rs testfile.d
test-dingus % ls foobar
main.d
CC rust-lang#146220 (comment)
…ostic, r=Kivooeo Remove unhelpful hint from trivial bound errors The `= help: see issue rust-lang#48214` hint on trivial bound errors isn't useful, most users hitting these errors aren't trying to use the `trivial_bounds` feature. The `disabled_nightly_features` call already handles suggesting the feature gate on nightly. Closes rust-lang#152872
…s_final, r=fmease disable the ptr_fragment_in_final test on s390x on s390x 128bit types have a smaller alignment then on x86[^1]. This leads to the tests falling due to different errors emitted. As this affects the same infrastructure as rust-lang#149056 [^2] lets also for now disable the tests on s390x. [^1]: s390x ELF ABI Table 1.1, Page 12 https://github.com/IBM/s390x-abi [^2]: rust-lang#149056 (comment)
Add release notes for 1.94.0 Replaces rust-lang#151650. r? cuviper
…aDotInTheVoid feat: Provide an '.item_kind()' method on ItemEnum A little helper method which I found myself adding over and over again in all the projects I maintain which depend on `rustdoc-json-types`. r? @aDotInTheVoid
Update the name of the Hermit operating system The HermitCore name was dropped a while ago, the project is now simply called "Hermit". See for example [the website](https://hermit-os.org/). cc @stlankes @mkroening
…eanup, r=jieyouxu Cleanup of c-variadic link test Some changes pulled out of rust-lang#152980 that are just cosmetic, but will help make the code run on embedded targets. r? jieyouxu
Contributor
Author
|
@bors r+ rollup=never p=5 |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Successful merges:
--emitand--out-dirmimic rustc #153003 (rustdoc: make--emitand--out-dirmimic rustc)r? @ghost
Create a similar rollup