| Age | Commit message (Collapse) | Author | Lines |
|
Port `#[cfg]` to the new attribute parsing infrastructure
Ports `#[cfg]` to the new attribute parsing infrastructure for https://github.com/rust-lang/rust/issues/131229#issuecomment-2971353197
I've split this PR into commits for reviewability, and left some comments to clarify things
|
|
|
|
|
|
|
|
|
|
|
|
|
|
core: Add `BorrowedCursor::with_unfilled_buf`
Implementation of https://github.com/rust-lang/libs-team/issues/367.
This mainly adds `BorrowedCursor::with_unfilled_buf`, with enables using the unfilled part of a cursor as a `BorrowedBuf`.
Note that unlike the ACP, `BorrowedCursor::unfilled_buf` was moved to a `From` conversion. This is more consistent with other ways of creating a `BorrowedBuf` and hides a bit this conversion that requires unsafe code to be used correctly.
Cc rust-lang/rust#78485 rust-lang/rust#117693
|
|
Clippy subtree update
r? `@Manishearth`
Cargo.lock update due to `ui_test` bump and restructure.
|
|
Rollup of 8 pull requests
Successful merges:
- rust-lang/rust#141809 (Don't call WSACleanup on process exit)
- rust-lang/rust#143710 (Updates to random number generation APIs)
- rust-lang/rust#143848 (Rename `stable_mir` and `rustc_smir`)
- rust-lang/rust#143855 (Port `#[omit_gdb_pretty_printer_section]` to the new attribute parsing)
- rust-lang/rust#143868 (warn on align on fields to avoid breaking changes)
- rust-lang/rust#143870 ([COMPILETEST-UNTANGLE 6/N] Use `TestSuite` enum instead of stringly-typed test suites)
- rust-lang/rust#143901 (Region constraint nits)
- rust-lang/rust#143903 (Fix typos in documentation files)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Fix typos in documentation files
## Summary
Fix minor typos in documentation files to improve readability.
## Changes
- **tests/mir-opt/pre-codegen/README.md**: Fix typo `condiguration` → `configuration`
- **tests/ui/SUMMARY.md**: Fix typo in RFC link URL (`namepsace ` → `namespace`)
## Type of Change
- [x] Documentation update
- [x] Bug fix (typo correction)
|
|
Region constraint nits
Couple miscellaneous region constraints that have a bit to do with rust-lang/rust#143545 but stand on their own.
|
|
[COMPILETEST-UNTANGLE 6/N] Use `TestSuite` enum instead of stringly-typed test suites
This is part of a patch series to untangle `compiletest` to hopefully nudge it towards being more maintainable.
This PR should contain no functional changes.
|
|
warn on align on fields to avoid breaking changes
r? `@workingjubilee`
|
|
r=jdonszelmann
Port `#[omit_gdb_pretty_printer_section]` to the new attribute parsing
Ports `#[omit_gdb_pretty_printer_section]` to the new attribute parsing infrastructure for https://github.com/rust-lang/rust/issues/131229#issuecomment-2971351163
r? ```@jdonszelmann```
|
|
Rename `stable_mir` and `rustc_smir`
This PR only renames the two crate names.
There is no doubt that we want to rename `stable_mir` to `rustc_public`, while it hasn't been discussed yet that what the new name for `rustc_smir` should be.
This PR proposes a new name for `rustc_smir`, that is `rustc_public_shim`, since `rustc_smir` now is mostly a proxy to do calls to rustc queries and the public API of rustc that is invoked by the `rustc_public` crate.
However, I don't think that name is good enough. I hope there would be a way better name.
r? `@oli-obk`
|
|
Updates to random number generation APIs
Updates based on discussions about random number generation.
- Add comment on `RandomSource::fill_bytes` about multiple calls, to allow
efficient implementations for random sources that generate a word at a time.
- Drop the `Random` trait in favor of `Distribution<T>`, which will let people
make calls like random(1..=6), and which allows for future expansion to
non-uniform distributions, as well as floating-point. (For now, this is only
implemented for `RangeFull`, to get the interface in place. Subsequent PRs
will implement it for other range types.)
|
|
Don't call WSACleanup on process exit
This isn't necessary as cleanup will happen when the process exits regardless.
fixes rust-lang/rust#141799
|
|
|
|
Rollup of 10 pull requests
Successful merges:
- rust-lang/rust#143217 (Port #[link_ordinal] to the new attribute parsing infrastructure)
- rust-lang/rust#143681 (bootstrap/miri: avoid rebuilds for test builds)
- rust-lang/rust#143724 (Tidy cleanup)
- rust-lang/rust#143733 (Change bootstrap's `tool.TOOL_NAME.features` to work on any subcommand)
- rust-lang/rust#143850 (Compiletest: Simplify {Html,Json}DocCk directive handling)
- rust-lang/rust#143875 (update issue number for `const_trait_impl`)
- rust-lang/rust#143881 (Use zero for initialized Once state)
- rust-lang/rust#143887 (Run bootstrap tests sooner in the `x test` pipeline)
- rust-lang/rust#143917 (Change "allocated object" to "allocation".)
- rust-lang/rust#143918 (Tier check cleanup)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
|
|
|
|
Tier check cleanup
clippy cleanup + edition 2024
|
|
r=oli-obk
Change "allocated object" to "allocation".
These seem like they were missed in <https://github.com/rust-lang/rust/pull/141224>
|
|
Run bootstrap tests sooner in the `x test` pipeline
With the recently added bootstrap snapshot tests, and in general with our plans to test more things in bootstrap, I feel like the original comment isn't accurate anymore. Recently, on several occasions I had to wait for 40+ minutes of CI just to find out that the bootstrap snapshot tests have failed. I think we should run bootstrap tests towards the beginning instead now.
r? ```@jieyouxu```
|
|
Use zero for initialized Once state
By re-labeling which integer represents which internal state for `Once` we can ensure that the initialized state is the all-zero state. This is beneficial because some CPU architectures (such as Arm) have specialized instructions to specifically branch on non-zero, and checking for the initialized state is by far the most important operation.
As an example, take this:
```rust
use std::sync::atomic::{AtomicU32, Ordering};
const INIT: u32 = 3;
#[inline(never)]
#[cold]
pub fn slow(state: &AtomicU32) {
state.store(INIT, Ordering::Release);
}
pub fn ensure_init(state: &AtomicU32) {
if state.load(Ordering::Acquire) != INIT {
slow(state)
}
}
```
If `INIT` is 3 (as is currently the state for `Once`), we see the following assembly on `aarch64-apple-darwin`:
```asm
example::ensure_init::h332061368366e313:
ldapr w8, [x0]
cmp w8, #3
b.ne LBB1_2
ret
LBB1_2:
b example::slow::ha042bd6a4f33724e
```
By changing the `INIT` state to zero we get the following:
```asm
example::ensure_init::h332061368366e313:
ldapr w8, [x0]
cbnz w8, LBB1_2
ret
LBB1_2:
b example::slow::ha042bd6a4f33724e
```
So this PR saves 1 instruction every time a `LazyLock` gets accessed on platforms such as these.
|
|
update issue number for `const_trait_impl`
r? project-const-traits
cc rust-lang/rust#67792 rust-lang/rust#143874
|
|
Compiletest: Simplify {Html,Json}DocCk directive handling
So much more maintainable and extensible.
r? ````@jieyouxu```` as discussed
|
|
Change bootstrap's `tool.TOOL_NAME.features` to work on any subcommand
This is a followup to rust-lang/rust#142379 to make the bootstrap option `tool.TOOL_NAME.features` work on any subcommand instead of just build (so also run/test/...). I also made the `TOOL_NAME` comparisons look at the tool path instead of the tool name to determine to which tool a `TOOL_NAME` refers to, so you can specify tools by path like in other places of the bootstrap (e.g. `tool."tools/miri".features`).
|
|
Tidy cleanup
|
|
bootstrap/miri: avoid rebuilds for test builds
When building Miri in its own repo, we always build with `--all-targets`:
https://github.com/rust-lang/rust/blob/a00961269107703772c4e8f071f0accbe0f1a7e5/src/tools/miri/miri-script/src/util.rs#L167-L174
This saves a bunch of time since some of Miri's dependencies get more features enabled by some of Miri's dev-dependencies, and they all get built twice otherwise if you do `cargo build && cargo test` (which is typically what you end up doing inside `./miri test` and also inside `./x test miri`).
This applies the same approach to bootstrap, drastically reducing the edit-compile cycle for Miri work here. :)
|
|
Port #[link_ordinal] to the new attribute parsing infrastructure
Ports link_ordinal to the new attribute parsing infrastructure for https://github.com/rust-lang/rust/issues/131229#issuecomment-2971353197
|
|
Update README.md
|
|
Update LLVM to 20.1.8
I made a new branch with patches that aren't yet in LLVM 20.1.8.
|
|
|
|
|
|
These seem like they were missed in <https://github.com/rust-lang/rust/pull/141224>
|
|
|
|
|
|
|
|
Port `#[automatically_derived]` to the new attribute parsing infrastructure
Ports `#[automatically_derived]` to the new attribute parsing infrastructure for https://github.com/rust-lang/rust/issues/131229#issuecomment-2971351163
r? `@oli-obk`
cc `@jdonszelmann`
|
|
Retire hir::*ItemRef.
This information was kept for various places that iterate on HIR to know about trait-items and impl-items.
This PR replaces them by uses of the `associated_items` query that contain pretty much the same information.
This shortens many spans to just `def_span`, which can be easier to read.
|
|
|
|
|
|
make `cfg_select` a builtin macro
tracking issue: https://github.com/rust-lang/rust/issues/115585
This parses mostly the same as the `macro cfg_select` version, except:
1. wrapping in double brackets is no longer supported (or needed): `cfg_select {{ /* ... */ }}` is now rejected.
2. in an expression context, the rhs is no longer wrapped in a block, so that this now works:
```rust
fn main() {
println!(cfg_select! {
unix => { "foo" }
_ => { "bar" }
});
}
```
3. a single wildcard rule is now supported: `cfg_select { _ => 1 }` now works
I've also added an error if none of the rules evaluate to true, and warnings for any arms that follow the `_` wildcard rule.
cc `@traviscross` if I'm missing any feature that should/should not be included
r? `@petrochenkov` for the macro logic details
|
|
|
|
Rollup of 11 pull requests
Successful merges:
- rust-lang/rust#143301 (`tests/ui`: A New Order [26/N])
- rust-lang/rust#143519 (Check assoc consts and tys later like assoc fns)
- rust-lang/rust#143554 (slice: Mark `rotate_left`, `rotate_right` unstably const)
- rust-lang/rust#143634 (interpret/allocation: expose init + write_wildcards on a range)
- rust-lang/rust#143685 (Resolve: merge `source_bindings` and `target_bindings` into `bindings`)
- rust-lang/rust#143734 (Refactor resolve resolution bindings)
- rust-lang/rust#143774 (constify `From` and `Into`)
- rust-lang/rust#143785 (Add --compile-time-deps argument for x check)
- rust-lang/rust#143786 (Fix fallback for CI_JOB_NAME)
- rust-lang/rust#143825 (clippy: fix test filtering when TESTNAME is empty)
- rust-lang/rust#143826 (Fix command trace)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
|
|
|
|
|