| Age | Commit message (Collapse) | Author | Lines |
|
Update compiler-builtins to 0.1.125
This commit updates the compiler-builtins crate from 0.1.123 to 0.1.125. The changes in this update are:
* https://github.com/rust-lang/compiler-builtins/pull/682
* https://github.com/rust-lang/compiler-builtins/pull/678
* https://github.com/rust-lang/compiler-builtins/pull/685
|
|
Rollup of 8 pull requests
Successful merges:
- #125060 (Expand documentation of PathBuf, discussing lack of sanitization)
- #129367 (Fix default/minimum deployment target for Aarch64 simulator targets)
- #130156 (Add test for S_OBJNAME & update test for LF_BUILDINFO cl and cmd)
- #130160 (Fix `slice::first_mut` docs)
- #130235 (Simplify some nested `if` statements)
- #130250 (Fix `clippy::useless_conversion`)
- #130252 (Properly report error on `const gen fn`)
- #130256 (Re-run coverage tests if `coverage-dump` was modified)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Re-run coverage tests if `coverage-dump` was modified
If the `coverage-dump` tool was modified, coverage tests should not be treated as up-to-date, because the tool's output might have changed.
Bootstrap already handles rebuilding the tool itself if its sources were changed, so all compiletest needs to do here is include the binary in the list of files whose timestamps are checked.
This should have no effect on non-coverage tests, because bootstrap won't pass the `--coverage-dump-path` flag, so the path in compiletest's config will be None.
|
|
Properly report error on `const gen fn`
Fixes #130232
Also removes some (what I thought were unused) functions, and fixes a bug in clippy where we considered `gen fn` to be the same as `fn` because it was only built to consider asyncness.
|
|
Fix `clippy::useless_conversion`
Self-explanatory. Probably the last clippy change I'll actually put up since this is the only other one I've actually seen in the wild.
|
|
Simplify some nested `if` statements
Applies some but not all instances of `clippy::collapsible_if`. Some ended up looking worse afterwards, though, so I left those out. Also applies instances of `clippy::collapsible_else_if`
Review with whitespace disabled please.
|
|
Fix `slice::first_mut` docs
Changes `pointer` to `reference` since that's the actual type it returns.
`slice::last_mut` does correctly say "reference"
|
|
Add test for S_OBJNAME & update test for LF_BUILDINFO cl and cmd
Update the unit test for checking cl and cmd in LF_BUILDINFO. With llvm-pdbutil we can now more specifically check if the string appears at the right location instead of just checking whether the string exists at all.
Context: https://github.com/rust-lang/rust/issues/96475
|
|
r=jieyouxu
Fix default/minimum deployment target for Aarch64 simulator targets
The minimum that `rustc` encoded did not match [the version in Clang](https://github.com/llvm/llvm-project/blob/llvmorg-18.1.8/llvm/lib/TargetParser/Triple.cpp#L1900-L1932), and that meant that that when linking, Clang ended up bumping the version. See https://github.com/rust-lang/rust/issues/129432 for more motivation behind this change.
Specifically, this PR sets the correct deployment target of the following targets:
- `aarch64-apple-ios-sim` from 10.0 to 14.0
- `aarch64-apple-tvos-sim` from 10.0 to 14.0
- `aarch64-apple-watchos-sim` from 5.0 to 7.0
- `aarch64-apple-ios-macabi` from 13.1 to 14.0
I have chosen not to document the `-sim` changes in the platform support docs, as it is fundamentally uninteresting; the normal targets (e.g. `aarch64-apple-ios`) still have the same deployment target, and that's what developers should actually target.
r? compiler
CC `@BlackHoleFox`
|
|
Expand documentation of PathBuf, discussing lack of sanitization
Various methods in `PathBuf`, in particular `set_file_name` and `set_extension` accept strings which include path seperators (like `../../etc`). These methods just glue together strings, so you can end up with strange strings.
This isn't reasonable to change/fix at this point, and might not even be fixable, but I think should be documented. In particular, you probably shouldn't blindly build paths using strings given by possibly malicious users.
|
|
Revert "Stabilize `-Znext-solver=coherence`"
This is a clean revert of #121848, prepared by running:
```
$ git revert 17b322fa69eed7216dccc9f097eb68237cf62234 -m1
```
Which effectively reverts:
* a138a9261536ac2bdbb7c01a8aa9dc7d43299cae, 69fdd1457d367ce4de044e9784e58a38acf3d847, d93e047c9f1b33892a604273ab3931815f5604a1, 1a893ac648e03732aaa8b5371b602ab683970b0d
see: https://rust-lang.zulipchat.com/#narrow/stream/364551-t-types.2Ftrait-system-refactor/topic/nalgebra.20hang
Closes #130056
r? lcnr
|
|
Pass deployment target when linking with CC on Apple targets
This PR effectively implements what's also being considered in the `cc` crate [here](https://github.com/rust-lang/cc-rs/issues/1030#issuecomment-2051020649), that is:
- When linking macOS targets with CC, pass the `-mmacosx-version-min=.` option to specify the desired deployment target. Also, no longer pass `-m32`/`-m64`, these are redundant since we already pass `-arch`.
- When linking with CC on iOS, tvOS, watchOS and visionOS, only pass `-target` (we assume for these targets that CC forwards to Clang).
This is required to get the linker to emit the correct `LC_BUILD_VERSION` of the final binary. See https://github.com/rust-lang/rust/issues/129432 for more motivation behind this change.
r? compiler
CC `@BlackHoleFox`
|
|
|
|
Mention that some methods do not sanitize their input fully
|
|
Add -Z small-data-threshold
This flag allows specifying the threshold size above which LLVM should not consider placing small objects in a `.sdata` or `.sbss` section.
Support is indicated in the target options via the
small-data-threshold-support target option, which can indicate either an
LLVM argument or an LLVM module flag. To avoid duplicate specifications
in a large number of targets, the default value for support is
DefaultForArch, which is translated to a concrete value according to the
target's architecture.
|
|
|
|
Bump Unicode to version 16.0.0
[Unicode 16.0.0 is out!](https://www.unicode.org/versions/Unicode16.0.0/)
This PR updates Unicode data embedded in `core`.
|
|
|
|
Rollup of 10 pull requests
Successful merges:
- #129103 (Don't warn empty branches unreachable for now)
- #129696 (update stdarch)
- #129835 (enable const-float-classify test, and test_next_up/down on 32bit x86)
- #130077 (Fix linking error when compiling for 32-bit watchOS)
- #130114 (Remove needless returns detected by clippy in the compiler)
- #130168 (maint: update docs for change_time ext and doc links)
- #130228 (notify Miri when intrinsics are changed)
- #130239 (miri: fix overflow detection for unsigned pointer offset)
- #130244 (Use the same span for attributes and Try expansion of ?)
- #130248 (Limit `libc::link` usage to `nto70` target only, not NTO OS)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Limit `libc::link` usage to `nto70` target only, not NTO OS
It seems QNX 7.0 does not support `linkat` at all (most tests were failing). Limiting to QNX 7.0 only, while using `linkat` for the future versions seems like the right path forward (tested on 7.0).
Fixes #129895
CC: `@japaric` `@flba-eb` `@saethlin`
|
|
Use the same span for attributes and Try expansion of ?
This is needed for Clippy to know that the `#[allow(unused)]` attributes added by the expansion of `?` are part of the desugaring, and that they do not come from the user code.
rust-lang/rust-clippy#13380 exhibits a manifestation of this problem and will be fixed by this change.
|
|
miri: fix overflow detection for unsigned pointer offset
This is the Miri part of https://github.com/rust-lang/rust/pull/130229. This is already UB in codegen so we better make Miri detect it; updating the docs may take time if we have to follow some approval process, but let's make Miri match reality ASAP.
r? ``@scottmcm``
|
|
notify Miri when intrinsics are changed
`@rust-lang/miri` should we notify the entire team, or should I just add myself?
|
|
maint: update docs for change_time ext and doc links
maint: update docs for change_time ext and doc links
Related: https://github.com/rust-lang/rust/issues/121478
r? tgross35
|
|
Remove needless returns detected by clippy in the compiler
|
|
Fix linking error when compiling for 32-bit watchOS
In https://github.com/rust-lang/rust/pull/124494 (or https://github.com/rust-lang/rust/pull/124748), I mistakenly conflated "not SjLj" to mean "ARM EHABI", which isn't true, 32-bit watchOS uses a third unwinding method called "DWARF CFI".
So this PR is effectively a revert of https://github.com/rust-lang/rust/pull/124494, with a few more comments explaining what's going on.
Fixes https://github.com/rust-lang/rust/issues/130071.
r? Mark-Simulacrum (since you reviewed the original)
|
|
enable const-float-classify test, and test_next_up/down on 32bit x86
The test_next_up/down tests have been disabled on all 32bit x86 targets, which goes too far -- they should definitely work on our (tier 1) i686 target, it is only without SSE that we might run into trouble due to https://github.com/rust-lang/rust/issues/114479. However, I cannot reproduce that trouble any more -- maybe that got fixed by https://github.com/rust-lang/rust/pull/123351?
The const-float-classify test relied on const traits "because we can", and got disabled when const traits got removed. That's an unfortunate reduction in test coverage of our float functionality, so let's restore the test in a way that does not rely on const traits.
The const-float tests are actually testing runtime behavior as well, and I don't think that runtime behavior is covered anywhere else. Probably they shouldn't be called "const-float", but we don't have a `tests/ui/float` folder... should I create one and move them there? Are there any other ui tests that should be moved there?
I also removed some FIXME referring to not use x87 for Rust-to-Rust-calls -- that has happened in #123351 so this got fixed indeed. Does that mean we can simplify all that float code again? I am not sure how to test it. Is running the test suite with an i586 target enough?
Cc ```@tgross35``` ```@workingjubilee```
|
|
update stdarch
The goal is mostly to pull in https://github.com/rust-lang/stdarch/pull/1633.
r? ```@Amanieu```
|
|
r=compiler-errors
Don't warn empty branches unreachable for now
The [stabilization](https://github.com/rust-lang/rust/pull/122792) of `min_exhaustive_patterns` updated the `unreachable_pattern` lint to trigger on empty arms too. This has caused some amount of churn, and imposes an unjoyful `#[allow(unreachable_patterns)]` onto library authors who want to stay backwards-compatible.
While I think the lint should eventually cover these cases, for transition's sake I'd prefer to revert linting to what it was prior to stabilization, at least for now.
Fixes https://github.com/rust-lang/rust/issues/129031.
r? ``@compiler-errors``
|
|
|
|
|
|
|
|
It seems QNX 7.0 does not support `linkat` at all (most tests were failing). Limiting to QNX 7.0 only, while using `linkat` for the future versions seems like the right path forward (tested on 7.0).
Fixes 129895
|
|
|
|
This is needed for Clippy to know that the `#[allow(unused)]` attributes
added by the expansion of `?` are part of the desugaring, and that they
do not come from the user code.
rust-lang/rust-clippy#13380 exhibits a manifestation of this problem.
|
|
Rollup of 9 pull requests
Successful merges:
- #129260 (Don't suggest adding return type for closures with default return type)
- #129520 (Suggest the correct pattern syntax on usage of unit variant pattern for a struct variant)
- #129866 (Clarify documentation labelling and definitions for std::collections)
- #130123 (Report the `note` when specified in `diagnostic::on_unimplemented`)
- #130161 (refactor merge base logic and fix `x fmt`)
- #130206 (Map `WSAEDQUOT` to `ErrorKind::FilesystemQuotaExceeded`)
- #130207 (Map `ERROR_CANT_RESOLVE_FILENAME` to `ErrorKind::FilesystemLoop`)
- #130219 (Fix false positive with `missing_docs` and `#[test]`)
- #130221 (Make SearchPath::new public)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
|
|
|
|
Make SearchPath::new public
I'm writing a tool that uses `rustc_interface`, and would like to construct `SearchPath` with its `new` method.
As all three fields in `SearchPath` are public anyway, the proposed change should not change the privacy or encapsulation of the struct.
|
|
Fix false positive with `missing_docs` and `#[test]`
Since #130025, the compiler don't ignore missing_docs when compiling the tests. But there is now a false positive warning for every `#[test]`
For example, this code
```rust
//! Crate docs
fn just_a_test() {}
```
Would emit this warning when running `cargo test`
```
warning: missing documentation for a constant
--> src/lib.rs:5:1
|
4 | #[test]
| ------- in this procedural macro expansion
5 | fn just_a_test() {}
| ^^^^^^^^^^^^^^^^^^^
```
|
|
r=ChrisDenton
Map `ERROR_CANT_RESOLVE_FILENAME` to `ErrorKind::FilesystemLoop`
cc #86442
As summarized in #130188, there seems to be a consensus that this should be done.
|
|
Map `WSAEDQUOT` to `ErrorKind::FilesystemQuotaExceeded`
cc #86442
As summarized in #130190, there seems to be a consensus that this should be done.
|
|
refactor merge base logic and fix `x fmt`
When remote upstream is not configured, using [get_git_modified_files](https://github.com/rust-lang/rust/blob/38e3a5771cefc9362976a605549f8b04d5707311/src/tools/build_helper/src/git.rs#L114) to find modified files fails because [get_rust_lang_rust_remote](https://github.com/rust-lang/rust/blob/38e3a5771cefc9362976a605549f8b04d5707311/src/tools/build_helper/src/git.rs#L46-L48) can not resolve "rust-lang/rust" from the git output. The changes in this PR makes bootstrap to find the latest bors commit, treating it as the "closest upstream commit" so that the change tracker logic can use it to find the diffs.
In addition, [skips formatting](https://github.com/rust-lang/rust/commit/e3924544832668a6e239153a90d3be2077fbdce4) if there are no modified files.
Fixes #130147
|
|
Report the `note` when specified in `diagnostic::on_unimplemented`
Before this PR the `note` field was completely ignored for some reason, now it is shown (I think) correctly during the hir typechecking phase.
1. Report the `note` when specified in `diagnostic::on_unimplemented`
2. Added a test for unimplemented trait diagnostic
3. Added a test for custom unimplemented trait diagnostic
Close #130084
P.S. This is my first PR to rustc.
|
|
Clarify documentation labelling and definitions for std::collections
Page affected: https://doc.rust-lang.org/std/collections/index.html#performance
Changes:
- bulleted conventions
- expanded definitions on terms used
- more accessible language
- more informative headings
|
|
r=compiler-errors
Suggest the correct pattern syntax on usage of unit variant pattern for a struct variant
Closes #126243
I add a suggestion on usage of unit variant pattern for a struct variant.
|
|
Don't suggest adding return type for closures with default return type
Follow up of #129223
r? ``@compiler-errors``
|
|
|
|
interpret: mark some hot functions inline(always)
That seems to recover a good part of the perf impact of https://github.com/rust-lang/rust/pull/129778.
r? `@saethlin`
|
|
|