| Age | Commit message (Collapse) | Author | Lines |
|
New const traits syntax
This PR only affects the AST and doesn't actually change anything semantically.
All occurrences of `~const` outside of libcore have been replaced by `[const]`. Within libcore we have to wait for rustfmt to be bumped in the bootstrap compiler. This will happen "automatically" (when rustfmt is run) during the bootstrap bump, as rustfmt converts `~const` into `[const]`. After this we can remove the `~const` support from the parser
Caveat discovered during impl: there is no legacy bare trait object recovery for `[const] Trait` as that snippet in type position goes down the slice /array parsing code and will error
r? ``@fee1-dead``
cc ``@nikomatsakis`` ``@traviscross`` ``@compiler-errors``
|
|
|
|
|
|
This brings in a few updates to the bundled `wasm-component-ld`
dependency used by the `wasm32-wasip2` target. This primarily includes
support for upcoming component model async/WASIp3 support which will be
convenient to have native support for a few months from now.
|
|
Subtree sync for rustc_codegen_cranelift
The main highlight this time is a Cranelift update.
r? `@ghost`
`@rustbot` label +A-codegen +A-cranelift +T-compiler
|
|
Remove the deprecated unstable `concat_idents!` macro
In [rust-lang/rust#137653], the lang and libs-API teams did a joint FCP to deprecate
and eventually remove the long-unstable `concat_idents!` macro. The
deprecation is landing in 1.88, so do the removal here (target version
1.90).
This macro has been superseded by the more recent `${concat(...)}`
metavariable expression language feature, which avoids some of the
limitations of `concat_idents!`. The metavar expression is unstably
available under the [`macro_metavar_expr_concat`] feature.
History is mildly interesting here: `concat_idents!` goes back to 2011
when it was introduced with 513276e595f8 ("Add #concat_idents[] and
#ident_to_str[]"). The syntax looks a bit different but it still works
about the same:
let asdf_fdsa = "<.<";
assert(#concat_idents[asd,f_f,dsa] == "<.<");
assert(#ident_to_str[use_mention_distinction]
== "use_mention_distinction");
(That test existed from introduction until its removal here.)
Closes: https://github.com/rust-lang/rust/issues/29599
[rust-lang/rust#137653]: https://github.com/rust-lang/rust/pull/137653
[`macro_metavar_expr_concat`]: https://github.com/rust-lang/rust/issues/124225
|
|
|
|
These tests were updated in the previous commit; while they are being
cleaned up, move them to a non-issue directory.
|
|
|
|
|
|
r=Kobzol
Check rustdoc-json-types FORMAT_VERSION is correctly updated
Follow-up of https://github.com/rust-lang/rust/pull/142677.
``@nnethercote`` suggested that we should also ensure that the `FORMAT_VERSION` was only increased by 1 and we should check for it, this PR does it.
cc ``@aDotInTheVoid``
r? ghost
|
|
|
|
|
|
Add CI check to ensure that rustdoc JSON `FORMAT_VERSION` is correctly updated
Follow-up of https://github.com/rust-lang/rust/pull/142601.
Tested it locally with: `BASE_COMMIT=1bb335244c311a07cee165c28c553c869e6f64a9 src/ci/docker/host-x86_64/mingw-check-1/validate-rustdoc-json-format-version-update.sh` (where `BASE_COMMIT` value was the commit before I made a wrong change with the `FORMAT_VERSION` update).
This is a first version. I plan to send a follow-up to also ensure that `FORMAT_VERSION` is updated if any code change is done in `rustdoc-json-types`. For that I just need to check that a line not starting with `/` and not an empty line was updated. Fun times with `grep` ahead. :')
cc `@aDotInTheVoid`
r? `@nnethercote`
|
|
Bringing `rustc_rayon_core` in tree as `rustc_thread_pool`
This PR moves [`rustc_rayon_core`](https://github.com/rust-lang/rustc-rayon/tree/5fadf44/rayon-core) from commit `5fadf44` as suggested in [this zulip thread](https://rust-lang.zulipchat.com/#narrow/channel/187679-t-compiler.2Fparallel-rustc/topic/Bringing.20.60rustc_rayon_core.60.20in.20tree). I tried to split the work into separate commits so it is easy to review. The first commit is a simple copy and paste from the fork, and subsequent changes were made to use the new crate and to ensure the new crate complies with different format and lint expectations.
**Call-out:** I was also wondering if I need to make any further changes to accommodate licensing requirements.
r? oli-obk
|
|
Only emit git errors if we are in CI environment
|
|
|
|
|
|
|
|
Allow storing `format_args!()` in variable
Fixes https://github.com/rust-lang/rust/issues/92698
Tracking issue for super let: https://github.com/rust-lang/rust/issues/139076
Tracking issue for format_args: https://github.com/rust-lang/rust/issues/99012
This change allows:
```rust
let name = "world";
let f = format_args!("hello {name}!"); // New: Store format_args!() for later!
println!("{f}");
```
This will need an FCP.
This implementation makes use of `super let`, which is unstable and might not exist in the future in its current form. However, it is entirely reasonable to assume future Rust will always have _a_ way of expressing temporary lifetimes like this, since the (stable) `pin!()` macro needs this too. (This was also the motivation for merging https://github.com/rust-lang/rust/pull/139114.)
(This is a second version of https://github.com/rust-lang/rust/pull/139135)
|
|
|
|
We no longer error in this case!
|
|
|
|
|
|
|
|
Merge `compiler-builtins` as a Josh subtree
Use the Josh [1] utility to add `compiler-builtins` as a subtree, which
will allow us to stop using crates.io for updates. This is intended to
help resolve some problems when unstable features change and require
code changes in `compiler-builtins`, which sometimes gets trapped in a
bootstrap cycle.
This was done using `josh-filter` built from the r24.10.04 tag:
git fetch https://github.com/rust-lang/compiler-builtins.git 233434412fe7eced8f1ddbfeddabef1d55e493bd
josh-filter ":prefix=library/compiler-builtins" FETCH_HEAD
git merge --allow-unrelated FILTERED_HEAD
The HEAD in the `compiler-builtins` repository is 233434412f ("fix an if
statement that can be collapsed").
[1]: https://github.com/josh-project/josh
|
|
Obviously `test-float-parse` is a tool like any other in `src/tools`.
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
|
Add eslint as part of `tidy` run
Rustdoc uses `eslint` to run lints on the JS files. Currently you need to run it by hand since it's not part of any `x.py` command. This PR makes it part of `test tidy`. However, to prevent having all rust developers to install `npm` and `eslint`, I made it optional: if `eslint` is not installed, then the check is simply skipped (but will tell that it is being skipped).
The second commit removes the manual checks from the docker file since `eslint` is run as part of tidy.
cc `@lolbinarycat,` [#t-rustdoc > eslint seems to only be run in CI](https://rust-lang.zulipchat.com/#narrow/channel/266220-t-rustdoc/topic/eslint.20seems.20to.20only.20be.20run.20in.20CI/with/520761477)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
move (or remove) some impl Trait tests
Probably not actually worth the effort, so I am stopping here :sweat_smile:
|
|
|
|
|
|
Weekly `cargo update`
Automation to keep dependencies in `Cargo.lock` current.
The following is the output from `cargo update`:
```txt
compiler & tools dependencies:
Locking 36 packages to latest compatible versions
Updating addr2line v0.21.0 -> v0.24.2
Updating anyhow v1.0.97 -> v1.0.98
Updating askama v0.13.0 -> v0.13.1 (available: v0.14.0)
Updating askama_derive v0.13.0 -> v0.13.1
Updating backtrace v0.3.71 -> v0.3.74
Updating blake3 v1.8.1 -> v1.8.2
Updating chrono v0.4.40 -> v0.4.41
Updating clap v4.5.36 -> v4.5.37
Updating clap_builder v4.5.36 -> v4.5.37
Updating color-eyre v0.6.3 -> v0.6.4
Updating color-spantrace v0.2.1 -> v0.2.2
Updating derive-where v1.2.7 -> v1.4.0
Updating getrandom v0.2.15 -> v0.2.16
Removing gimli v0.28.1
Updating hashbrown v0.15.2 -> v0.15.3
Updating jiff v0.2.6 -> v0.2.12
Updating jiff-static v0.2.6 -> v0.2.12
Updating libm v0.2.11 -> v0.2.13
Removing object v0.32.2
Updating openssl-sys v0.9.107 -> v0.9.108
Adding owo-colors v4.2.0
Updating proc-macro2 v1.0.94 -> v1.0.95
Updating psm v0.1.25 -> v0.1.26
Updating rand v0.9.0 -> v0.9.1
Updating redox_syscall v0.5.11 -> v0.5.12
Updating rustix v1.0.5 -> v1.0.7
Updating sha2 v0.10.8 -> v0.10.9
Updating stacker v0.1.20 -> v0.1.21
Updating syn v2.0.100 -> v2.0.101
Updating synstructure v0.13.1 -> v0.13.2
Updating toml_datetime v0.6.8 -> v0.6.9
Adding windows v0.61.1
Adding windows-collections v0.2.0
Adding windows-future v0.2.0
Adding windows-numerics v0.2.0
Updating winnow v0.7.6 -> v0.7.9
Updating zerocopy v0.8.24 -> v0.8.25
Updating zerocopy-derive v0.8.24 -> v0.8.25
note: pass `--verbose` to see 33 unchanged dependencies behind latest
library dependencies:
Locking 2 packages to latest compatible versions
Removing allocator-api2 v0.2.21
Updating hashbrown v0.15.2 -> v0.15.3
Removing proc-macro2 v1.0.94
Removing quote v1.0.40
Updating rand v0.9.0 -> v0.9.1
Removing syn v2.0.100
Removing unicode-ident v1.0.18
Removing zerocopy v0.8.24
Removing zerocopy-derive v0.8.24
note: pass `--verbose` to see 3 unchanged dependencies behind latest
rustbook dependencies:
Locking 31 packages to latest compatible versions
Updating ammonia v4.0.0 -> v4.1.0
Updating anyhow v1.0.97 -> v1.0.98
Updating cc v1.2.19 -> v1.2.21
Updating chrono v0.4.40 -> v0.4.41
Updating clap v4.5.36 -> v4.5.37
Updating clap_builder v4.5.36 -> v4.5.37
Updating clap_complete v4.5.47 -> v4.5.48
Adding cssparser v0.35.0
Adding cssparser-macros v0.6.1
Adding dtoa v1.0.10
Adding dtoa-short v0.3.5
Updating hashbrown v0.15.2 -> v0.15.3
Updating html5ever v0.27.0 -> v0.31.0
Updating jiff v0.2.6 -> v0.2.12
Updating jiff-static v0.2.6 -> v0.2.12
Updating libc v0.2.171 -> v0.2.172
Updating markup5ever v0.12.1 -> v0.16.1
Adding match_token v0.1.0
Adding phf_macros v0.11.3
Updating proc-macro2 v1.0.94 -> v1.0.95
Updating redox_syscall v0.5.11 -> v0.5.12
Updating rustix v1.0.5 -> v1.0.7
Updating sha2 v0.10.8 -> v0.10.9
Updating syn v2.0.100 -> v2.0.101
Updating synstructure v0.13.1 -> v0.13.2
Updating toml v0.8.20 -> v0.8.22
Updating toml_datetime v0.6.8 -> v0.6.9
Updating toml_edit v0.22.24 -> v0.22.26
Adding toml_write v0.1.1
Adding web_atoms v0.1.1
Updating winnow v0.7.6 -> v0.7.9
```
|
|
|
|
|
|
Subtree update of `rust-analyzer`
r? ````@ghost````
|
|
|
|
|
|
|
|
Clean UI tests 4 of n
Cleaned up some tests that have `issue` in the title. I kept the commits to be one per "`issue`" cleanup/rename to make it easier to check. I can rebase to one commit once the changes are approved.
Related Issues:
#73494
#133895
r? jieyouxu
|
|
Rewrite on_unimplemented format string parser.
This PR rewrites the format string parser for `rustc_on_unimplemented` and `diagnostic::on_unimplemented`. I plan on moving this code (and more) into the new attribute parsing system soon and wanted to PR it separately.
This PR introduces some minor differences though:
- `rustc_on_unimplemented` on trait *implementations* is no longer checked/used - this is actually never used (outside of some tests) so I plan on removing it in the future.
- for `rustc_on_unimplemented`, it introduces the `{This}` argument in favor of `{ThisTraitname}` (to be removed later). It'll be easier to parse.
- for `rustc_on_unimplemented`, `Self` can now consistently be used as a filter, rather than just `_Self`. It used to not match correctly on for example `Self = "[{integer}]"`
- Some error messages now have better spans.
Fixes https://github.com/rust-lang/rust/issues/130627
|
|
|
|
Upgrade to `rustc-rayon-core` 0.5.1
* [Fix a race with deadlock detection](https://github.com/rust-lang/rustc-rayon/pull/15)
* [Cherry-pick changes from upstream rayon-core](https://github.com/rust-lang/rustc-rayon/pull/16)
- This also removes a few dependencies from rustc's tidy list.
|