| Age | Commit message (Collapse) | Author | Lines |
|
|
|
Cranelift being disabled
|
|
Replace black with ruff in `tidy`
`ruff` can both lint and format Python code (in fact, it should be a mostly drop-in replacement for `black` in terms of formatting), so it's not needed to use `black` anymore. This PR removes `black` and replaces it with `ruff`, to get rid of one Python dependency, and also to make Python formatting faster (although that's a small thing).
If we decide to merge this, we'll need to "reformat the world" - `ruff` is not perfectly compatible with `black`, and it also looks like `black` was actually ignoring some files before. I tried it locally (`./x test tidy --extra-checks=py:fmt --bless`) and it also reformatted some code in subtrees (e.g. `clippy` or `rustc_codegen_gcc`) - I'm not sure how to handle that.
|
|
Revert #133817
This reverts commit 0585134e709de4a14e509158662fa569c155c195, reversing changes made to 5530869e0ff21d69e0eef1a4c4fd1f25bcbe7fbf.
#133817 unfortunately only converted the `println!` instances to `eprintln!`, meaning that some test output (via compiletest/bootstrap) was messed up because stdout/stderr output interleaved improperly when some `println!` instances were converted to `eprintln!` instances, while some `print!` instances remain unchanged. This made reading test output annoying for contributors cc #133879.
Closes #133879 by reverting.
#133817 can be relanded in the future when `print!` instances are also matched with `println!` instances.
cc `@clubby789`
This is a clean revert so I'm going to self-approve this PR.
|
|
Add context to "const in pattern" errors
*Each commit addresses specific diagnostics.*
- Add primary span labels
- Point at `const` item, and `const` generic param definition
- Reword messages and notes
- Point at generic param through which an associated `const` is being referenced
- Silence const in pattern with evaluation errors when they come from `const` items that already emit a diagnostic
- On non-structural type in const used as pattern, point at the type that should derive `PartialEq`
|
|
This reverts commit 0585134e709de4a14e509158662fa569c155c195, reversing
changes made to 5530869e0ff21d69e0eef1a4c4fd1f25bcbe7fbf.
The PR unfortunately only converted the `ln!` instances, meaning that
test output was messed up because stdout/stderr output interleaved when
some `println!` instances were converted to `eprintln!` instances, while
some `println!` instances remain unchanged.
|
|
|
|
Conform to error style guide.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Revert "tidy: validate LLVM component names in tests"
This reverts #125472.
This has already caused a [bit](https://github.com/rust-lang/rust/pull/125702) of [trouble](https://github.com/rust-lang/rust/pull/125710), and I was mistaken about the original motivation--incorrect component names [_will_](https://github.com/rust-lang/rust/pull/125702#issuecomment-2137030731) be detected by a full CI run.
I no longer think it pulls its weight.
r? `@workingjubilee`
|
|
contain files that do not have a "known-bug" directive
Fixes #133009
|
|
Add licenses + run `cargo update`
Replaces #131311
```
compiler & tools dependencies:
Locking 86 packages to latest compatible versions
Updating anstream v0.6.15 -> v0.6.17
Updating anstyle v1.0.8 -> v1.0.10
Updating anstyle-lossy v1.1.2 -> v1.1.3
Updating anstyle-parse v0.2.5 -> v0.2.6
Updating anstyle-query v1.1.1 -> v1.1.2
Updating anstyle-svg v0.1.5 -> v0.1.7
Updating anstyle-wincon v3.0.4 -> v3.0.6
Updating anyhow v1.0.89 -> v1.0.92
Updating arrayref v0.3.7 -> v0.3.9
Updating blake3 v1.5.2 -> v1.5.4
Updating bytes v1.7.2 -> v1.8.0
Updating cc v1.1.23 -> v1.1.34
Updating clap v4.5.18 -> v4.5.20
Updating clap_builder v4.5.18 -> v4.5.20
Updating clap_complete v4.5.29 -> v4.5.36
Updating colorchoice v1.0.2 -> v1.0.3
Updating constant_time_eq v0.3.0 -> v0.3.1
Updating curl v0.4.46 -> v0.4.47
Updating curl-sys v0.4.76+curl-8.10.1 -> v0.4.77+curl-8.10.1
Updating derive_builder v0.20.1 -> v0.20.2
Updating derive_builder_core v0.20.1 -> v0.20.2
Updating derive_builder_macro v0.20.1 -> v0.20.2
Adding foldhash v0.1.3
Updating futures v0.3.30 -> v0.3.31
Updating futures-channel v0.3.30 -> v0.3.31
Updating futures-core v0.3.30 -> v0.3.31
Updating futures-executor v0.3.30 -> v0.3.31
Updating futures-io v0.3.30 -> v0.3.31
Updating futures-macro v0.3.30 -> v0.3.31
Updating futures-sink v0.3.30 -> v0.3.31
Updating futures-task v0.3.30 -> v0.3.31
Updating futures-util v0.3.30 -> v0.3.31
Updating gimli v0.31.0 -> v0.31.1
Adding hashbrown v0.15.0
Updating indexmap v2.5.0 -> v2.6.0
Updating js-sys v0.3.70 -> v0.3.72
Updating libc v0.2.159 -> v0.2.161
Updating libm v0.2.8 -> v0.2.11
Updating object v0.36.4 -> v0.36.5
Updating once_cell v1.19.0 -> v1.20.2
Removing once_map v0.4.19
Updating openssl-sys v0.9.103 -> v0.9.104
Updating pathdiff v0.2.1 -> v0.2.2
Updating pest v2.7.13 -> v2.7.14
Updating pest_derive v2.7.13 -> v2.7.14
Updating pest_generator v2.7.13 -> v2.7.14
Updating pest_meta v2.7.13 -> v2.7.14
Updating pin-project-lite v0.2.14 -> v0.2.15
Updating proc-macro2 v1.0.86 -> v1.0.89
Updating redox_syscall v0.5.6 -> v0.5.7
Updating regex v1.10.6 -> v1.11.1
Updating regex-automata v0.4.7 -> v0.4.8
Updating regex-syntax v0.8.4 -> v0.8.5
Updating rinja v0.3.4 -> v0.3.5
Updating rinja_derive v0.3.4 -> v0.3.5
Updating rinja_parser v0.3.4 -> v0.3.5
Updating rustix v0.38.37 -> v0.38.38
Updating rustversion v1.0.17 -> v1.0.18
Updating schannel v0.1.24 -> v0.1.26
Updating serde v1.0.210 -> v1.0.214
Updating serde_derive v1.0.210 -> v1.0.214
Updating serde_json v1.0.128 -> v1.0.132
Updating syn v2.0.79 -> v2.0.87
Updating tar v0.4.42 -> v0.4.43
Updating terminal_size v0.3.0 -> v0.4.0
Updating thiserror v1.0.64 -> v1.0.66
Updating thiserror-impl v1.0.64 -> v1.0.66
Updating tokio v1.40.0 -> v1.41.0
Updating ucd-trie v0.1.6 -> v0.1.7
Updating unicase v2.7.0 -> v2.8.0
Updating unicode-bidi v0.3.15 -> v0.3.17
Updating unicode-properties v0.1.2 -> v0.1.3
Updating uuid v1.10.0 -> v1.11.0
Updating wasi-preview1-component-adapter-provider v24.0.0 -> v24.0.1 (latest: v25.0.1)
Updating wasm-bindgen v0.2.93 -> v0.2.95
Updating wasm-bindgen-backend v0.2.93 -> v0.2.95
Updating wasm-bindgen-macro v0.2.93 -> v0.2.95
Updating wasm-bindgen-macro-support v0.2.93 -> v0.2.95
Updating wasm-bindgen-shared v0.2.93 -> v0.2.95
Updating wasm-encoder v0.219.0 -> v0.219.1
Updating wasm-metadata v0.219.0 -> v0.219.1
Removing wasmparser v0.219.0
Adding wasmparser v0.218.0 (latest: v0.219.1)
Adding wasmparser v0.219.1
Updating wast v219.0.0 -> v219.0.1
Updating wat v1.219.0 -> v1.219.1
Updating wit-component v0.219.0 -> v0.219.1
Updating wit-parser v0.219.0 -> v0.219.1
library dependencies:
Locking 5 packages to latest compatible versions
Updating compiler_builtins v0.1.136 -> v0.1.138
Updating dlmalloc v0.2.6 -> v0.2.7
Updating object v0.36.4 -> v0.36.5
Updating windows-sys v0.52.0 -> v0.59.0
rustbook dependencies:
Updating anstream v0.6.15 -> v0.6.17
Updating anstyle v1.0.8 -> v1.0.10
Updating anstyle-parse v0.2.5 -> v0.2.6
Updating anstyle-query v1.1.1 -> v1.1.2
Updating anstyle-wincon v3.0.4 -> v3.0.6
Updating anyhow v1.0.89 -> v1.0.92
Updating cc v1.1.22 -> v1.1.34
Updating clap v4.5.18 -> v4.5.20
Updating clap_builder v4.5.18 -> v4.5.20
Updating clap_complete v4.5.29 -> v4.5.36
Updating colorchoice v1.0.2 -> v1.0.3
Updating hashbrown v0.14.5 -> v0.15.0
Updating indexmap v2.5.0 -> v2.6.0
Updating js-sys v0.3.70 -> v0.3.72
Updating libc v0.2.159 -> v0.2.161
Updating once_cell v1.19.0 -> v1.20.2
Updating pathdiff v0.2.1 -> v0.2.2
Updating pest v2.7.13 -> v2.7.14
Updating pest_derive v2.7.13 -> v2.7.14
Updating pest_generator v2.7.13 -> v2.7.14
Updating pest_meta v2.7.13 -> v2.7.14
Updating proc-macro2 v1.0.86 -> v1.0.89
Updating redox_syscall v0.5.6 -> v0.5.7
Updating regex v1.10.6 -> v1.11.1
Updating regex-automata v0.4.7 -> v0.4.8
Updating regex-syntax v0.8.4 -> v0.8.5
Updating rustix v0.38.37 -> v0.38.38
Updating serde v1.0.210 -> v1.0.214
Updating serde_derive v1.0.210 -> v1.0.214
Updating serde_json v1.0.128 -> v1.0.132
Updating syn v2.0.79 -> v2.0.87
Updating terminal_size v0.3.0 -> v0.4.0
Updating thiserror v1.0.64 -> v1.0.66
Updating thiserror-impl v1.0.64 -> v1.0.66
Updating ucd-trie v0.1.6 -> v0.1.7
Updating unicase v2.7.0 -> v2.8.0
Updating unicode-bidi v0.3.15 -> v0.3.17
Updating wasm-bindgen v0.2.93 -> v0.2.95
Updating wasm-bindgen-backend v0.2.93 -> v0.2.95
Updating wasm-bindgen-macro v0.2.93 -> v0.2.95
Updating wasm-bindgen-macro-support v0.2.93 -> v0.2.95
Updating wasm-bindgen-shared v0.2.93 -> v0.2.95
Removing windows-sys v0.48.0
Removing windows-targets v0.48.5
Removing windows_aarch64_gnullvm v0.48.5
Removing windows_aarch64_msvc v0.48.5
Removing windows_i686_gnu v0.48.5
Removing windows_i686_msvc v0.48.5
Removing windows_x86_64_gnu v0.48.5
Removing windows_x86_64_gnullvm v0.48.5
Removing windows_x86_64_msvc v0.48.5
```
|
|
|
|
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
|
ismailarilik:chore/style/sync-submodule-exclusion-list-between-tidy-and-rustfmt, r=jieyouxu
chore(style): sync submodule exclusion list between tidy and rustfmt
As asked in the FIXME comments
|
|
|
|
|
|
As asked in the FIXME comments
|
|
Remove support for decompressing dylib metadata
We haven't been compressing dylib metadata for a while now. Removing decompression support will regress error messages about an incompatible rustc version being used, but dylibs are pretty rare anyway.
Fixes https://github.com/rust-lang/rust-analyzer/issues/18451
|
|
Update compiler-builtins to 0.1.136
This includes:
* The license change https://github.com/rust-lang/compiler-builtins/pull/717
* The `libm` submodule update, which also has a license change https://github.com/rust-lang/libm/pull/317
* Re-enabling `math` on i686 UEFI https://github.com/rust-lang/compiler-builtins/pull/715
Fixes: https://github.com/rust-lang/rust/issues/128533
|
|
|
|
We haven't been compressing dylib metadata for a while now. Removing
decompression support will regress error messages about an incompatible
rustc version being used, but dylibs are pretty rare anyway.
|
|
The RFC for arbitrary self types v2 declares that we should reject
"generic" self types. This commit does so.
The definition of "generic" was unclear in the RFC, but has been
explored in
https://github.com/rust-lang/rust/issues/129147
and the conclusion is that "generic" means any `self` type which
is a type parameter defined on the method itself, or references
to such a type.
This approach was chosen because other definitions of "generic"
don't work. Specifically,
* we can't filter out generic type _arguments_, because that would
filter out Rc<Self> and all the other types of smart pointer
we want to support;
* we can't filter out all type params, because Self itself is a
type param, and because existing Rust code depends on other
type params declared on the type (as opposed to the method).
This PR decides to make a new error code for this case, instead of
reusing the existing E0307 error. This makes the code a
bit more complex, but it seems we have an opportunity to provide
specific diagnostics for this case so we should do so.
This PR filters out generic self types whether or not the
'arbitrary self types' feature is enabled. However, it's believed
that it can't have any effect on code which uses stable Rust, since
there are no stable traits which can be used to indicate a valid
generic receiver type, and thus it would have been impossible to
write code which could trigger this new error case.
It is however possible that this could break existing code which
uses either of the unstable `arbitrary_self_types` or
`receiver_trait` features. This breakage is intentional; as
we move arbitrary self types towards stabilization we don't want
to continue to support generic such types.
This PR adds lots of extra tests to arbitrary-self-from-method-substs.
Most of these are ways to trigger a "type mismatch" error which
https://github.com/rust-lang/rust/blob/9b82580c7347f800c2550e6719e4218a60a80b28/compiler/rustc_hir_typeck/src/method/confirm.rs#L519
hopes can be minimized by filtering out generics in this way.
We remove a FIXME from confirm.rs suggesting that we make this change.
It's still possible to cause type mismatch errors, and a subsequent
PR may be able to improve diagnostics in this area, but it's harder
to cause these errors without contrived uses of the turbofish.
This is a part of the arbitrary self types v2 project,
https://github.com/rust-lang/rfcs/pull/3519
https://github.com/rust-lang/rust/issues/44874
r? @wesleywiser
|
|
This includes:
* The license change
https://github.com/rust-lang/compiler-builtins/pull/717
* The `libm` submodule update, which also has a license change
https://github.com/rust-lang/libm/pull/317
* Re-enabling `math` on i686 UEFI
https://github.com/rust-lang/compiler-builtins/pull/715
|
|
Co-authored-by: Oneirical <manchot@videotron.ca>
|
|
|
|
Update rustc-hash to version 2 but again
it's like #129533 but not closed by bors and rebased
r? WaffleLapkin meow
|
|
This brings in the new algorithm.
|
|
Forbid cannot be overriden. When someome tries to do this anyways,
it results in a hard error. That makes sense.
Except it doesn't, because macros. Macros may reasonably use `#[deny]`
in their expansion to assert
that their expanded code follows the lint. This is doesn't work when the
output gets expanded into a `forbid()` context. This is pretty silly,
since both the macros and the code agree on the lint!
Therefore, we allow `#[deny(..)]`ing a lint that's already forbidden,
keeping the level at forbid.
|
|
To fix the linker errors, we need to set the output extension to `.js` instead
of `.wasm`. Setting the output to a `.wasm` file puts Emscripten into standalone
mode which is effectively a distinct target. We need to set the runner to be
`node` as well.
This fixes most of the ui tests. I fixed a few more tests with simple problems:
- `intrinsics/intrinsic-alignment.rs` and `structs-enums/rec-align-u64.rs` --
Two `#[cfg]` macros match for Emscripten so we got a duplicate definition of
`mod m`.
- `issues/issue-12699.rs` -- Seems to hang so I disabled it
- `process/process-sigpipe.rs` -- Not expected to work on Emscripten so I
disabled it
|
|
Compiler & its UI tests: Rename remaining occurrences of "object safe" to "dyn compatible"
Follow-up to #130826.
Part of #130852.
1. 1st commit: Fix stupid oversights. Should've been part of #130826.
2. 2nd commit: Rename the unstable feature `object_safe_for_dispatch` to `dyn_compatible_for_dispatch`. Might not be worth the churn, you decide.
3. 3rd commit: Apply the renaming to all UI tests (contents and paths).
|
|
|
|
This also adds three license exceptions to Cargo.
* arrayref — BSD-2-Clause
* blake3 — CC0-1.0 OR Apache-2.0 OR Apache-2.0 WITH LLVM-exception
* constant_time_eq — CC0-1.0 OR MIT-0 OR Apache-2.0
These exceptions were added to rustc in rust-lang/rust#126930,
so should be fine for Cargo as well.
|
|
Co-authored-by: Oneirical <manchot@videotron.ca>
Co-authored-by: Chris Denton <chris@chrisdenton.dev>
|
|
|
|
|
|
Rollup of 8 pull requests
Successful merges:
- #125404 (Fix `read_buf` uses in `std`)
- #130866 (Allow instantiating object trait binder when upcasting)
- #130922 (Reference UNSPECIFIED instead of INADDR_ANY in join_multicast_v4)
- #130924 (Make clashing_extern_declarations considering generic args for ADT field)
- #130939 (rustdoc: update `ProcMacro` docs section on helper attributes)
- #130940 (Revert space-saving operations)
- #130944 (Allow instantiating trait object binder in ptr-to-ptr casts)
- #130953 (Rename a few tests to make tidy happier)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Rename a few tests to make tidy happier
A somewhat random smattering of tests that I have recently looked at, and thus had cause to research and write down the reason for their existence.
|
|
bump few deps
Bumps cargo_metadata, thorin-dwp, windows.
Should dedupe some crates around.
|
|
|
|
|
|
|