Commit Graph

2067 Commits

Author SHA1 Message Date
Matthias Krüger
d3fae79178
Rollup merge of #113251 - chenyukang:yukang-fix-112940-smir, r=oli-obk
Use scoped-tls for SMIR to  map between TyCtxt and SMIR datastructures

Fixes #112940
r? `@oli-obk`
2023-07-04 17:46:27 +02:00
bors
cd68ead9ec Auto merge of #113303 - compiler-errors:yeet-chalk, r=lcnr
Remove chalk support from the compiler

Removes chalk (`-Ztrait-solver=chalk`) from the compiler and prunes any dead code resulting from this, mainly:
* Remove the chalk compatibility layer in `compiler/rustc_traits/src/chalk`
* Remove the chalk flag `-Ztrait-solver=chalk` and its `TraitEngine` implementation
* Remove `TypeWellFormedFromEnv` (and its many `bug!()` match arms)
* Remove the chalk migration mode from compiletest
* Remove the `chalkify` UI tests (do we want to keep any of these, but migrate them to `-Ztrait-solver=next`??)

Fulfills rust-lang/types-team#93.

r? `@jackh726`
2023-07-04 09:09:09 +00:00
Michael Goulet
810fbf086d Remove chalk from the compiler 2023-07-03 21:40:04 +00:00
Josh Stone
d9b1fa93c4 Upgrade to indexmap 2.0.0
The new version was already added to the tree as an indirect dependency
in #113046, but now our direct dependents are using it too.
2023-07-03 13:51:54 -07:00
lcnr
5378f07d64 use deeply_normalize for assumed_wf_types 2023-07-03 09:12:14 +02:00
Jubilee Young
079949da8e Update std to backtrace 0.3.68
Dedup addr2line, miniz_oxide, object in .lock
2023-07-02 17:02:45 -07:00
Nilstrieb
1e5d8fbcc9 downgrade compiler_builtins
The outline-atomics support in compiler_builtins messed up and wasn't limited to linux only.
https://github.com/rust-lang/compiler-builtins/pull/532/files#r1249354225
2023-07-02 21:02:31 +02:00
Nilstrieb
fd49b1d37f Downgrade rustix
See https://github.com/rust-lang/rust/pull/113046#issuecomment-1616094626.
2023-07-02 21:02:31 +02:00
Nilstrieb
171be8ce94 Downgrade tracing and syn
There's currently a deadlock with tracing when RUSTC_LOG is enabled.
Downgrade tracing-core for now to avoid blocking the other updates.

syns upgrades cause some nontrivial changes in the diagnostics derive tests,
which are best dealt with in another PR.
2023-07-02 21:02:31 +02:00
Nilstrieb
3295cdfff4 cargo update
Additional deps:
equivalent: indexmap
nu-ansi-term: tracing
overload: nu-ansi-term
2023-07-02 20:41:03 +02:00
bors
32d81eccd6 Auto merge of #113260 - flip1995:clippyup, r=Manishearth
Update Clippy

r? `@Manishearth`

cc `@oli-obk` (for the ui-test changes in de69d556eb and the valtree fix in 0cbe963e51)

Fixes https://github.com/rust-lang/rust/issues/102093

This must've been the most involved Clippy sync ever.
2023-07-02 15:14:59 +00:00
Philipp Krones
a6d3c82360
Update Cargo.lock 2023-07-02 15:07:47 +02:00
Matthias Krüger
fda22efbf0
Rollup merge of #113233 - Nilstrieb:chaaalk, r=jackh726
Update chalk

For #109302

r? jackh726
2023-07-02 10:27:21 +02:00
bors
8e2d5e3a58 Auto merge of #112910 - lqd:mcp510, r=petrochenkov
Implement most of MCP510

This implements most of what remains to be done for MCP510:
- turns `-C link-self-contained` into a `+`/`-` list of components, like `-C link-self-contained=+linker,+crto,+libc,+unwind,+sanitizers,+mingw`. The scaffolding is present for all these expected components to be implemented and stabilized in the future on their own time. This PR only handles the `-Zgcc-ld=lld` subset of these link-self-contained components as  `-Clink-self-contained=+linker`
- handles  `-C link-self-contained=y|n`  as-is today, for compatibility with `rustc_codegen_ssa:🔙🔗:self_contained`'s [explicit opt-in and opt-out](9eee230cd0/compiler/rustc_codegen_ssa/src/back/link.rs (L1671-L1676)).
- therefore supports our plan to opt out of `rust-lld` (when it's enabled by default) even for current `-Clink-self-contained` users, with e.g. `-Clink-self-contained -Clink-self-contained=-linker`
- turns `add_gcc_ld_path` into its expected final form, by using the `-C link-self-contained=+linker`  CLI flag, and whether the `LinkerFlavor`  has the expected `Cc::Yes` and `Lld::Yes` shape (this is not yet the case in practice for any CLI linker flavor)
- makes the [new clean linker flavors](https://github.com/rust-lang/rust/pull/96827#issuecomment-1208441595) selectable in the CLI in addition to the legacy ones, in order to opt-in to using `cc` and `lld` to emulate `-Zgcc-ld=lld`
- ensure the new `-C link-self-contained` components, and `-C linker-flavor`s are unstable, and require `-Z unstable-options` to be used

The up-to-date set of flags for the future stable CLI version of `-Zgcc-ld=lld` is currently: `-Clink-self-contained=+linker -Clinker-flavor=gnu-lld-cc -Zunstable-options`.

It's possible we'll also need to do something for distros that don't ship `rust-lld`, but maybe there are already no tool search paths to be added to `cc` in this situation anyways.

r? `@petrochenkov`
2023-07-02 02:25:01 +00:00
yukang
361df86a8d Use scoped-tls for SMIR to map between TyCtxt and SMIR datastructures 2023-07-02 07:48:41 +08:00
Nilstrieb
e43ec03968 Update chalk 2023-07-01 18:03:36 +02:00
Caleb Cartwright
75a6675bc9 update rustfmt version in lockfile 2023-07-01 02:50:52 -05:00
Rémy Rakic
5d91c1ced4 add dedicated -C link-self-contained structure 2023-06-30 20:37:24 +00:00
bors
af9df2fd91 Auto merge of #106619 - agausmann:avr-object-file, r=nagisa
Fix unset e_flags in ELF files generated for AVR targets

Closes #106576

~~Sort-of blocked by gimli-rs/object#500~~ (merged)

I'm not sure whether the list of AVR CPU names is okay here. Maybe it could be moved out-of-line to improve the readability of the function.
2023-06-30 08:55:56 +00:00
Ralf Jung
a3cea7f179 update lockfile 2023-06-29 09:31:47 +02:00
Dylan DPC
fa56e01b35
Rollup merge of #111571 - jhpratt:proc-macro-span, r=m-ou-se
Implement proposed API for `proc_macro_span`

As proposed in [#54725 (comment)](https://github.com/rust-lang/rust/issues/54725#issuecomment-1546918161). I have omitted the byte-level API as it's already available as [`Span::byte_range`](https://doc.rust-lang.org/nightly/proc_macro/struct.Span.html#method.byte_range).

`@rustbot` label +A-proc-macros

r? `@m-ou-se`
2023-06-28 18:28:46 +05:30
bors
06c58cb966 Auto merge of #112884 - klensy:ri-drop-old-clap, r=albertlarsan68
rust-installer: migrate to clap 4.2, change to 2021 edition and fix few clippy lints

Updated rust-installer to clap 4.2, dropping last user of clap v3; changes to 2021 edition, fixes few clippy warns.
2023-06-26 03:21:01 +00:00
Michael Goulet
ee8b035fab
Rollup merge of #112763 - Patryk27:bump-compiler-builtins, r=Amanieu
Bump compiler_builtins

Actually closes https://github.com/rust-lang/rust/issues/108489.

Note that the example code given [in compiler_builtins](https://github.com/rust-lang/compiler-builtins/pull/527) doesn't compile on current rustc since we're still waiting for https://reviews.llvm.org/D153197 (aka `LLVM ERROR: Expected a constant shift amount!`), but it's a step forward anyway.
2023-06-23 19:47:20 -07:00
klensy
e1c3313d38 rust-installer: drop clap v3, migrate to v4 2023-06-21 12:32:34 +03:00
David Tolnay
21d9fd77f4
Delete use of proc_macro_span_shrink from proc-macro2 2023-06-20 19:53:06 -04:00
David Tolnay
cd1c1b1a9f
Update to proc-macro2 1.0.57 to unblock proc_macro_span changes 2023-06-20 19:40:26 -04:00
Caleb Cartwright
aca66a20c6 update lockfile for rustfmt sync 2023-06-19 23:19:48 -05:00
Patryk Wychowaniec
70ce2139e8
Bump compiler_builtins 2023-06-18 13:29:36 +02:00
The 8472
479be6ac43 update hashbrown and replace Hash{Set,Map}::DrainFilter with ExtractIf 2023-06-14 09:28:56 +02:00
Matthias Krüger
e3656ff9fd
Rollup merge of #112298 - est31:update_field_offset, r=Mark-Simulacrum
Update field-offset and enable unstable_offset_of

This makes the compiler use the builtin `offset_of!()` macro, through the wrappers in memoffset and then in field-offset.

cc  #111839
2023-06-10 15:24:43 +02:00
bors
343ad6f059 Auto merge of #111626 - pjhades:output, r=b-naber
Write to stdout if `-` is given as output file

With this PR, if `-o -` or `--emit KIND=-` is provided, output will be written to stdout instead. Binary output (those of type `obj`, `llvm-bc`, `link` and `metadata`) being written this way will result in an error unless stdout is not a tty. Multiple output types going to stdout will trigger an error too, as they will all be mixded together.

This implements https://github.com/rust-lang/compiler-team/issues/431

The idea behind the changes is to introduce an `OutFileName` enum that represents the output - be it a real path or stdout - and to use this enum along the code paths that handle different output types.
2023-06-09 09:45:40 +00:00
Jing Peng
9b1a1e1d95 Write to stdout if - is given as output file
If `-o -` or `--emit KIND=-` is provided, output will be written
to stdout instead. Binary output (`obj`, `llvm-bc`, `link` and
`metadata`) being written this way will result in an error unless
stdout is not a tty. Multiple output types going to stdout will
trigger an error too, as they will all be mixded together.
2023-06-06 17:53:29 -04:00
Nikolay Arhipov
032857e7e4 Bumped libc version 2023-06-06 16:09:05 +03:00
Nikolay Arhipov
50117af409 Std support improvement for ps vita target 2023-06-05 19:14:09 +03:00
est31
b048396f44 Update field-offset and enable unstable_offset_of
This enables usage of the offset_of!() macro in the compiler,
through the wrappers in memoffset and then in field-offset.
2023-06-05 15:57:13 +02:00
bors
dff88b2064 Auto merge of #112217 - arlosi:update-vuln-deps, r=Mark-Simulacrum
Update dependencies with reported vulnerabilities

Vulnerable dependencies:
* bumpalo 3.12.1 (yanked)
  * updated to 3.13.0
* tokio 1.8.4 - https://rustsec.org/advisories/RUSTSEC-2023-0001
  * updated to 1.28.2
* remove_dir_all 0.5.3 - https://rustsec.org/advisories/RUSTSEC-2023-0018
  * removed by using the standard library function in `rust-installer` instead and updating to `tempfile@3.5.0` (which also removes the dependency).

The new dependencies come from `tempfile@3.5.0` which adds the dependency on `rustix`
2023-06-03 01:59:14 +00:00
Arlo Siemsen
4d9b476bb1 Update dependencies with reported vulnerabilities
bumpalo 3.12.1 (yanked)
  * updated to 3.13.0
tokio 1.8.4 - https://rustsec.org/advisories/RUSTSEC-2023-0001
  * updated to 1.28.2
remove_dir_all 0.5.3 - https://rustsec.org/advisories/RUSTSEC-2023-0018
  * removed by using the standard library function in `rust-installer` instead and updating to `tempfile@3.5.0` (which also removes the dependency).
2023-06-02 12:34:01 -05:00
Matthias Krüger
a3b639ce43
Rollup merge of #111647 - klensy:cstr, r=oli-obk
use c literals in compiler and library

Use c literals #108801 in compiler and library

currently blocked on:
* <strike>rustfmt: don't know how to format c literals</strike> nope, nightly one works.
* <strike>bootstrap</strike>

r? `@ghost`
`@rustbot` blocked
2023-06-02 18:12:45 +02:00
Philipp Krones
612c342346
Update Cargo.lock 2023-06-02 11:42:42 +02:00
klensy
a17561ffc9 use new c literals instead of cstr! macro 2023-05-31 19:40:24 +03:00
Matthias Krüger
183a31be85
Rollup merge of #112084 - ozkanonur:improvements, r=clubby789
enhancements on  build_helper utilization and rustdoc-gui-test

This change provides codebase improvements, resolves `FIXME` in `rustdoc-gui-test` and makes `rustdoc-gui` test able to find local `node_modules` directory outside of the source root.
2023-05-31 07:07:01 +02:00
ozkanonur
c64db2cfa7 use build_helper::util::try_run in rustdoc-gui-test
Signed-off-by: ozkanonur <work@onurozkan.dev>
2023-05-30 10:54:40 +03:00
bors
165cddafe9 Auto merge of #111989 - klensy:deps-up-26-05-23, r=Mark-Simulacrum
deps: bump crates

Updates few deps:

drops a lot of cxx* crates:
```console
$ cargo update -p iana-time-zone-haiku
    Updating crates.io index
    Updating cc v1.0.77 -> v1.0.79
    Removing codespan-reporting v0.11.1
    Removing cxx v1.0.94
    Removing cxx-build v1.0.94
    Removing cxxbridge-flags v1.0.94
    Removing cxxbridge-macro v1.0.94
    Updating iana-time-zone-haiku v0.1.1 -> v0.1.2
    Removing link-cplusplus v1.0.8
    Removing scratch v1.0.5
```
cc: https://github.com/rust-lang/cc-rs/releases/tag/1.0.78, https://github.com/rust-lang/cc-rs/releases/tag/1.0.79
iana-time-zone-haiku: https://github.com/strawlab/iana-time-zone/releases/tag/haiku%2Fv0.1.2

fixed https://github.com/crossbeam-rs/crossbeam/pull/972 (similar fixed in rust repo https://github.com/rust-lang/rust/pull/110089)
```console
$ cargo update -p crossbeam-channel
    Updating crates.io index
    Updating crossbeam-channel v0.5.6 -> v0.5.8
```
https://github.com/crossbeam-rs/crossbeam/blob/master/crossbeam-channel/CHANGELOG.md#version-058

dedupes memoffset versions:
```console
$ cargo update -p crossbeam-epoch
    Updating crates.io index
    Updating crossbeam-epoch v0.9.13 -> v0.9.14
    Removing memoffset v0.7.1
```
https://github.com/crossbeam-rs/crossbeam/blob/master/crossbeam-epoch/CHANGELOG.md#version-0914
https://github.com/Gilnaa/memoffset/compare/v0.6.5...v0.8.0
https://github.com/rust-lang/rust/pull/108638#discussion_r1193157265

dedupes bstr versions
```console
$ cargo update -p ignore -p opener
    Updating crates.io index
    Removing bstr v0.2.17
    Updating globset v0.4.9 -> v0.4.10
    Updating ignore v0.4.18 -> v0.4.20
    Updating opener v0.5.0 -> v0.5.2
```

globset ac8fecbbf2
ignore https://github.com/BurntSushi/ripgrep/commits/master/crates/ignore hard to track, but drop dep on crossbeam-utils (e95254a86f), don't stat git if require_git is false (009dda1488) and added bunch of formats to ignore list
opener https://github.com/Seeker14491/opener/compare/v0.5.0...v0.5.2 nothing interesting
2023-05-30 01:28:54 +00:00
Deadbeef
ab7c4b76b3 bump thiserror to use syn 2.0 2023-05-28 05:38:03 +00:00
bors
dbfc95f969 Auto merge of #111348 - ozkanonur:remove-hardcoded-rustdoc-flags, r=albertlarsan68,oli-obk
new tool `rustdoc-gui-test`

Implements new tool `rustdoc-gui-test` that allows using compiletest headers for `rustdoc-gui` tests.
2023-05-27 04:20:44 +00:00
klensy
9b6a6b13c5 deps: bump crates
update iana-time-zone-haiku to drop bumch of cxx* deps
cargo update -p iana-time-zone-haiku
    Updating crates.io index
    Updating cc v1.0.77 -> v1.0.79
    Removing codespan-reporting v0.11.1
    Removing cxx v1.0.94
    Removing cxx-build v1.0.94
    Removing cxxbridge-flags v1.0.94
    Removing cxxbridge-macro v1.0.94
    Updating iana-time-zone-haiku v0.1.1 -> v0.1.2
    Removing link-cplusplus v1.0.8
    Removing scratch v1.0.5

fixes known issue https://github.com/crossbeam-rs/crossbeam/pull/972
cargo update -p crossbeam-channel
    Updating crates.io index
    Updating crossbeam-channel v0.5.6 -> v0.5.8

dedupes memoffset versions
cargo update -p crossbeam-epoch
    Updating crates.io index
    Updating crossbeam-epoch v0.9.13 -> v0.9.14
    Removing memoffset v0.7.1

dedupes bstr versions
cargo update -p ignore -p opener
    Updating crates.io index
    Removing bstr v0.2.17
    Updating globset v0.4.9 -> v0.4.10
    Updating ignore v0.4.18 -> v0.4.20
    Updating opener v0.5.0 -> v0.5.2
2023-05-26 13:03:47 +03:00
Michael Goulet
bd7e8b5ef9
Rollup merge of #111152 - lukas-code:markdown-parsers-are-hard, r=GuillaumeGomez
update `pulldown-cmark` to `0.9.3`

This PR updates `pulldown-cmark` to version `0.9.3`, which does two main things:
* Pulls in https://github.com/raphlinus/pulldown-cmark/pull/643 to fix https://github.com/rust-lang/rust/issues/111117
* Allows parsing strikethrough with single tildes, e.g. `~foo~` -> ~foo~. This matches the [GFM spec](https://github.github.com/gfm/#strikethrough-extension-).

Full changelog: https://github.com/raphlinus/pulldown-cmark/pull/646
2023-05-25 13:57:59 -07:00
Manish Goregaokar
33ded73c76
Rollup merge of #111876 - danakj:builtins92, r=Mark-Simulacrum
Roll compiler_builtins to 0.1.92

This pulls in the weak-intrinsics feature (which currently defaults off), and a minor version update to libm for the compiler_builtins crate to 0.2.7.
2023-05-24 15:05:04 -07:00
bors
5ea3f0ae08 Auto merge of #111867 - RalfJung:miri, r=RalfJung
update Miri
2023-05-23 21:09:20 +00:00
danakj
0e89b1b5fe Roll compiler_builtins to 0.1.92
This pulls in the weak-intrinsics feature (which currently
defaults off), and a minor version update to libm for the
compiler_builtins crate to 0.2.7.
2023-05-23 11:14:50 -04:00