| Age | Commit message (Collapse) | Author | Lines |
|
and update wait_for_output usage
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Update to LLVM 20.1.7
Closes rust-lang/rust#141306, closes rust-lang/rust#140686, closes rust-lang/rust#141737, closes rust-lang/rust#140933.
|
|
Rollup of 8 pull requests
Successful merges:
- rust-lang/rust#139340 (Fix RISC-V C function ABI when passing/returning structs containing floats)
- rust-lang/rust#142341 (Don't suggest converting `///` to `//` when expecting `,`)
- rust-lang/rust#142414 (ignore `run-make` tests that need `std` on targets without `std`)
- rust-lang/rust#142498 (Port `#[rustc_as_ptr]` to the new attribute system)
- rust-lang/rust#142554 (Fix `PathSource` lifetimes.)
- rust-lang/rust#142562 (Update the `backtrace` submodule)
- rust-lang/rust#142565 (Test naked asm for wasm32-unknown-unknown)
- rust-lang/rust#142573 (`fn candidate_is_applicable` to method)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
`fn candidate_is_applicable` to method
r? `@BoxyUwU`
|
|
Test naked asm for wasm32-unknown-unknown
cc https://github.com/rust-lang/rust/pull/133952#discussion_r2148924872
|
|
Update the `backtrace` submodule
Pick up the following pull requests:
* ci: remove binary size check (not relevant in rust-lang/rust) <https://github.com/rust-lang/backtrace-rs/pull/710>
* Upgrade `ruzstd`, `object`, and `addr2line` to the latest versions <https://github.com/rust-lang/backtrace-rs/pull/718>
|
|
Fix `PathSource` lifetimes.
It currently has two, which don't accurately capture what's happening -- the `TupleStruct` spans are allocated in `ResolverArenas`, which is different to where the `Expr` is allocated -- and require some "outlives" constraints to be used.
This commit adds another lifetime, renames the existing ones, and removes the "outlives" constraints.
r? `@petrochenkov`
|
|
Port `#[rustc_as_ptr]` to the new attribute system
It might make sense to introduce some new parser analogous to `Single`, but even more simple: for parsing attributes that take no arguments and may appear only once (such as `#[rustc_as_ptr]` or `#[rustc_const_stable_indirect]`). Not sure if this should be a single `impl` parsing all such attributes, or one impl per attribute. Or how it will play along with the upcoming rework of attribute validation. Or how these argumentless attributes should be called (I've loosely referred to them as `markers` in the name of the new module in this PR, but not sure how good it is).
This is a part of rust-lang/rust#131229, so
r? `@jdonszelmann`
---
For reference, the `#[rustc_as_ptr]` attribute was created back in rust-lang/rust#132732 as a followup to rust-lang/rust#128985.
|
|
ignore `run-make` tests that need `std` on targets without `std`
In particular, anything that includes `none` in the target triple, and `nvptx64-nvidia-cuda`. Right now we don't cross-compile the `run-make` tests, but we want to in the future.
This uses `//@ needs-target-std` introduced in https://github.com/rust-lang/rust/pull/142297.
Useful for https://github.com/rust-lang/rust/pull/139244 and https://github.com/rust-lang/rust/pull/141856.
The modified files are based on running https://github.com/rust-lang/rust/pull/141856 locally. It might be that https://github.com/rust-lang/rust/pull/139244 uncovers some additional files, but that PR needs to be rebased (though actually I'd advice to rebase the non-test changes onto this PR, probably faster that way).
r? ``@jieyouxu``
<details>
<summary>vim notes for future me</summary>
Make a file with lines like this
```
/home/folkertdev/rust/rust/tests/run-make/export/disambiguator/rmake.rs:1:1
/home/folkertdev/rust/rust/tests/run-make/invalid-so/rmake.rs:1:1
/home/folkertdev/rust/rust/tests/run-make/no-builtins-attribute/rmake.rs:1:1
/home/folkertdev/rust/rust/tests/run-make/export/extern-opt/rmake.rs:1:1
/home/folkertdev/rust/rust/tests/run-make/link-dedup/rmake.rs:1:1
```
then
```
:set errorformat=%f:%l:%c
:cfile /tmp/files-to-fix.txt
```
```
:copen
:cnext
:cprev
```
are your friends
</details>
|
|
Don't suggest converting `///` to `//` when expecting `,`
Fixes rust-lang/rust#142311
|
|
Fix RISC-V C function ABI when passing/returning structs containing floats
RISC-V passes structs containing only one or two floats (or a float and integer pair) in registers, as long as the individual floats/integers fit in a single corresponding register (see [the ABI specification](https://github.com/riscv-non-isa/riscv-elf-psabi-doc/releases/download/v1.0/riscv-abi.pdf) for details). Before this PR, Rust would not check what offset the second float/integer was at, instead assuming that it was at the standard offset for its default alignment. However, as the offset can be affected by `#[repr(align(N))]` and `#[repr(packed)]`, this caused miscompilations (see #115609). To fix this, this PR introduces a `rest_offset` field to `CastTarget` that can be used to explicitly specify at what offset the `rest` part of the cast is located at.
While fixing this, I discovered another bug: the size of the cast target was being used as the size of the MIR return place (when the function was using a `PassMode::Cast` return type). However, the cast target is allowed to be smaller than the size of the actual type, causing a miscompilation. This PR fixes this issue by using the largest of the size of the type and the size of the cast target as the size of the MIR return place, ensuring all reads/writes will be inbounds.
Fixes the RISC-V part of #115609.
cc target maintainers of `riscv64gc-unknown-linux-gnu`: `@kito-cheng` `@michaelmaitland` `@robin-randhawa-sifive` `@topperc`
r? `@workingjubilee`
|
|
|
|
missing `,` in list
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
|
|
Rollup of 12 pull requests
Successful merges:
- rust-lang/rust#141639 (Expose discriminant values in stable_mir)
- rust-lang/rust#142082 (Refactor `rustc_attr_data_structures` documentation)
- rust-lang/rust#142125 (Stabilize "file_lock" feature)
- rust-lang/rust#142236 (Add documentation for `PathBuf`'s `FromIterator` and `Extend` impls)
- rust-lang/rust#142373 (Fix Debug for Location)
- rust-lang/rust#142416 (Assorted bootstrap cleanups (step 2))
- rust-lang/rust#142431 (Add initial version of snapshot tests to bootstrap)
- rust-lang/rust#142450 (Add documentation on top of `rustc_middle/src/query/mod.rs`)
- rust-lang/rust#142528 (clarify `rustc_do_not_const_check` comment)
- rust-lang/rust#142530 (use `if let` guards where possible)
- rust-lang/rust#142561 (Remove an `njn:` comment accidentaly left behind.)
- rust-lang/rust#142566 (Fix `-nopt` CI jobs)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Fix `-nopt` CI jobs
They were using `--config` instead of `--set`, which overrides too much stuff after recent changes to config merging.
Should hopefully unblock https://github.com/rust-lang/rust/pull/142447.
r? `@jieyouxu`
|
|
Remove an `njn:` comment accidentaly left behind.
r? `@chenyukang`
|
|
use `if let` guards where possible
these crates already enable the feature
|
|
clarify `rustc_do_not_const_check` comment
~~Given that we have used this attribute for other reasons before it seems appropriate to make this a "usually".~~
Add function name as a pointer
cc ```@rust-lang/wg-const-eval```
|
|
Add documentation on top of `rustc_middle/src/query/mod.rs`
The `rustc-dev-guide` gives a high-level intro, but many details—especially about how the code works and modifiers in `query xxx(){...}`—are only in code comments or the macro implementation. This doc makes it easier for contributors and code readers to understand the workflow and available modifiers without jumping between files and docs.
This PR adds a comprehensive module-level doc comment to `rustc_middle::query::mod.rs` that:
1. Provides an overview of the query system and macro-based query definitions for reading code more easily
2. Centralizes documentation for all query modifiers (previously scattered or only in `rustc_macro` code), closely following the authoritative list in QueryModifiers.
|
|
Add initial version of snapshot tests to bootstrap
When making any changes to bootstrap (steps), it is very difficult to realize how does it affect various common bootstrap commands, and if everything still works as we expect it to. We are far away from having actual end-to-end tests, but what we could at least do is have a way of testing what steps does bootstrap execute in dry run mode. Now, we already have something like this in `src/bootstrap/src/core/builder/tests.rs`, however that is quite limited, because it only checks executed steps for a specific impl of `Step` and it does not consider step order.
Recently, when working on what I thought was one of the simplest possible step untanglings in bootstrap (https://github.com/rust-lang/rust/pull/142357), I ran into errors in tests that were quite hard to debug. Partly also because the current staging test diffs are multiline and use `Debug` output, so it's quite difficult for me to make sense of them.
In this PR, I introduce `insta`, which allows writing snapshot tests in a very simple way. With it, I want to allow writing tests that will clearly show us what is going on during bootstrap execution, and then write golden tests for `build/check/test` stage `0/1/2` for compiler/std/tools etc., to make sure that we don't regress something, and also to help with [#t-infra/bootstrap > Proposal to cleanup stages and steps after the redesign](https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Proposal.20to.20cleanup.20stages.20and.20steps.20after.20the.20redesign/with/523488806), to help avoid a situation where we would (again) have to make a flurry of staging changes because of unexpected consequences.
In the snapshot tests, we currently render the build of rustc, std and LLVM. Currently I render the executed steps using downcasting, which is not super pretty, but it allows us to make the test rendering localized in one place, and it's IMO enough for now.
I implemented only a single test using the new machinery. Maybe if you take a look at it, you will understand why :laughing: Bootstrap currently does some peculiar things, such as running a stage 0 std step (even though stage 0 std no longer exists) and running the Rustc stage 0 -> 1 step twice, once with a single crates, once with all rustc crates. So I think that even with this single step, there will be a bunch of things to fix in the near future...
The way we currently prepare the Config test fixtures is far from ideal, this is something I think ``@Shourya742`` could work on as a part of their GSoC project (remove as much command execution from Config construction as possible, actually run bootstrap on a temporary directory instead of running it on the rustc checkout, create a Builder-like API for creating the Config test fixtures).
r? ``@jieyouxu``
|
|
Assorted bootstrap cleanups (step 2)
Very small improvements designed towards making bootstrap tests less hacky/special, and towards making it possible to run bootstrap tests in parallel.
Best reviewed commit by commit.
r? ``@jieyouxu``
|
|
Fix Debug for Location
Fixes https://github.com/rust-lang/rust/issues/142279
|
|
Add documentation for `PathBuf`'s `FromIterator` and `Extend` impls
I think it's not very obvious that `PathBuf`'s `Extend` and `FromIterator` impls work like `PathBuf::push`, so I think these should be documented.
I'm not very happy with the wording and examples, open to suggestions :)
|
|
Stabilize "file_lock" feature
Closes https://github.com/rust-lang/rust/issues/130994
r? ```@joshtriplett```
|
|
Refactor `rustc_attr_data_structures` documentation
I was reading through `AttributeKind` and realized that attributes like `InlineAttr` didn't appear in it, however, I found them in `rustc_codegen_ssa` and understood why (guessing).
There's almost no overall documentation for this crate, I've added the organized documentation at the top of `lib.rs`, and I've grouped the Attributes into two categories: `AttributeKind` that run all through the compiler, and the ones that are only used in `codegen_ssa`, such as `InlineAttr`, `OptimizeAttr`, `InstructionSetAttr`.
Also, I've added documentation for `AttributeKind` that further explains why attributes like `InlineAttr` don't appear in it, with examples for each variant.
r? ```@jdonszelmann```
|
|
Expose discriminant values in stable_mir
Resolves https://github.com/rust-lang/project-stable-mir/issues/93
* Added `Discr` struct to stable mir as stable version of struct with same name
* Added `discriminant_for_variant` method to `AdtDef` and `CoroutineDef`
|
|
|
|
Miri subtree update
r? `@ghost`
|
|
|
|
They were using `--config` instead of `--set`, which overrides too much stuff.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
|
|
Pick up the following pull requests:
* ci: remove binary size check (not relevant in rust-lang/rust)
<https://github.com/rust-lang/backtrace-rs/pull/710>
* Upgrade `ruzstd`, `object`, and `addr2line` to the latest versions
<https://github.com/rust-lang/backtrace-rs/pull/718>
|
|
|
|
Use `LLVMIntrinsicGetDeclaration` to completely remove the hardcoded intrinsics list
Follow-up to rust-lang/rust#142259
This also needs a rustc-perf run, because `Intrinsic::getType` can be expensive
`@rustbot` label A-LLVM A-codegen T-compiler
r? `@workingjubilee`
cc `@nikic`
|
|
|