| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
Implement `//@ needs-target-std` compiletest directive
Closes rust-lang/rust#141863.
Needed to unblock rust-lang/rust#139244 and rust-lang/rust#141856.
### Summary
This PR implements a `//@ needs-target-std` compiletest directive that gates test execution based on whether the target supports std or not. For some cases, this should be preferred over e.g. some combination of `//@ ignore-none`, `//@ ignore-nvptx` and more[^none-limit].
### Implementation limitation
Unfortunately, since there is currently [no reliable way to determine from metadata whether a given target supports std or not](https://github.com/rust-lang/rust/issues/142296), we have to resort to a hack. Bootstrap currently determines whether or not a target supports std by a naive target tuple substring comparison: a target supports std if its target tuple does *not* contain one of `["-none", "nvptx", "switch"]` substrings. This PR simply pulls that hack out into `build_helpers` to avoid reimplementing the same hack in compiletest, and uses that logic to inform `//@ needs-target-std`.
### Auxiliary changes
This PR additionally changes a few run-make tests to use `//@ needs-target-std` over an inconsistent combination of target-based `ignore`s. This should help with rust-lang/rust#139244.
---
r? bootstrap
[^none-limit]: Notably, `target_os = "none"` is **not** a sufficient condition for "target does not support std"
|
|
fix: Hide dyn inlay hints for incomplete `impl`s
|
|
|
|
diagnostics: do not repeat the entire message in the span label
|
|
|
|
|
|
It used to decompose them thinking they were numbers.
|
|
Miri subtree update
r? `@ghost`
|
|
To support tests to condition their (potentially cross-compile)
execution based on whether the target supports std.
|
|
[minor] Fix typos
|
|
|
|
fix: Do not error at impls for unsized types that do not include `where Self: Sized` items
|
|
Sized` items
|
|
native_lib: skip to next .so if function was in dependency of the first
|
|
test_dup: ensure the FDs remain in sync even after dup'ing
|
|
|
|
|
|
add SmallVec test
|
|
|
|
|
|
Update cargo
18 commits in 64a12460708cf146e16cc61f28aba5dc2463bbb4..fc1518ef02b77327d70d4026b95ea719dd9b8c51
2025-05-30 18:25:08 +0000 to 2025-06-06 04:49:44 +0000
- fix: Make UI tests handle hyperlinks consistently (rust-lang/cargo#15640)
- Update "time out" to "timeout" (rust-lang/cargo#15637)
- fix(workspace): reload current manifest path member only (rust-lang/cargo#15633)
- Update dependencies (rust-lang/cargo#15635)
- fix(publish): Don't tell people to ctrl-c without knowing consequences (rust-lang/cargo#15632)
- refactor: clean up `clippy::perf` lint warnings (rust-lang/cargo#15631)
- fix(package): Skip registry check if its not needed (rust-lang/cargo#15629)
- Add --offline for comp (rust-lang/cargo#15623)
- cargo-credential-libsecret: load libsecret only once (rust-lang/cargo#15295)
- test(publish): Improvements in prep for `-Zpackage-workspace` stabilization (rust-lang/cargo#15628)
- fix(package): Allow packaging of self-cycles with -Zpackage-workspace (rust-lang/cargo#15626)
- docs: clarify `--all-features` not available for all commmands (rust-lang/cargo#15572)
- Remove double reference in Shell::print_json (rust-lang/cargo#15460)
- fix(trim-paths): remap all paths to `build.build-dir` (rust-lang/cargo#15614)
- test(trim-paths): enable more tests for windows-msvc (rust-lang/cargo#15621)
- fix(fingerprint): explicit reason rather than "stale; unknown reason" (rust-lang/cargo#15617)
- Fix cargo add overwriting symlinked Cargo.toml files (rust-lang/cargo#15281)
- chore(deps): update alpine docker tag to v3.22 (rust-lang/cargo#15616)
r? ghost
|
|
|
|
|
|
|
|
Subtree update of `rust-analyzer`
r? `@ghost`
|
|
Enable Non-determinism of float operations in Miri and change std tests
Links to [#4208](https://github.com/rust-lang/miri/issues/4208) and [#3555](https://github.com/rust-lang/miri/issues/3555) in Miri.
Non-determinism of floating point operations was disabled in rust-lang/rust#137594 because it breaks the tests and doc-tests in core/coretests and std. This PR enables some of them.
This pr includes the following changes:
- Enables the float non-determinism but with a lower relative error of 4ULP instead of 16ULP
- These operations now have a fixed output based on the C23 standard, except the pow operations, this is tracked in [#4286](https://github.com/rust-lang/miri/issues/4286#issue-3010677983)
- Changes tests that made incorrect assumptions about the operations, not to make that assumption anymore (from `assert_eq!` to `assert_approx_eq!`.
- Changed the doctests of the stdlib of these operations to compare against fixed constants instead of `f*::EPSILON`, which now succeed with Miri and `-Zmiri-many-seeds`
- Added a constant `APPROX_DELTA` in `std/tests/floats/f32.rs` which is used for approximation tests, but with a different value when run in Miri. This is to make these tests succeed.
- Added tests in the float tests of Miri to test the C23 behaviour.
Fixes https://github.com/rust-lang/miri/issues/4208
|
|
|
|
|
|
Make `Semantics<'db, DB>` support `Semantics<'db, dyn HirDatabase>`, take two
|
|
Use the in-tree `compiler-builtins` for the sysroot
Many of `std`'s dependency have a dependency on the crates.io `compiler-builtins` when used with the feature `rustc-std-workspace-core`. Use a Cargo patch to select the in-tree version instead.
`compiler-builtins` is also added as a dependency of `rustc-std-workspace-core` so these crates can remove their crates.io dependency in the future.
Zulip discussion: [#t-compiler > Using in-tree compiler-builtins](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Using.20in-tree.20compiler-builtins/with/522445336)
Once this merges, the following PRs will need to make it to a release for the relevant crates:
- https://github.com/rust-lang/getopts/pull/119 (can merge at any time)
- https://github.com/rust-lang/hashbrown/pull/625 (can merge at any time)
- https://github.com/rust-lang/stdarch/pull/1825
- https://github.com/rust-lang/rustc-demangle/pull/80
- https://github.com/rust-lang/cfg-if/pull/84
- https://github.com/unicode-rs/unicode-width/pull/77
The above should cover all tier 1 targets with no `std` features enabled. The remaining cover the rest:
- https://github.com/alexcrichton/dlmalloc-rs/pull/50 (wasm, xous, sgx)
- https://github.com/gimli-rs/gimli/pull/769
- https://github.com/r-efi/r-efi/pull/89 (efi)
- https://github.com/r-efi/r-efi-alloc/pull/9 (efi)
- https://github.com/fortanix/rust-sgx/pull/770 (sgx)
- https://github.com/hermit-os/hermit-rs/pull/718 (hermit)
- https://github.com/bytecodealliance/wasi-rs/pull/108 (wasi)
- https://github.com/gimli-rs/addr2line/pull/345
- https://github.com/oyvindln/adler2/pull/2
- https://github.com/BurntSushi/memchr/pull/180
- https://github.com/Frommi/miniz_oxide/pull/173
- https://github.com/gimli-rs/object/pull/777
try-job: x86_64-gnu
try-job: test-various
|
|
TB: Add flag to disable the more precise interior mutability tracking
|
|
|
|
|
|
|
|
|
|
|
|
Rollup of 12 pull requests
Successful merges:
- rust-lang/rust#141803 (Remove rustc's notion of "preferred" alignment AKA `__alignof`)
- rust-lang/rust#142053 (Add new Tier-3 targets: `loongarch32-unknown-none*`)
- rust-lang/rust#142089 (Replace all uses of sysroot_candidates with get_or_default_sysroot)
- rust-lang/rust#142108 (compiler: Add track_caller to AbiMapping::unwrap)
- rust-lang/rust#142132 (`tests/ui`: A New Order [6/N])
- rust-lang/rust#142162 (UnsafePinned: update get() docs and signature to allow shared mutation)
- rust-lang/rust#142171 (`tests/ui`: A New Order [7/N])
- rust-lang/rust#142179 (store `target.min_global_align` as an `Align`)
- rust-lang/rust#142183 (Added test for 30904)
- rust-lang/rust#142194 (Remove all unused feature gates from the compiler)
- rust-lang/rust#142199 (Do not free disk space in the `mingw-check-tidy` job)
- rust-lang/rust#142210 (Run `mingw-check-tidy` on auto builds)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Add new Tier-3 targets: `loongarch32-unknown-none*`
MCP: https://github.com/rust-lang/compiler-team/issues/865
NOTE: LoongArch32 ELF object support is available starting with object v0.37.0.
|
|
const-eval error: always say in which item the error occurred
I don't see why "is this generic" should make a difference. It may be reasonable to key this on whether the error occurs in a `const fn` that was invoked by a const (making it non-obvious which constant it is) vs inside the body of the const.
r? `@oli-obk`
|
|
|
|
Atomic intrinsics : use const generic ordering, part 2
This completes what got started in https://github.com/rust-lang/rust/pull/141507 by using a const generic for the ordering for all intrinsics. It is based on that PR; only the last commit is new.
Blocked on:
- https://github.com/rust-lang/rust/pull/141507
- https://github.com/rust-lang/rust/pull/141687
- https://github.com/rust-lang/stdarch/pull/1811
- https://github.com/rust-lang/rust/pull/141964
r? `@bjorn3`
|
|
private-field diagnostic (previously it was only on no-such-field)
The difference between the diagnostics is that no-such-field is for record struct construction, while private-field is for dot syntax.
I tried to unify them, but there is a bit of uniqueness in each. This is possible but maybe not worth it.
Also, fix the quickfix when there is already a visibility to the field (replace it instead of appending to it).
|
|
|
|
|
|
Many of `std`'s dependency have a dependency on the crates.io
`compiler-builtins` when used with the feature
`rustc-std-workspace-core`. Use a Cargo patch to select the in-tree
version instead.
`compiler-builtins` is also added as a dependency of
`rustc-std-workspace-core` so these crates can remove their crates.io
dependency in the future.
|
|
|
|
`#[cfg_attr]` is a builtin attr, but it may still contain a macro.
|
|
paolobarbolini:stabilize-const_eq_ignore_ascii_case, r=Mark-Simulacrum
Stabilize `const_eq_ignore_ascii_case`
Tracking issue: rust-lang/rust#131719
Closes rust-lang/rust#131719
FCP Completed: https://github.com/rust-lang/rust/issues/131719#issuecomment-2941829167
|