Commit Graph

3019 Commits

Author SHA1 Message Date
Ralf Jung
8c0adc6716 update lockfile 2024-09-29 23:08:25 +02:00
github-actions
bfc9951fa8 cargo update
Locking 5 packages to latest compatible versions
    Updating autocfg v1.3.0 -> v1.4.0
    Updating flate2 v1.0.33 -> v1.0.34
    Updating portable-atomic v1.8.0 -> v1.9.0
    Updating syn v2.0.77 -> v2.0.79
    Updating tempfile v3.12.0 -> v3.13.0
note: pass `--verbose` to see 81 unchanged dependencies behind latest

library dependencies:
     Locking 0 packages to latest compatible versions
note: pass `--verbose` to see 9 unchanged dependencies behind latest

rustbook dependencies:
     Locking 13 packages to latest compatible versions
    Updating autocfg v1.3.0 -> v1.4.0
    Updating cc v1.1.21 -> v1.1.22
    Updating flate2 v1.0.33 -> v1.0.34
    Updating libc v0.2.158 -> v0.2.159
    Updating pkg-config v0.3.30 -> v0.3.31
    Updating redox_syscall v0.5.4 -> v0.5.6
    Updating serde_spanned v0.6.7 -> v0.6.8
    Updating syn v2.0.77 -> v2.0.79
    Updating tempfile v3.12.0 -> v3.13.0
    Updating thiserror v1.0.63 -> v1.0.64
    Updating thiserror-impl v1.0.63 -> v1.0.64
    Updating toml_edit v0.22.21 -> v0.22.22
    Updating winnow v0.6.18 -> v0.6.20
note: pass `--verbose` to see 30 unchanged dependencies behind latest
2024-09-29 00:22:29 +00:00
klensy
26c09b6553 bump few deps
cargo_metadata, thorin-dwp, windows
2024-09-27 09:23:05 +03:00
Trevor Gross
4a515bdf7b Run cargo update in the project root 2024-09-26 13:40:17 -04:00
bors
38352b01ae Auto merge of #130778 - flip1995:clippy-subtree-update, r=Manishearth
Clippy subtree update

r? `@Manishearth`

Really delayed sync (2 1/2 weeks), because of a `debug_assertion` we hit, and I didn't have the time to investigate earlier.

It would be nice to merge this PR with some priority, as it includes a lot of formatting changes due to the rustfmt bump.

Include Cargo.lock update due to Clippy version bump and ui_test bump in Clippy.
2024-09-25 11:40:41 +00:00
Trevor Gross
e95d15a115 Pin memchr to 2.5.0 in the library rather than rustc_ast
The latest versions of `memchr` experience LTO-related issues when
compiling for windows-gnu [1], so needs to be pinned. The issue is
present in the standard library.

`memchr` has been pinned in `rustc_ast`, but since the workspace was
recently split, this pin no longer has any effect on library crates.

Resolve this by adding `memchr` as an _unused_ dependency in `std`,
pinned to 2.5. Additionally, remove the pin in `rustc_ast` to allow
non-library crates to upgrade to the latest version.

Link: https://github.com/rust-lang/rust/issues/127890 [1]
2024-09-24 18:09:43 +02:00
Philipp Krones
907b6a1bc3
Update Cargo.lock 2024-09-24 11:58:12 +02:00
Yacin Tmimi
eeda9dd070 Merge commit 'b23b69900eab1260be510b2bd8922f4b6de6cf1e' into sync-from-rustfmt 2024-09-19 21:46:44 -04:00
Yacin Tmimi
b23b69900e chore: prep v1.8.0 release 2024-09-19 21:33:01 -04:00
Ralf Jung
ba86cf8686 update lockfile 2024-09-17 15:20:50 +02:00
klensy
2e66891370 remove unused tracing-attributes 2024-09-12 00:26:05 -04:00
bors
6d05f12170 Auto merge of #129346 - nnethercote:fix-double-handling-in-collect_tokens, r=petrochenkov
Fix double handling in `collect_tokens`

Double handling of AST nodes can occur in `collect_tokens`. This is when an inner call to `collect_tokens` produces an AST node, and then an outer call to `collect_tokens` produces the same AST node. This can happen in a few places, e.g. expression statements where the statement delegates `HasTokens` and `HasAttrs` to the expression. It will also happen more after #124141.

This PR fixes some double handling cases that cause problems, including #129166.

r? `@petrochenkov`
2024-09-08 05:35:23 +00:00
Matthias Krüger
8a60d0a5ec
Rollup merge of #101339 - the8472:ci-randomize-debug, r=Mark-Simulacrum
enable -Zrandomize-layout in debug CI builds

This builds rustc/libs/tools with `-Zrandomize-layout` on *-debug CI runners.

Only a handful of tests and asserts break with that enabled, which is promising. One test was fixable, the rest is dealt with by disabling them through new cargo features or compiletest directives.

The config.toml flag `rust.randomize-layout` defaults to false, so it has to be explicitly enabled for now.
2024-09-05 03:47:39 +02:00
Rémy Rakic
d30b5f0003 update object dependency to deduplicate wasmparser 2024-09-01 15:36:44 +00:00
Matthias Krüger
62b8fdb7da
Rollup merge of #129619 - sunshowers:update-stacker, r=Mark-Simulacrum
Update stacker to 0.1.17

The main new feature is support for detecting the current stack size on illumos. (See [my blog post] for the context which led to this.)

[my blog post]: https://sunshowers.io/posts/rustc-segfault-illumos/

try-job: x86_64-mingw
2024-09-01 03:58:04 +02:00
The 8472
5bf8eeb9f3 disable size asserts in the compiler when randomizing layouts 2024-08-31 23:56:45 +02:00
Alex Crichton
99558dc7f4 Update the wasm-component-ld binary dependency
This keeps it up-to-date by moving from 0.5.6 to 0.5.7. While here I've
additionally updated some other wasm-related dependencies in the
workspace to keep them up-to-date and try to avoid duplicate versions as
well.
2024-08-29 14:39:12 -07:00
Rain
ea6df5c147 Update stacker to 0.1.17
The main new feature is support for detecting the current stack size on
illumos. (See my blog post [1] for the context which led to this.)

[1]: https://sunshowers.io/posts/rustc-segfault-illumos/
2024-08-28 15:02:41 -07:00
Matthias Krüger
a8a242c0ec
Rollup merge of #129526 - compiler-errors:fx, r=lqd
Use `FxHasher` on new solver unconditionally

r? lqd

This should actually fix the inference problem in ad855fe6db, since `HashSet::default` was not inferring the hasher when `HashSet` was coming from the stdlib due to the way that defaulted types/inference vars work. You could cherry-pick this on top of your PR alternatively.
2024-08-26 01:49:02 +02:00
Michael Goulet
1c58522068 Use FxHasher on new solver unconditionally 2024-08-25 16:37:15 -04:00
Matthias Krüger
c6f7b1f390
Rollup merge of #129511 - GuillaumeGomez:update-minifier, r=notriddle
Update minifier to 0.3.1

It adds support for escaped characters.

PR is https://github.com/GuillaumeGomez/minifier-rs/pull/111.

r? ````@notriddle````
2024-08-25 16:51:06 +02:00
bors
89103466d7 Auto merge of #129531 - Jarcho:clippyup, r=Manishearth
Clippy subtree update

r? `@Manishearth`
2024-08-25 11:56:57 +00:00
Jason Newcomb
6c3f43d5cc Merge commit '0f8eabd6231366bfc1bb1464601297c2d48f8f68' into clippyup 2024-08-24 18:33:44 -04:00
Matthias Krüger
2a7f2da422
Rollup merge of #129290 - tgross35:pin-cc, r=Mark-Simulacrum
Pin `cc` to 1.0.105

`cc` 1.0.106 removes support for Visual Studio 12. Pin to 1.0.105 so we don't drop support yet.

Fixes: https://github.com/rust-lang/rust/pull/128722#issuecomment-2297605573
2024-08-24 22:14:13 +02:00
Guillaume Gomez
c36b5634cf Update minifier to 0.3.1 2024-08-24 18:34:28 +02:00
Nicholas Nethercote
1fdabfbebb Avoid double-handling of attributes in collect_tokens.
By keeping track of attributes that have been previously processed.

This fixes the `macro-rules-derive-cfg.stdout` test, and is necessary
for #124141 which removes nonterminals.

Also shrink the `SmallVec` inline size used in `IntervalSet`. 2 gives
slightly better perf than 4 now that there's an `IntervalSet` in
`Parser`, which is cloned reasonably often.
2024-08-24 06:57:47 +10:00
bors
eef00c8be8 Auto merge of #128507 - Oneirical:testart-from-scratch, r=jieyouxu
Migrate `libtest-thread-limit` `run-make` test to rmake

Part of #121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html).

Please try, but **only if normal CI is green**:

// try-job: armhf-gnu // <- failed on this
try-job: aarch64-gnu
2024-08-23 18:30:21 +00:00
Oneirical
318dfb405f rewrite libtest-thread-limit to rmake 2024-08-23 10:29:27 -04:00
bors
5ad98b4026 Auto merge of #129257 - ChrisDenton:rename-null-descriptor, r=jieyouxu
Allow rust staticlib to work with MSVC's /WHOLEARCHIVE

This fixes #129020 by renaming the `__NULL_IMPORT_DESCRIPTOR` to prevent conflicts.

try-job: dist-i686-msvc
2024-08-22 15:53:02 +00:00
Chris Denton
40af2143f1
Make import libraries compatible with wholearchive 2024-08-20 13:43:33 +00:00
Trevor Gross
a5f6c15571 Pin cc to 1.0.105
`cc` 1.0.106 removes support for Visual Studio 12. Pin to 1.0.105 so we
don't drop support yet.

Fixes: https://github.com/rust-lang/rust/pull/128722#issuecomment-2297605573
2024-08-19 22:24:46 -04:00
Xiretza
c864238baf Update annotate-snippets to 0.11 2024-08-19 20:22:07 +00:00
Trevor Gross
7240da01ee Run cargo update with the new v2 resolver
v2 resolves some dependencies differently, and we adjusted some
dependency versions. Run `cargo update` to make sure everything is in
sync.
2024-08-18 14:00:50 -05:00
许杰友 Jieyou Xu (Joe)
c4cf437fa1
Rollup merge of #129164 - ChrisDenton:comdat, r=jieyouxu
Use `ar_archive_writer` for writing COFF import libs on all backends

This is mostly the same as the llvm backend but with the cranelift version copy/pasted in place of the LLVM library.

try-job: x86_64-msvc
try-job: i686-msvc
try-job: i686-mingw
try-job: aarch64-gnu
try-job: aarch64-apple
try-job: test-various
try-job: armhf-gnu
2024-08-18 14:55:22 +08:00
Chris Denton
0156eb57a1
Always use ar_archive_writer for import libs 2024-08-17 19:10:46 +00:00
Guillaume Gomez
6b1637c477 Reexport serde_json crate from run-make-support to give it access to run-make tests 2024-08-16 16:32:07 +02:00
Josh Stone
ce67e68cce Update indexmap and use IndexMap::append 2024-08-13 16:16:57 -07:00
Philipp Krones
8be2688e45
Update Cargo.lock 2024-08-08 19:14:09 +02:00
Matthias Krüger
e34229508a
Rollup merge of #128353 - ferrocene:jonathanpallant/add-dependencies-to-copyright-file, r=Kobzol
Change generate-copyright to generate HTML, with cargo dependencies included

`x.py run generate-copyright` now produces `build/COPYRIGHT.html`. This includes a new format for in-tree dependencies, and also adds out-of-tree cargo dependencies.

After consulting expert opinion, I have elected to include every top-level:

* `*NOTICE*`
* `*AUTHOR*`
* `*LICENSE*`
* `*LICENCE*`, and
* `*COPYRIGHT*` file I can find - case-insensitive.

This is because the cargo package metadata's `author` field is not a list of copyright holders and does not meet the requirements of the Apache-2.0 license (which says you must include a NOTICE file with the binary if one was supplied by the author) nor the MIT license (which says you must include 'the above copyright notice').

I believe it would be appropriate to include this file with every Rust release, in order to do an even better job of appropriately recognising the efforts of the authors of the first-party and third-party libraries we are using here.

The output includes something like 524 copies of the Apache-2.0 text because they are not all identical. I think I count about 50 different variations by shasum - some differ in whitespace, while some have the boilerplate block at the bottom erroneously modified (don't modify the copy in the license, modify the copy you paste into your own source code!). Running `gzip` on the HTML file largely makes this problem go away, and the average browser is far happier with a ~6 MiB HTML file than the average Markdown viewer is with a ~6 MiB markdown file. But, if someone wants to, do they could submit a follow-up which de-dups the license text files and adds back-links to earlier identical copies (for some value of 'identical copy').

```console
$ xpy run generate-copyright
$ cd build
$ gzip -c COPYRIGHT.html > COPYRIGHT.gz
$ xz -c COPYRIGHT.html > COPYRIGHT.xz
$ ls -lh COPYRIGHT.*
-rw-r--r--  1 jonathan  staff   241K 29 Jul 17:19 COPYRIGHT.gz
-rw-r--r--@ 1 jonathan  staff   6.6M 29 Jul 11:30 COPYRIGHT.html
-rw-r--r--  1 jonathan  staff    59K 29 Jul 17:19 COPYRIGHT.xz
```

Here's an example [COPYRIGHT.gz](https://github.com/user-attachments/files/16416147/COPYRIGHT.gz).
2024-08-07 20:28:17 +02:00
Guillaume Gomez
355eb9c79f
Rollup merge of #128206 - bjorn3:import_lib_writing_refactor, r=jieyouxu
Make create_dll_import_lib easier to implement

This will make it easier to implement raw-dylib support in cg_clif and cg_gcc. This PR doesn't yet include an create_dll_import_lib implementation for cg_clif as I need to correctly implement dllimport in cg_clif first before raw-dylib can work at all with cg_clif.

Required for https://github.com/rust-lang/rustc_codegen_cranelift/issues/1345
2024-08-07 15:59:35 +02:00
bjorn3
f58e737554 Update ar_archive_writer to 0.3.3
Version 0.3.1 has added support for writing import libraries. Version
0.3.2 fixed creating archives containing members of import libraries.
Version 0.3.3 fixed building on big-endian systems.
2024-08-07 10:52:02 +00:00
Jonathan Pallant
4e24e9b1ad
Update to rinja 0.3 2024-08-06 12:03:37 +01:00
Jonathan Pallant
30ac7c9a81
generate-copyright: Render Node with rinja too. 2024-08-06 11:11:05 +01:00
Jonathan Pallant
dbab595d78
generate-copyright: use cargo-metadata 2024-08-06 11:04:55 +01:00
Jonathan Pallant
ba0d6c9739
Update generate-copyright
This tool now scans for cargo dependencies and includes any important looking license files.

We do this because cargo package metadata is not sufficient - the Apache-2.0 license says you have to include any NOTICE file, for example. And authors != copyright holders (cargo has the former, we must include the latter).
2024-08-06 11:04:55 +01:00
Ralf Jung
f6edc8a07c update lockfile 2024-08-05 20:39:56 +02:00
bors
176e545209 Auto merge of #128534 - bjorn3:split_stdlib_workspace, r=Mark-Simulacrum
Move the standard library to a separate workspace

This ensures that the Cargo.lock packaged for it in the rust-src component is up-to-date, allowing rust-analyzer to run cargo metadata on the standard library even when the rust-src component is stored in a read-only location as is necessary for loading crates.io dependencies of the standard library.

This also simplifies tidy's license check for runtime dependencies as it can now look at all entries in library/Cargo.lock without having to filter for just the dependencies of runtime crates. In addition this allows removing an exception in check_runtime_license_exceptions that was necessary due to the compiler enabling a feature on the object crate which pulls in a dependency not allowed for the standard library.

While cargo workspaces normally enable dependencies of multiple targets to be reused, for the standard library we do not want this reusing to prevent conflicts between dependencies of the sysroot and of tools that are built using this sysroot. For this reason we already use an unstable cargo feature to ensure that any dependencies which would otherwise be shared get a different -Cmetadata argument as well as using separate build dirs.

This doesn't change the situation around vendoring. We already have several cargo workspaces that need to be vendored. Adding another one doesn't change much.

There are also no cargo profiles that are shared between the root workspace and the library workspace anyway, so it doesn't add any extra work when changing cargo profiles.
2024-08-04 18:40:03 +00:00
Guillaume Gomez
cb7c596681 Update rinja version to 0.3.0 2024-08-04 01:08:10 +02:00
DianQK
8b9d7b1489
Simplify match based on the cast result of IntToInt. 2024-08-03 10:55:43 +08:00
bjorn3
1f3be75f56 Move the standard library to a separate workspace
This ensures that the Cargo.lock packaged for it in the rust-src
component is up-to-date, allowing rust-analyzer to run cargo metadata on
the standard library even when the rust-src component is stored in a
read-only location as is necessary for loading crates.io dependencies of
the standard library.

This also simplifies tidy's license check for runtime dependencies as it
can now look at all entries in library/Cargo.lock without having to
filter for just the dependencies of runtime crates. In addition this
allows removing an exception in check_runtime_license_exceptions that
was necessary due to the compiler enabling a feature on the object crate
which pulls in a dependency not allowed for the standard library.

While cargo workspaces normally enable dependencies of multiple targets
to be reused, for the standard library we do not want this reusing to
prevent conflicts between dependencies of the sysroot and of tools that
are built using this sysroot. For this reason we already use an unstable
cargo feature to ensure that any dependencies which would otherwise be
shared get a different -Cmetadata argument as well as using separate
build dirs.

This doesn't change the situation around vendoring. We already have
several cargo workspaces that need to be vendored. Adding another one
doesn't change much.

There are also no cargo profiles that are shared between the root
workspace and the library workspace anyway, so it doesn't add any extra
work when changing cargo profiles.
2024-08-02 10:48:12 +00:00
Guillaume Gomez
f44958679a Update sysinfo version to 0.31.2 2024-08-01 16:39:55 +02:00
Michael Howell
f3661dce09 rustdoc: word wrap CamelCase in the item list table
This is an alternative to ee6459d652.
That is, it fixes the issue that affects the very long type names
in https://docs.rs/async-stripe/0.31.0/stripe/index.html#structs.

This is, necessarily, a pile of nasty heuristics.
We need to balance a few issues:

- Sometimes, there's no real word break.
  For example, `BTreeMap` should be `BTree<wbr>Map`,
  not `B<wbr>Tree<wbr>Map`.

- Sometimes, there's a legit word break,
  but the name is tiny and the HTML overhead isn't worth it.
  For example, if we're typesetting `TyCtx`,
  writing `Ty<wbr>Ctx` would have an HTML overhead of 50%.
  Line breaking inside it makes no sense.
2024-07-29 08:45:50 -07:00
bors
80d8270d84 Auto merge of #125016 - nicholasbishop:bishop-cb-112, r=tgross35
Update compiler_builtins to 0.1.114

The `weak-intrinsics` feature was removed from compiler_builtins in https://github.com/rust-lang/compiler-builtins/pull/598, so dropped the `compiler-builtins-weak-intrinsics` feature from alloc/std/sysroot.

In https://github.com/rust-lang/compiler-builtins/pull/593, some builtins for f16/f128 were added. These don't work for all compiler backends, so add a `compiler-builtins-no-f16-f128` feature and disable it for cranelift and gcc.
2024-07-29 07:41:33 +00:00
Nicholas Bishop
ecf2963baf Update compiler_builtins to 0.1.114
The `weak-intrinsics` feature was removed from compiler_builtins in
https://github.com/rust-lang/compiler-builtins/pull/598, so dropped the
`compiler-builtins-weak-intrinsics` feature from alloc/std/sysroot.

In https://github.com/rust-lang/compiler-builtins/pull/593, some
builtins for f16/f128 were added. These don't work for all compiler
backends, so add a `compiler-builtins-no-f16-f128` feature and disable
it for cranelift and gcc. Also disable it for LLVM targets that don't
support it.
2024-07-28 20:43:07 -04:00
Guillaume Gomez
19feb90d69
Rollup merge of #127860 - klensy:dedup, r=Mark-Simulacrum
deps: dedup object, wasmparser, wasm-encoder

* dedups one `object`, additional dupe will be removed, with next `thorin-dwp` update
* `wasmparser` pinned to minor versions, so full merge isn't possible
* same with `wasm-encoder`

Turned off some features for `wasmparser` (see features https://github.com/bytecodealliance/wasm-tools/blob/v1.208.1/crates/wasmparser/Cargo.toml) in `run-make-support`, looks working?
2024-07-28 20:07:45 +02:00
klensy
58c9999f25 dedup object
waiting on thorin-dwp update

dedup one wasmparser

run-make-support: drop some features for wasmparser

dedupe wasm-encoder
2024-07-28 17:21:07 +03:00
bors
48bbe123c2 Auto merge of #128193 - flip1995:clippy-subtree-update, r=matthiaskrgr
Clippy subtree update

r? `@Manishearth`

Updates Cargo.lock due to the Clippy version update and the ui_test bump to v0.24
2024-07-26 03:36:34 +00:00
bors
2f26b2a99a Auto merge of #127042 - GrigorenkoPV:derivative, r=compiler-errors
Switch from `derivative` to `derive-where`

This is a part of the effort to get rid of `syn 1.*` in compiler's dependencies: #109302

Derivative has not been maintained in nearly 3 years[^1]. It also depends on `syn 1.*`.

This PR replaces `derivative` with `derive-where`[^2], a not dead alternative, which uses `syn 2.*`.

A couple of `Debug` formats have changed around the skipped fields[^3], but I doubt this is an issue.

[^1]: https://github.com/mcarton/rust-derivative/issues/117
[^2]: https://lib.rs/crates/derive-where
[^3]: See the changes in `tests/ui`
2024-07-25 22:50:58 +00:00
bors
7120fdac7a Auto merge of #126963 - runtimeverification:smir_serde_derive, r=celinval
Add basic Serde serialization capabilities to Stable MIR

This PR adds basic Serde serialization capabilities to Stable MIR. It is intentionally minimal (just wrapping all stable MIR types with a Serde `derive`), so that any important design decisions can be discussed before going further. A simple test is included with this PR to validate that JSON can actually be emitted.

## Notes

When I wrapped the Stable MIR error types in `compiler/stable_mir/src/error.rs`, it caused test failures (though I'm not sure why) so I backed those out.

## Future Work

So, this PR will support serializing basic stable MIR, but it _does not_ support serializing interned values beneath `Ty`s and `AllocId`s, etc... My current thinking about how to handle this is as follows:

1.  Add new `visited_X` fields to the `Tables` struct for each interned category of interest.

2.  As serialization is occuring, serialize interned values as usual _and_ also record the interned value we referenced in `visited_X`.

    (Possibly) In addition, if an interned value recursively references other interned values, record those interned values as well.

3.  Teach the stable MIR `Context` how to access the `visited_X` values and expose them with wrappers in `stable_mir/src/lib.rs` to users (e.g. to serialize and/or further analyze them).

### Pros

This approach does not commit to any specific serialization format regarding interned values or other more complex cases, which avoids us locking into any behaviors that may not be desired long-term.

### Cons

The user will need to manually handle serializing interned values.

### Alternatives

1.  We can directly provide access to the underlying `Tables` maps for interned values; the disadvantage of this approach is that it either requires extra processing for users to filter out to only use the values that they need _or_ users may serialize extra values that they don't need. The advantage is that the implementation is even simpler. The other pros/cons are similar to the above.

2.  We can directly serialize interned values by expanding them in-place. The pro is that this may make some basic inputs easier to consume. However, the cons are that there will need to be special provisions for dealing with cyclical values on both the producer and consumer _and_ global values will possibly need to be de-duplicated on the consumer side.
2024-07-25 20:27:51 +00:00
Philipp Krones
0949ff928a
Update Cargo.lock 2024-07-25 18:29:27 +02:00
Matthias Krüger
cce2db06c0
Rollup merge of #127528 - estebank:ascii-control-chars, r=oli-obk
Replace ASCII control chars with Unicode Control Pictures

Replace ASCII control chars like `CR` with Unicode Control Pictures like `␍`:

```
error: bare CR not allowed in doc-comment
  --> $DIR/lex-bare-cr-string-literal-doc-comment.rs:3:32
   |
LL | /// doc comment with bare CR: '␍'
   |                                ^
```

Centralize the checking of unicode char width for the purposes of CLI display in one place. Account for the new replacements. Remove unneeded tracking of "zero-width" unicode chars, as we calculate these in the `SourceMap` as needed now.
2024-07-25 04:43:19 +02:00
Guillaume Gomez
8d40b9ea6c Replace askama with rinja 2024-07-23 11:19:55 +02:00
Eric Huss
5dfa062b87 Move rustbook to its own workspace. 2024-07-22 07:20:57 -07:00
Trevor Gross
51827ce4e4 Move test-float-parse to the global workspace
Since `test-float-parse` is now implemented in Rust, we can move it into
the global workspace and check dependency licenses.
2024-07-20 11:39:34 -05:00
Esteban Küber
2d7795dfb9 Be more accurate about calculating display_col from a BytePos
No longer track "zero-width" chars in `SourceMap`, read directly from the line when calculating the `display_col` of a `BytePos`. Move `char_width` to `rustc_span` and use it from the emitter.

This change allows the following to properly align in terminals (depending on the font, the replaced control codepoints are rendered as 1 or 2 width, on my terminal they are rendered as 1, on VSCode text they are rendered as 2):

```
error: this file contains an unclosed delimiter
  --> $DIR/issue-68629.rs:5:17
   |
LL | ␜␟ts␀![{i
   |       -- unclosed delimiter
   |       |
   |       unclosed delimiter
LL | ␀␀  fn rݻoa>rݻm
   |                ^
```
2024-07-18 20:08:38 +00:00
Ralf Jung
e613bc92a1 const_to_pat: cleanup leftovers from when we had to deal with non-structural constants 2024-07-18 11:58:16 +02:00
bors
1a6e777c3c Auto merge of #126208 - Oneirical:one-flew-over-the-cuckoo's-test, r=jieyouxu
Migrate `compiler-lookup-paths`, `dump-mono-stats` and `prune-link-args` `run-make` tests to `rmake` or `ui` format

Part of #121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html).

try-job: x86_64-msvc
try-job: aarch64-apple
try-job: dist-x86_64-linux
try-job: armhf-gnu
2024-07-17 01:09:18 +00:00
Trevor Gross
4e4fa7eb37
Rollup merge of #126967 - alexcrichton:wasm32-wasip2-tier-2, r=Mark-Simulacrum
Promote the `wasm32-wasip2` target to Tier 2

This commit promotes the `wasm32-wasip2` Rust target to tier 2 as proposed in rust-lang/compiler-team#760. There are two major changes in this PR:

1. The `dist-various-2` container, which already produces the other WASI targets, now has an extra target added for `wasm32-wasip2`.
2. A new `wasm-component-ld` binary is added to all host toolchains when LLD is enabled. This is the linker used for the `wasm32-wasip2` target.

This new linker is added for all host toolchains to ensure that all host toolchains can produce the `wasm32-wasip2` target. This is similar to how `rust-lld` was originally included for all host toolchains to be able to produce WebAssembly output when the targets were first added. The new linker is developed [here][wasm-component-ld] and is pulled in via a crates.io-based dependency to the tree here.

[wasm-component-ld]: https://github.com/bytecodealliance/wasm-component-ld
2024-07-16 16:15:15 -05:00
Trevor Gross
63f239c89f
Rollup merge of #124033 - bjorn3:ar_archive_writer_0_3_0, r=davidtwco
Sync ar_archive_writer to LLVM 18.1.3

From LLVM 15.0.0-rc3. This adds support for COFF archives containing Arm64EC object files and has various fixes for AIX big archive files.
2024-07-16 16:15:13 -05:00
Oneirical
ea2b699b94 build_native_static_lib with llvm_ar for run_make_support 2024-07-16 15:34:04 -04:00
Mrmaxmeier
664907cab6 run-make-support: update gimli to 0.31.0 2024-07-16 11:01:35 +02:00
Pavel Grigorenko
168096f663 rustc_type_ir: derivative -> derive-where 2024-07-12 21:52:04 +03:00
Pavel Grigorenko
70a11c7ba9 rustc_next_trait_solver: derivative -> derive-where 2024-07-12 21:48:16 +03:00
Pavel Grigorenko
35ba700d5e rustc_span: derivative -> derive-where 2024-07-12 21:37:43 +03:00
Pavel Grigorenko
fd16a0efeb rustc_middle: derivative -> derive-where 2024-07-12 21:33:02 +03:00
Jakub Beránek
97990a4759
Move DropBomb from run-make-support to build_helper
So that it can be also used in bootstrap.
2024-07-12 20:14:37 +02:00
Urgau
977439d9b8 Use uplifted rustc-stable-hash crate in rustc_data_structures 2024-07-11 16:51:16 +02:00
Alex Crichton
2a3e22bf04 Promote the wasm32-wasip2 target to Tier 2
This commit promotes the `wasm32-wasip2` Rust target to tier 2 as
proposed in rust-lang/compiler-team#760. There are two major changes in
this PR:

1. The `dist-various-2` container, which already produces the other WASI
   targets, now has an extra target added for `wasm32-wasip2`.
2. A new `wasm-component-ld` binary is added to all host toolchains when
   LLD is enabled. This is the linker used for the `wasm32-wasip2` target.

This new linker is added for all host toolchains to ensure that all host
toolchains can produce the `wasm32-wasip2` target. This is similar to
how `rust-lld` was originally included for all host toolchains to be
able to produce WebAssembly output when the targets were first added.
The new linker is developed [here][wasm-component-ld] and is pulled in
via a crates.io-based dependency to the tree here.

[wasm-component-ld]: https://github.com/bytecodealliance/wasm-component-ld
2024-07-09 12:11:08 -07:00
bjorn3
58e551433d Sync ar_archive_writer to LLVM 18.1.3
From LLVM 15.0.0-rc3. This adds support for COFF archives containing
Arm64EC object files and has various fixes for AIX big archive files.
2024-07-07 16:56:35 +00:00
Michael Goulet
e5d6a416e8 Uplift PredicateEmittingRelation first 2024-07-06 10:05:49 -04:00
Michael Goulet
27588d1de3 Split SolverDelegate back out from InferCtxtLike 2024-07-05 16:39:39 -04:00
Chris Denton
34860a56f0
Update windows-bindgen to 0.58.0 2024-07-04 12:18:38 +00:00
Michael Howell
294c3dda88 rustdoc: add usable lint for pulldown-cmark-0.11 parsing changes 2024-07-01 07:21:02 -07:00
Michael Howell
15fbe618a1 rustdoc: update to pulldown-cmark 0.11 2024-06-30 18:33:48 -07:00
Matthias Krüger
515d17cd15
Rollup merge of #127131 - Kobzol:remove-unused-deps, r=compiler-errors
Remove unused `rustc_trait_selection` dependencies

Found using `cargo-machete`. The `bitflags` and `derivative` crates were added for the new trait solver, but weren't removed when the next trait solver code was uplifted to a separate crate.
2024-06-30 10:39:48 +02:00
Matthias Krüger
6d74ffd238
Rollup merge of #127002 - Kobzol:bootstrap-perf-tool, r=onur-ozkan
Implement `x perf` as a separate tool

Continues work from https://github.com/rust-lang/rust/pull/126318, adds a CLI for running `rustc-perf` profiling commands through a new `rustc-perf-wrapper` tool. The CLI is in a separate tool to enable experimentation outside of `bootstrap`.

This is probably most of what we can do so far, I'll add support for benchmarking once `rustc-perf` gets a terminal output for comparing benchmark results.

r? ``@onur-ozkan``
2024-06-29 22:10:56 +02:00
Jakub Beránek
e52d95bc82 Remove unused compiler dependencies 2024-06-29 22:09:58 +02:00
Oneirical
1795082842 rmeta_contains functions for remap-path-prefix 2024-06-28 16:30:17 -04:00
Adwin White
84071e2662 Support fetching Attribute of items. 2024-06-28 13:24:41 +08:00
Guillaume Gomez
3394fe89d8 Add ar command in run-make-support 2024-06-27 14:04:46 +02:00
Jakub Beránek
151986f493 Implement x perf as a separate tool 2024-06-27 10:22:03 +02:00
Stephen Skeirik
414ebeaeea add serde derive Serialize to stable_mir 2024-06-26 11:56:01 -04:00
DianQK
de0ece2f29
Add clang-format to the external tool check 2024-06-26 20:16:52 +08:00
Matthias Krüger
dcace866f0
Rollup merge of #126845 - rust-lang:cargo_update, r=Mark-Simulacrum
Weekly `cargo update`

Automation to keep dependencies in `Cargo.lock` current.

The following is the output from `cargo update`:

```txt
     Locking 9 packages to latest compatible versions
    Updating clap_complete v4.5.5 -> v4.5.6
    Updating displaydoc v0.2.4 -> v0.2.5
    Removing icu_collections v1.5.0
    Removing icu_normalizer v1.5.0
    Removing icu_normalizer_data v1.5.0
    Removing icu_properties v1.5.0
    Removing icu_properties_data v1.5.0
 Downgrading idna v1.0.0 -> v0.5.0 (latest: v1.0.1)
    Updating lazy_static v1.4.0 -> v1.5.0
    Updating miniz_oxide v0.7.3 -> v0.7.4
    Updating proc-macro2 v1.0.85 -> v1.0.86
    Updating syn v2.0.66 -> v2.0.67
      Adding unicode-bidi v0.3.15
    Updating url v2.5.1 -> v2.5.2
    Removing utf16_iter v1.0.5
    Removing utf8_iter v1.0.4
    Removing write16 v1.0.0
note: pass `--verbose` to see 85 unchanged dependencies behind latest
```
2024-06-24 06:27:15 +02:00
Matthias Krüger
f016552b1c
Rollup merge of #126230 - onur-ozkan:followup-126225, r=Mark-Simulacrum
tidy: skip submodules if not present for non-CI environments

Right now tidy requires rustc-perf to be fetched as it checks its license, but this doesn't make sense for most contributors since rustc-perf is a dist-specific tool and its license will not change frequently, especially during compiler development. This PR makes tidy to skip rustc-perf if it's not fetched and if it's not running in CI.

Applies https://github.com/rust-lang/rust/pull/126225#issuecomment-2158143674 and reverts #126225.
2024-06-23 22:38:58 +02:00
github-actions
990535723d cargo update
Locking 9 packages to latest compatible versions
    Updating clap_complete v4.5.5 -> v4.5.6
    Updating displaydoc v0.2.4 -> v0.2.5
    Removing icu_collections v1.5.0
    Removing icu_normalizer v1.5.0
    Removing icu_normalizer_data v1.5.0
    Removing icu_properties v1.5.0
    Removing icu_properties_data v1.5.0
 Downgrading idna v1.0.0 -> v0.5.0 (latest: v1.0.1)
    Updating lazy_static v1.4.0 -> v1.5.0
    Updating miniz_oxide v0.7.3 -> v0.7.4
    Updating proc-macro2 v1.0.85 -> v1.0.86
    Updating syn v2.0.66 -> v2.0.67
      Adding unicode-bidi v0.3.15
    Updating url v2.5.1 -> v2.5.2
    Removing utf16_iter v1.0.5
    Removing utf8_iter v1.0.4
    Removing write16 v1.0.0
note: pass `--verbose` to see 85 unchanged dependencies behind latest
2024-06-23 00:18:08 +00:00
Caleb Cartwright
ffad9842bd update rustfmt version 2024-06-22 16:22:00 -05:00
Caleb Cartwright
e4944185ae chore: bump version 2024-06-21 18:20:47 -05:00
Michael Goulet
ffd72b1700 Fix remaining cases 2024-06-21 19:00:18 -04:00
bors
25c9f2ca06 Auto merge of #123165 - oli-obk:no_ord_def_id3, r=cjgillot
Stop sorting `Span`s' `SyntaxContext`, as that is incompatible with incremental

work towards https://github.com/rust-lang/rust/issues/90317

Luckily no one actually needed these to be sorted, so it didn't even affect diagnostics. I'm guessing they'd have been sorted by creation time anyway, so it wouldn't really have mattered.

r? `@cjgillot`
2024-06-21 13:47:43 +00:00