| Age | Commit message (Collapse) | Author | Lines |
|
This PR changes literal_string_with_formatting_args category from
`suspicious` to `nursery` since there are thousands of false positive on
GitHub.
Closes #13989 since it's no longer problematic with such false positive
with ~~`pedantic`~~ `nursery` category.
changelog: [`literal_string_with_formatting_args` ] change category to
`nursery` from `suspicious`
|
|
This reverts commit e108481f74ff123ad98a63bd107a18d13035b275, reversing
changes made to 303e8bd768526a5812bb1776e798e829ddb7d3ca.
(cherry picked from commit ca1c17c88d1f625763859396ba7a50f36ac45cc0)
|
|
Disable `overflow_delimited_expr` in edition 2024
This reverts the style guide changes and sets the default to "false" in rustfmt for style edition 2024.
r? `@ytmimi`
cc `@rust-lang/style` `@rust-lang/rustfmt`
|
|
|
|
leaking
|
|
|
|
Make the `test` cfg a userspace check-cfg
This PR implements MCP https://github.com/rust-lang/compiler-team/issues/785, which makes the `test` cfg a "userspace" check-cfg, i.e. no longer included in the well known cfg list.
Things to do:
- [x] Accept the MCP (https://github.com/rust-lang/compiler-team/issues/785#issuecomment-2424121886)
- [x] Mark `test` in Cargo (https://github.com/rust-lang/cargo/pull/14963)
`@rustbot` labels +S-waiting-on-MCP +F-check_cfg
r? `@petrochenkov`
|
|
Try to write the panic message with a single `write_all` call
This writes the panic message to a buffer before writing to stderr. This allows it to be printed with a single `write_all` call, preventing it from being interleaved with other outputs. It also adds newlines before and after the message ensuring that only the panic message will have its own lines.
Before:
```
thread 'thread 'thread 'thread 'thread '<unnamed>thread 'thread 'thread 'thread '<unnamed><unnamed>thread '<unnamed>' panicked at ' panicked at <unnamed><unnamed><unnamed><unnamed><unnamed>' panicked at <unnamed>' panicked at src\heap.rssrc\heap.rs'
panicked at ' panicked at ' panicked at ' panicked at ' panicked at src\heap.rs' panicked at src\heap.rs::src\heap.rssrc\heap.rssrc\heap.rssrc\heap.rssrc\heap.rs:src\heap.rs:455455:::::455:455::455455455455455:455:99:::::9:9:
:
999:
999:
assertion failed: size <= (*queue).block_size:
:
assertion failed: size <= (*queue).block_size:
assertion failed: size <= (*queue).block_size:
:
:
assertion failed: size <= (*queue).block_sizeassertion failed: size <= (*queue).block_sizeassertion failed: size <= (*queue).block_size
assertion failed: size <= (*queue).block_size
assertion failed: size <= (*queue).block_sizeassertion failed: size <= (*queue).block_sizeerror: process didn't exit successfully: `target\debug\direct_test.exe` (exit code: 0xc0000409, STATUS_STACK_BUFFER_OVERRUN)
```
After:
```
thread '<unnamed>' panicked at src\heap.rs:455:9:
assertion failed: size <= (*queue).block_size
thread '<unnamed>' panicked at src\heap.rs:455:9:
assertion failed: size <= (*queue).block_size
thread '<unnamed>' panicked at src\heap.rs:455:9:
assertion failed: size <= (*queue).block_size
error: process didn't exit successfully: `target\debug\direct_test.exe` (exit code: 0xc0000409, STATUS_STACK_BUFFER_OVERRUN)
```
---
try-jobs: x86_64-gnu-llvm-18
|
|
|
|
Fix typos
This PR fixes typos errors in comments and docs.
Thank you very much.
|
|
|
|
Rollup of 8 pull requests
Successful merges:
- #132474 (Add more mailmap entries)
- #133486 (borrowck diagnostics: make `add_move_error_suggestions` use the HIR rather than `SourceMap`)
- #134861 (Add GUI test for item info elements color)
- #134968 (Print how to rebless Python formatting in tidy)
- #134971 (chore: fix typos)
- #134972 (add .mailmap entry for myself)
- #134974 (Revert #119515 single line where clause style guide)
- #134975 (Revert style guide rhs break)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Print how to rebless Python formatting in tidy
Suggested [here](https://github.com/rust-lang/rust/pull/134964#discussion_r1900124882).
r? ``@Noratrieb``
|
|
|
|
|
|
Windows: Enable issue 70093 link tests
Tracking issue for `-Z link-native-libraries`: #134948
Tracking issue for `-Z link-directives`: #134947
`-Zlink-native-libraries=no` and `-Zlink-directives=no` *should* work on Windows, at least for msvc. The fly in ointment is that `default-linker-libraries` doesn't. On unixy platforms rustc calls another compiler which in turn calls the linker along with the default libraries. On MSVC rustc calls the linker directly therefore it would need to be the one to implement `default-linker-libraries`. Except it doesn't so we workaround that in the test by using `-C link-arg` to talk to the linker.
|
|
Signed-off-by: ericlehong <193237094+ericlehong@users.noreply.github.com>
|
|
Stabilize `style_edition = "2024"` in-tree
This PR stabilizes the `style_edition` flag in rustfmt.
**Why am I doing this in-tree?** The beta release cut is imminent (according to forge, on January 3) and this is the most lightweight approach to getting this flag stable on nightly. It's imperative (as far as I can tell -- `@traviscross` can verify or disagree) that we stabilize the `style_edition` flag so that users can control their style edition separately from the edition.
I'm happy to move this PR to the rustfmt repo and subsequently prepare a subtree sync if someone on `@rust-lang/rustfmt` believes that we should get this landed on the rustfmt side then synced. If this is the right recourse, I'd like to note that this is still quite time-sensitive. However, I'm happy to dedicate time to get this done if necessary, since I'd really like to un-jeopardize the style edition.
Tracking:
- https://github.com/rust-lang/rust/issues/123799
|
|
|
|
stabilize const_swap
libs-api FCP passed in https://github.com/rust-lang/rust/issues/83163.
However, I only just realized that this actually involves an intrinsic. The intrinsic could be implemented entirely with existing stable const functionality, but we choose to make it a primitive to be able to detect more UB. So nominating for `@rust-lang/lang` to make sure they are aware; I leave it up to them whether they want to FCP this.
While at it I also renamed the intrinsic to make the "nonoverlapping" constraint more clear.
Fixes #83163
|
|
|
|
Fix typos
This PR fixes typos errors in comments, docs and logs.
Thank you very much.
|
|
chore: fix typos
This PR fixes typos errors in docstring only, so functionality wise, it should stay the same.
|
|
Co-authored-by: scottmcm <scottmcm@users.noreply.github.com>
|
|
Signed-off-by: ericlehong <193237094+ericlehong@users.noreply.github.com>
|
|
|
|
bootstrap: Don't apply -Ztls-model=initial-exec to deps of proc-macros
Fixes #134863
1. Checks if a crate name is in a static list before applying the flag
2. Adds a tidy check that gathers transitive deps of proc macros and ensures the list is up to date
cc `@bjorn3` - the issue specifies `rustc_fluent_macro` but I assume this applies to all proc macro crates.
|
|
|
|
Weekly `cargo update`
Automation to keep dependencies in `Cargo.lock` current.
The following is the output from `cargo update`:
```txt
compiler & tools dependencies:
Locking 8 packages to latest compatible versions
Updating anyhow v1.0.94 -> v1.0.95
Updating glob v0.3.1 -> v0.3.2
Updating quote v1.0.37 -> v1.0.38
Updating rustversion v1.0.18 -> v1.0.19
Updating serde v1.0.216 -> v1.0.217
Updating serde_derive v1.0.216 -> v1.0.217
Updating syn v2.0.90 -> v2.0.93
Updating unicase v2.8.0 -> v2.8.1
note: pass `--verbose` to see 36 unchanged dependencies behind latest
library dependencies:
Locking 0 packages to latest compatible versions
note: pass `--verbose` to see 5 unchanged dependencies behind latest
rustbook dependencies:
Locking 7 packages to latest compatible versions
Updating anyhow v1.0.94 -> v1.0.95
Updating cc v1.2.5 -> v1.2.6
Updating quote v1.0.37 -> v1.0.38
Updating serde v1.0.216 -> v1.0.217
Updating serde_derive v1.0.216 -> v1.0.217
Updating syn v2.0.90 -> v2.0.93
Updating unicase v2.8.0 -> v2.8.1
```
|
|
compiler & tools dependencies:
Locking 8 packages to latest compatible versions
Updating anyhow v1.0.94 -> v1.0.95
Updating glob v0.3.1 -> v0.3.2
Updating quote v1.0.37 -> v1.0.38
Updating rustversion v1.0.18 -> v1.0.19
Updating serde v1.0.216 -> v1.0.217
Updating serde_derive v1.0.216 -> v1.0.217
Updating syn v2.0.90 -> v2.0.93
Updating unicase v2.8.0 -> v2.8.1
note: pass `--verbose` to see 36 unchanged dependencies behind latest
library dependencies:
Locking 0 packages to latest compatible versions
note: pass `--verbose` to see 5 unchanged dependencies behind latest
rustbook dependencies:
Locking 7 packages to latest compatible versions
Updating anyhow v1.0.94 -> v1.0.95
Updating cc v1.2.5 -> v1.2.6
Updating quote v1.0.37 -> v1.0.38
Updating serde v1.0.216 -> v1.0.217
Updating serde_derive v1.0.216 -> v1.0.217
Updating syn v2.0.90 -> v2.0.93
Updating unicase v2.8.0 -> v2.8.1
|
|
|
|
There are no tests in `tests/debuginfo` that use this prefix.
|
|
compiletest: Only pass the post-colon value to `parse_normalize_rule`
Addresses one of the FIXMEs noted in #134759.
I started working on the other FIXME, but it became complex enough that I wanted to split it off from this PR.
r? jieyouxu
|
|
Migrate `libs-through-symlink` to rmake.rs
Part of https://github.com/rust-lang/rust/issues/121876.
This PR migrates `tests/run-make/libs-through-symlink/` to use rmake.rs.
- Regression test for #13890.
- Original fix PR is #13903.
- Document test intent, backlink to #13890 and fix PR #13903.
- Fix the test logic: the `Makefile` version seems to not actually be exercising the "library search traverses symlink" logic, because the actual symlinked-to-library is present under the `$(TMPDIR)` directory tree when `bar.rs` is compiled, because the `$(RUSTC)` invocation has an implicit `-L $(TMPDIR)`. The symlink itself was actually broken, i.e. it should've been `ln -nsf $(TMPDIR)/outdir/$(NAME) $(TMPDIR)` but it used `ln -nsf outdir/$(NAME) $(TMPDIR)`. The rmake.rs version now explicitly separates the two directory trees and sets the CWD of the `bar.rs` rustc invocation so that the actual library is *not* present under its CWD tree.
I.e. it is now
```
$test_output/ # rustc foo.rs -o actual_lib_dir/libfoo.rlib
actual_lib_dir/
libfoo.rlib
symlink_lib_dir/ # CWD set; rustc -L . bar.rs
libfoo.rlib --> $test_output/actual_lib_dir/libfoo.rlib
```
Partially supersedes #129011.
This PR is co-authored with `@Oneirical.`
r? compiler
|
|
- The Makefile version *never* ran because of Makefile syntax confusion.
- The test would've always failed because precompiled std is not built
with `-Z cf-protection=branch`, but linkers require all input object
files to indicate IBT support in order to enable IBT for the
executable, which is not the case for std.
- Thus, the test input file is instead changed to a `no_std` + `no_core`
program.
Co-authored-by: Jerry Wang <jerrylwang123@gmail.com>
Co-authored-by: Oneirical <manchot@videotron.ca>
|
|
- Document test intent, backlink to #13890 and fix PR #13903.
- Fix the test logic: the `Makefile` version seems to not actually be
exercising the "library search traverses symlink" logic, because the
actual symlinked-to-library is present under the directory tree when
`bar.rs` is compiled, because the `$(RUSTC)` invocation has an
implicit `-L $(TMPDIR)`. The symlink itself was actually broken, i.e.
it should've been `ln -nsf $(TMPDIR)/outdir/$(NAME) $(TMPDIR)` but it
used `ln -nsf outdir/$(NAME) $(TMPDIR)`.
Co-authored-by: Oneirical <manchot@videotron.ca>
|
|
The old FIXME implies that we don't support escaped newlines, but in fact it
was added in the same patch that added support for escaped newlines.
The new FIXME makes it clear that we do currently support this, and that the
FIXME is for doing so in a less ad-hoc way.
|
|
|
|
Add `--no-capture`/`--nocapture` as bootstrap arguments
I often try `x test ... --nocapture` => 'unknown argument' => `x test ... -- --nocapture`. As we forward several other compiletest flags, let's recognise this one in bootstrap as well.
|
|
compiletest: Remove empty 'expected' files when blessing
Fixes #134793
Fixes #134196
This also refactors `compare_output` to return an enum; returning a usize was done for convenience but is misleading
|
|
tools: fix build failure caused by PR #134420
Someone reports build failure after merging pull request #134420: https://github.com/rust-lang/rust/pull/134420#discussion_r1898081258
This pull request fixes the build failure.
|
|
|
|
|
|
|
|
This is a little more verbose, but also more explicit, and avoids invoking the
full condition engine when only the pointer-width conditions are used.
|
|
|
|
Rollup of 4 pull requests
Successful merges:
- #134656 (Migrate `incr-add-rust-src-component` to rmake)
- #134664 (Account for removal of multiline span in suggestion)
- #134772 (Improve/cleanup rustdoc code)
- #134781 (Add more `begin_panic` normalizations to panic backtrace tests)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
r=wesleywiser
Migrate `incr-add-rust-src-component` to rmake
This PR partially supersedes #128562, and ports the Makefile-based `tests/run-make/incr-add-rust-src-component` to use rmake.rs infra.
Part of #121876.
This run-make test is a regression test for https://github.com/rust-lang/rust/issues/70924. It (tries to) checks that if we add the `rust-src` component in between two incremental compiles, that the compiler doesn't ICE on the second invocation.
- Original issue:https://github.com/rust-lang/rust/issues/70924
- Fix PR: https://github.com/rust-lang/rust/pull/72767
- PR adding this regression test: https://github.com/rust-lang/rust/pull/72952
However, the Makefile version of this used `$SYSROOT/lib/rustlib/src/rust/src/libstd/lib.rs`, but that actually got moved around and reorganized over the years. As of Dec 2024, the `rust-src` component is more like (specific for our purposes):
```
$SYSROOT/lib/rustlib/src/rust/
library/std/src/lib.rs
src/
```
However, this run-make test is ancient and it exercises incr-comp system logic. I'm not sure if this test would actually catch the original regression.
This PR was co-authored with `@Oneirical.`
r? incremental
try-job: i686-msvc
try-job: x86_64-mingw-1
try-job: x86_64-msvc
try-job: aarch64-apple
|
|
Clippy subtree update
r? `@Manishearth`
|
|
clippy-subtree-update
|