Commit Graph

2400 Commits

Author SHA1 Message Date
Guillaume Gomez ad74598dbc
Rollup merge of #121765 - hermit-os:errno, r=ChrisDenton
add platform-specific function to get the error number for HermitOS

Extending `std` to get the last error number for HermitOS.

HermitOS is a tier 3 platform and this PR changes only files, wich are related to the tier 3 platform.
2024-02-29 14:33:51 +01:00
Stefan Lankes 3726cbb5fe add platform-specific function to get the error number for HermitOS
Extending `std` to get the last error number for HermitOS.

HermitOS is a tier 3 platform and this PR changes only files,
wich are related to the tier 3 platform.
2024-02-28 23:01:56 +01:00
Guillaume Gomez a62cfe04d6
Rollup merge of #121695 - oli-obk:split_ty_utils, r=compiler-errors
Split rustc_type_ir to avoid rustc_ast from depending on it

unblocks #121576

and resolves a FIXME in `rustc_ast`'s `Cargo.toml`

The new crate is tiny, but it will get bigger in #121576
2024-02-28 16:04:53 +01:00
Oli Scherer 8a6d3535f7 Split rustc_type_ir to avoid rustc_ast from depending on it 2024-02-27 18:11:23 +00:00
Philipp Krones f99056bd87
Update Cargo.lock 2024-02-27 15:50:23 +01:00
bors b0d3e04ca9 Auto merge of #120393 - Urgau:rfc3373-non-local-defs, r=WaffleLapkin
Implement RFC 3373: Avoid non-local definitions in functions

This PR implements [RFC 3373: Avoid non-local definitions in functions](https://github.com/rust-lang/rust/issues/120363).
2024-02-25 19:11:06 +00:00
bors 710048f790 Auto merge of #121579 - RalfJung:miri, r=RalfJung
Miri subtree update

r? `@ghost`
2024-02-25 08:20:01 +00:00
Ralf Jung 9577051174 bump rustc-build-sysroot 2024-02-25 08:17:20 +01:00
Alex Crichton 646e8e7291 rustc: Fix wasm64 metadata object files
It looks like LLD will detect object files being either 32 or 64-bit
depending on any memory present. LLD will additionally reject 32-bit
objects during a 64-bit link. Previously metadata objects did not have
any memories in them which led LLD to conclude they were 32-bit objects
which broke 64-bit targets for wasm.

This commit fixes this by ensuring that for 64-bit targets there's a
memory object present to get LLD to detect it's a 64-bit target.
Additionally this commit moves away from a hand-crafted wasm encoder to
the `wasm-encoder` crate on crates.io as the complexity grows for the
generated object file.

Closes #121460
2024-02-23 13:13:01 -08:00
bors 6dadb6eb23 Auto merge of #121448 - klensy:bump-22-02-24, r=clubby789
bump few deps

Bumps `sysinfo`, `tabled`; dedupes `env_logger`; drops `is-terminal`
https://github.com/zhiburt/tabled/blob/v0.15.1/CHANGELOG.md
https://github.com/GuillaumeGomez/sysinfo/blob/v0.30.5/CHANGELOG.md
2024-02-23 07:42:50 +00:00
klensy 53efefb3c2 dedupe env_logger, drop is-terminal 2024-02-22 14:35:21 +03:00
klensy 15bc68118f bump tabled 2024-02-22 14:17:59 +03:00
klensy 0b44330c38 bump sysinfo 2024-02-22 14:01:13 +03:00
Matthias Krüger 64dbc3f38f
Rollup merge of #121392 - bjorn3:unify_dylib_loading, r=petrochenkov
Unify dylib loading between proc macros and codegen backends

As bonus this makes the errors when failing to load a proc macro more informative to match the backend loading errors. In addition it makes it slightly easier to patch rustc to work on platforms that don't support dynamic linking like wasm.
2024-02-21 22:48:59 +01:00
bjorn3 f25c90a83f Unify dylib loading between proc macros and codegen backends
As bonus this makes the errors when failing to load a proc macro more
informative to match the backend loading errors. In addition it makes it
slightly easier to patch rustc to work on platforms that don't support
dynamic linking like wasm.
2024-02-21 11:17:07 +00:00
Alex Crichton 6181f3a566 wasm: Store rlib metadata in wasm object files
The goal of this commit is to remove warnings using LLVM tip-of-tree
`wasm-ld`. In llvm/llvm-project#78658 the `wasm-ld` LLD driver no longer
looks at archive indices and instead looks at all the objects in
archives. Previously `lib.rmeta` files were simply raw rustc metadata
bytes, not wasm objects, meaning that `wasm-ld` would emit a warning
indicating so.

WebAssembly targets previously passed `--fatal-warnings` to `wasm-ld` by
default which meant that if Rust were to update to LLVM 18 then all wasm
targets would not work. This immediate blocker was resolved in
rust-lang/rust#120278 which removed `--fatal-warnings` which enabled a
theoretical update to LLVM 18 for wasm targets. This current state is
ok-enough for now because rustc squashes all linker output by default if
it doesn't fail. This means, for example, that rustc squashes all the
linker warnings coming out of `wasm-ld` about `lib.rmeta` files with
LLVM 18. This again isn't a pressing issue because the information is
all hidden, but it runs the risk of being annoying if another linker
error were to happen and then the output would have all these unrelated
warnings that couldn't be fixed.

Thus, this PR comes into the picture. The goal of this PR is to resolve
these warnings by using the WebAssembly object file format on wasm
targets instead of using raw rustc metadata. When I first implemented
the rlib-in-objects scheme in #84449 I remember either concluding that
`wasm-ld` would either include the metadata in the output or I thought
we didn't have to do anything there at all. I think I was wrong on both
counts as `wasm-ld` does not include the metadata in the final output
unless the object is referenced and we do actually need to do something
to resolve these warnings.

This PR updates the object file format containing rustc metadata on
WebAssembly targets to be an actual WebAssembly file. This enables the
`wasm` feature of the `object` crate to be able to read the custom
section in the same manner as other platforms, but currently `object`
doesn't support writing wasm object files so a handwritten encoder is
used instead.

The only caveat I know of with this is that if `wasm-ld` does indeed
look at the object file then the metadata will be included in the final
output. I believe the only thing that could cause that at this time is
`--whole-archive` which I don't think is passed for rlibs. I would
clarify that I'm not 100% certain about this, however.
2024-02-20 09:31:50 -08:00
bors c9c83cca51 Auto merge of #121265 - klensy:bump-18-02-24, r=Mark-Simulacrum
bump some deps

First commit dedupes darling* crates and remove one more syn 1.* dep
Second one bumps windows crate to 0.52
2024-02-18 16:54:15 +00:00
klensy 35fe26757a windows bump to 0.52 2024-02-18 16:02:16 +03:00
klensy 5e2a7ac47a opt-dist: bump derive_builder to dedupe darling* and remove one more syn 1.* dep 2024-02-18 14:40:19 +03:00
bors 12b5498f3b Auto merge of #120023 - klensy:tidy-alloc, r=Mark-Simulacrum
tidy: reduce allocs

this reduces allocs in tidy from (dhat output)

```
==31349== Total:     1,365,199,543 bytes in 4,774,213 blocks
==31349== At t-gmax: 10,975,708 bytes in 66,093 blocks
==31349== At t-end:  2,880,947 bytes in 12,332 blocks
==31349== Reads:     5,210,008,956 bytes
==31349== Writes:    1,280,920,127 bytes
```
to
```
==66633== Total:     791,565,538 bytes in 3,503,144 blocks
==66633== At t-gmax: 10,914,511 bytes in 65,997 blocks
==66633== At t-end:  395,531 bytes in 941 blocks
==66633== Reads:     4,249,388,949 bytes
==66633== Writes:    814,119,580 bytes
```

<del>by wrapping regex and updating `ignore` (effect probably not only from `ignore`, didn't measured)</del>

also moves one more regex into `Lazy` to reduce regex rebuilds.
2024-02-17 16:22:44 +00:00
Urgau 6170394313 Implement RFC3373 non local definitions lint 2024-02-17 13:59:45 +01:00
Ralf Jung fd5a84b529 update lockfile 2024-02-17 13:02:04 +01:00
klensy 12f9de7d0e tidy: wrap regexes with lazy_static
yes, once_cell better, but ...

this reduces from

==31349== Total:     1,365,199,543 bytes in 4,774,213 blocks
==31349== At t-gmax: 10,975,708 bytes in 66,093 blocks
==31349== At t-end:  2,880,947 bytes in 12,332 blocks
==31349== Reads:     5,210,008,956 bytes
==31349== Writes:    1,280,920,127 bytes

to

==47796== Total:     821,467,407 bytes in 3,955,595 blocks
==47796== At t-gmax: 10,976,209 bytes in 66,100 blocks
==47796== At t-end:  2,944,016 bytes in 12,490 blocks
==47796== Reads:     4,788,959,023 bytes
==47796== Writes:    975,493,639 bytes

miropt-test-tools: remove regex usage

this removes regex usage and slightly refactors ext stripping in one case
2024-02-17 12:29:05 +03:00
Matthias Krüger 71466ca804
Rollup merge of #120982 - momvart:smir-61-foreign_kind, r=oli-obk
Add APIs for fetching foreign items

Closes https://github.com/rust-lang/project-stable-mir/issues/61
2024-02-15 09:20:18 +01:00
clubby789 9b73db3f1c `cargo update` 2024-02-13 21:24:16 +00:00
clubby789 ed8850010a Bump `proc-macro2`, `syn` and `quote`
This disables the `proc_macro_span` feature which unfortunately makes our
diagnostic derive macro diagnostics a little worse.
2024-02-13 21:03:34 +00:00
clubby789 6ac3b57fc8 Bump `time` and allow new dependencies 2024-02-13 21:03:34 +00:00
clubby789 4de3a3af4a Bump `indexmap`
`swap` has been deprecated in favour of `swap_remove` - the behaviour
is the same though.
2024-02-13 21:03:34 +00:00
Nikita Popov edfbe6351d Update compiler-builtins
This is necessary to pull in a number of compiler-rt build fixes.
2024-02-13 10:33:40 +01:00
Mohammad Omidvar 213748749e Add APIs for fetching foreign items including foreign modules, their ABIs, and their items 2024-02-12 19:44:35 +00:00
Matthias Krüger 9bbd146e86
Rollup merge of #120729 - ehuss:update-mdbook, r=Mark-Simulacrum
Update mdbook to 0.4.37

This updates mdbook to 0.4.37.
Changelog: https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-0437

The primary change is the update to pulldown-cmark which has a large number of markdown parsing changes. There shouldn't be any significant changes to the rendering of any of the books (I have posted some PRs to fix some minor issues to the ones that were affected).
2024-02-11 08:25:43 +01:00
Matthias Krüger 317c372284
Rollup merge of #120846 - petrochenkov:jobs, r=oli-obk
Update jobserver-rs to 0.1.28

Fixes the issues found in https://github.com/rust-lang/rust/issues/120515 besides the diagnostic wording.
2024-02-10 00:58:38 +01:00
Matthias Krüger 5250abaeb8
Rollup merge of #120806 - flip1995:clippy-subtree-update, r=Manishearth
Clippy subtree update

r? `@Manishearth`
2024-02-09 19:21:17 +01:00
Vadim Petrochenkov 83f3bc4271 Update jobserver-rs to 0.1.28 2024-02-09 19:13:07 +03:00
Eric Huss 776590b14e Switch linkchecker to use html5ever for html parsing.
The existing regex-based HTML parsing was just too primitive to
correctly handle HTML content. Some books have legitimate `href="…"`
text which should not be validated because it is part of the text, not
actual HTML.
2024-02-08 14:23:40 -08:00
Philipp Krones 4ec9eec9e8
Update Cargo.lock 2024-02-08 20:25:09 +01:00
Oli Scherer 4389a1cc42 Stop using `hir_ty_to_ty` in rustc_privacy 2024-02-07 14:59:26 +00:00
Eric Huss 51f20b4f6b Update mdbook to 0.4.37 2024-02-06 20:22:13 -08:00
bors ff95e52665 Auto merge of #120326 - tmandry:abort-in-tests, r=cuviper
Actually abort in -Zpanic-abort-tests

When a test fails in panic=abort, it can be useful to have a debugger or other tooling hook into the `abort()` call for debugging. Doing this some other way would require it to hard code details of Rust's panic machinery.

There's no reason we couldn't have done this in the first place; using a single exit code for "success" or "failed" was just simpler. Now we are aware of the special exit codes for posix and windows platforms, logging a special error if an unrecognized code is used on those platforms, and falling back to just "failure" on other platforms.

This continues to account for `#[should_panic]` inside the test process itself, so there's no risk of misinterpreting a random call to `abort()` as an expected panic. Any exit code besides `TR_OK` is logged as a test failure.

As an added benefit, this would allow us to support panic=immediate_abort (but not `#[should_panic]`), without noise about unexpected exit codes when a test fails.
2024-02-06 04:15:41 +00:00
bors ea37e8091f Auto merge of #117372 - Amanieu:stdarch_update, r=Mark-Simulacrum
Update stdarch submodule

Splits up #27731 into multiple tracking issues.

Closes #27731
2024-02-05 15:41:40 +00:00
Aphek ee8703315e Update libc to 0.2.153 2024-02-01 23:58:42 -03:00
Tyler Mandry f622e832d4 Actually abort in panic-abort-tests 2024-01-30 18:19:49 -08:00
Guillaume Gomez f35504dbf2
Rollup merge of #120443 - GuillaumeGomez:footnote-def-improvement, r=fmease
Fixes footnote handling in rustdoc

Fixes #100638.

You can now declare footnotes like this:

```rust
//! Reference to footnotes A[^1], B[^2] and C[^3].
//!
//! [^1]: Footnote A.
//! [^2]: Footnote B.
//! [^3]: Footnote C.
```

r? `@notriddle`
2024-01-30 11:19:18 +01:00
Amanieu d'Antras a00ec2d93b Update ahash dependency to 0.8.7 2024-01-30 03:34:28 +00:00
Guillaume Gomez 1bdeeef0d5 Update pulldown-cmark version to 0.9.5 2024-01-29 14:14:03 +01:00
Dylan DPC 5de94a3c80
Rollup merge of #120420 - lnicola:rm-pattern-analysis-derivative, r=Nilstrieb
Stop using derivative in rustc_pattern_analysis

CC #109302, https://github.com/rust-lang/rust-analyzer/pull/16420#discussion_r1464357157

r? ````@Nadrieril````
2024-01-29 12:56:53 +00:00
Nicholas Nethercote 5d9dfbd08f Stop using `String` for error codes.
Error codes are integers, but `String` is used everywhere to represent
them. Gross!

This commit introduces `ErrCode`, an integral newtype for error codes,
replacing `String`. It also introduces a constant for every error code,
e.g. `E0123`, and removes the `error_code!` macro. The constants are
imported wherever used with `use rustc_errors::codes::*`.

With the old code, we have three different ways to specify an error code
at a use point:
```
error_code!(E0123)  // macro call

struct_span_code_err!(dcx, span, E0123, "msg");  // bare ident arg to macro call

\#[diag(name, code = "E0123")]  // string
struct Diag;
```

With the new code, they all use the `E0123` constant.
```
E0123  // constant

struct_span_code_err!(dcx, span, E0123, "msg");  // constant

\#[diag(name, code = E0123)]  // constant
struct Diag;
```

The commit also changes the structure of the error code definitions:
- `rustc_error_codes` now just defines a higher-order macro listing the
  used error codes and nothing else.
- Because that's now the only thing in the `rustc_error_codes` crate, I
  moved it into the `lib.rs` file and removed the `error_codes.rs` file.
- `rustc_errors` uses that macro to define everything, e.g. the error
  code constants and the `DIAGNOSTIC_TABLES`. This is in its new
  `codes.rs` file.
2024-01-29 07:41:41 +11:00
bors 6b4f1c5e78 Auto merge of #120201 - clubby789:dep-update, r=dtolnay
Bump some deps with syn 1.0 dependencies

cc #109302

`cargo update`ing `unic-langid` and `object` removes two dependencies on Syn 1.0.
2024-01-27 14:19:12 +00:00
Laurențiu Nicola f5c78955c8 Stop using derivative in rustc_pattern_analysis 2024-01-27 14:21:01 +02:00
Matthias Krüger 37b9022cef
Rollup merge of #120345 - flip1995:clippy-subtree-update, r=Manishearth
Clippy subtree update

r? `@Manishearth`

Closes https://github.com/rust-lang/rust-clippy/issues/12148
2024-01-26 14:43:32 +01:00
Philipp Krones d7a0182157
Update Cargo.lock 2024-01-25 19:17:52 +01:00
Matthias Krüger eeac90cbba
Rollup merge of #120288 - clubby789:bump-askama, r=GuillaumeGomez
Bump `askama` version

Ran into this while looking at #112865 and thought it would be useful to fix it now. Some more details in [Zulip](https://rust-lang.zulipchat.com/#narrow/stream/266220-t-rustdoc/topic/Askama.20parser.20changes)
2024-01-25 17:39:27 +01:00
Josh Stone 8f3af4c6e2 rustc_data_structures: use either instead of itertools 2024-01-24 15:36:57 -08:00
clubby789 da336190e3 Bump `askama` version 2024-01-24 01:04:34 +00:00
clubby789 c7517206ea Bump `openssl` version 2024-01-21 23:52:35 +00:00
clubby789 527f903a42 Bump `ctrlc` version 2024-01-21 23:51:33 +00:00
clubby789 b50b333a0f Bump `uniq-langid` version 2024-01-21 17:19:31 +00:00
clubby789 56bc5525b3 Bump `object` version 2024-01-21 17:19:29 +00:00
bors 159bdc1e93 Auto merge of #108359 - Zoxc:side-effects-tweak, r=cjgillot
Avoid code generation for ThinVec<Diagnostic>'s destructor in the query system

This avoids 2 instances of the destructor of `ThinVec<Diagnostic>` from being included in `execute_job`. It also outlines the cold branch in `store_side_effects` / `store_side_effects_for_anon_node`.
2024-01-20 15:20:15 +00:00
John Kåre Alsaker 862011e1ca Avoid code generation for ThinVec<Diagnostic>'s destructor in the query system 2024-01-20 13:43:05 +01:00
Matthias Krüger ae09415fa4
Rollup merge of #119815 - nagisa:nagisa/polishes-libloading-use-somewhat, r=bjorn3
Format sources into the error message when loading codegen backends

cc https://github.com/rust-lang/rustc_codegen_cranelift/issues/1447
cc `@bjorn3`
2024-01-19 19:27:00 +01:00
Matthias Krüger 3a3242a0f9
Rollup merge of #120039 - Nadrieril:remove-idx, r=compiler-errors
pat_analysis: Don't rely on contiguous `VariantId`s outside of rustc

Today's pattern_analysis uses `BitSet` and `IndexVec` on the provided enum variant ids, which only makes sense if these ids count the variants from 0. In rust-analyzer, the variant ids are global interning ids, which would make `BitSet` and `IndexVec` ridiculously wasteful. In this PR I add some shims to use `FxHashSet`/`FxHashMap` instead outside of rustc.

r? ```@compiler-errors```
2024-01-17 20:21:23 +01:00
bors 25b706cde3 Auto merge of #119111 - michaelwoerister:measureme-11, r=Mark-Simulacrum
Update measureme crate to version 11

perf.rlo has been updated to use 11.0.0 already, so it should be able to handle the new file format.

r? `@Mark-Simulacrum`

Fixes https://github.com/rust-lang/rust/issues/99282
Fixes https://github.com/rust-lang/rust/issues/119103
2024-01-17 09:32:03 +00:00
Nadrieril 19d6f068ee Don't rely on contiguous `VariantId`s outside of rustc 2024-01-17 03:09:06 +01:00
Matthias Krüger b6f68a7fca
Rollup merge of #119971 - compiler-errors:zip-eq, r=nnethercote
Use `zip_eq` to enforce that things being zipped have equal sizes

Some `zip`s are best enforced to be equal, since size mismatches suggest deeper bugs in the compiler.
2024-01-15 08:44:49 +01:00
bors 9567c3ee73 Auto merge of #119581 - Nadrieril:detangle-arena, r=compiler-errors
Exhaustiveness: remove the need for arena-allocation within the algorithm

After https://github.com/rust-lang/rust/pull/119688, exhaustiveness checking doesn't need access to the arena anymore. This simplifies the lifetime story and makes it compile on stable without the extra dependency.

r? `@compiler-errors`
2024-01-15 00:04:09 +00:00
Michael Goulet c811662fb0 Use zip_eq to enforce that things being zipped have equal sizes 2024-01-14 20:01:12 +00:00
bors 665d2c6f2c Auto merge of #119796 - androm3da:bcain/compiler_builtins_0_1_105, r=Mark-Simulacrum
Update compiler_builtins to 0.1.105

This provides the builtins for the hexagon architecture.
2024-01-14 19:15:37 +00:00
Michael Woerister ac58f9ae03 Update measureme crate to version 11 2024-01-13 16:32:03 +01:00
Nadrieril db36304102 rustc_pattern_analysis no longer needs to be passed an arena 2024-01-12 18:55:27 +01:00
bors 2b1365b34f Auto merge of #119735 - lcnr:provisional-cache-readd, r=compiler-errors
next solver: provisional cache

this adds the cache removed in #115843. However, it should now correctly track whether a provisional result depends on an inductive or coinductive stack.

While working on this, I was using the following doc: https://hackmd.io/VsQPjW3wSTGUSlmgwrDKOA. I don't think it's too helpful to understanding this, but am somewhat hopeful that the inline comments are more useful.

There are quite a few future perf improvements here. Given that this is already very involved I don't believe it is worth it (for now). While working on this PR one of my few attempts to significantly improve perf ended up being unsound again because I was not careful enough 

r? `@compiler-errors`
2024-01-12 07:04:42 +00:00
Matthias Krüger fe97e93166
Rollup merge of #119448 - klensy:annotate-snippets-0.10, r=davidtwco
annotate-snippets: update to 0.10

Ports `annotate-snippets` to 0.10, temporary dupes versions; other crates left that depends on 0.9 is `ui_test` and `rustfmt`.
2024-01-11 19:42:49 +01:00
Simonas Kazlauskas fcaeb45421 deps: deduplicate the version of libloading used
The changelog can be found here:
https://docs.rs/libloading/latest/libloading/changelog/r0_8_0/index.html
2024-01-10 17:18:10 +02:00
Brian Cain d5c39d0638 Update compiler_builtins to 0.1.105
This provides the builtins for the hexagon architecture.
2024-01-09 20:30:56 -08:00
Guillaume Gomez 3da96aed94
Rollup merge of #118680 - djkoloski:shell_argfiles, r=compiler-errors
Add support for shell argfiles

Closes https://github.com/rust-lang/compiler-team/issues/684
2024-01-09 17:52:21 +01:00
Guillaume Gomez 87b0de6cb7
Rollup merge of #118645 - Patryk27:bump-compiler-builtins, r=Nilstrieb,dtolnay
chore: Bump compiler_builtins

Actually closes https://github.com/rust-lang/rust/issues/118079.
2024-01-09 17:52:20 +01:00
Guillaume Gomez 4a24b5bc05
Rollup merge of #117556 - obeis:static-mut-ref-lint, r=davidtwco
Disallow reference to `static mut` and adding `static_mut_ref` lint

Closes #114447

r? `@scottmcm`
2024-01-09 13:23:15 +01:00
lcnr 88271deac2 avoid always rerunning in case of a cycle 2024-01-09 11:19:34 +01:00
Matthias Krüger 91fcc17117
Rollup merge of #119734 - RalfJung:miri, r=RalfJung
Miri subtree update

r? ``@ghost``
2024-01-09 05:33:23 +01:00
David Koloski 684aa2c9d1 Add support for shell argfiles 2024-01-08 15:25:55 -05:00
Ralf Jung 0ddccf933a update lockfile 2024-01-08 11:21:50 +01:00
Mark Rousskov be0293f468 Remove crossbeam-channel
The standard library's std::sync::mpsc basically is a crossbeam channel,
and for the use case here will definitely suffice. This drops this
dependency from librustc_driver.
2024-01-07 19:16:13 -05:00
klensy 5b153b52a2 annotate-snippets: update to 0.10 2024-01-07 16:53:32 +03:00
Obei Sideg 2c088f9520 Disallow reference to `static mut` for expressions
Add `E0796` error code.
Add `static_mut_ref` lint.

This is the idea for the 2024 edition.
2024-01-06 06:31:35 +03:00
bjorn3 6ed37bdc42 Avoid specialization for the Span Encodable and Decodable impls 2023-12-31 20:42:17 +00:00
Nilstrieb ffafcd8819 Update to bitflags 2 in the compiler
This involves lots of breaking changes. There are two big changes that
force changes. The first is that the bitflag types now don't
automatically implement normal derive traits, so we need to derive them
manually.

Additionally, bitflags now have a hidden inner type by default, which
breaks our custom derives. The bitflags docs recommend using the impl
form in these cases, which I did.
2023-12-30 18:17:28 +01:00
Philipp Krones 0217ac9da6
Update Cargo.lock 2023-12-28 19:33:21 +01:00
bors 2df6406b88 Auto merge of #118431 - sjwang05:issue-44695, r=estebank
Emit better suggestions for `&T == T` and `T == &T`

Fixes #40660
Fixes #44695
2023-12-26 21:34:24 +00:00
Guillaume Gomez c2dcfc762d Update sysinfo sub-dependency version to 0.29.11 2023-12-25 22:45:38 +01:00
Guillaume Gomez 51dff45aa3 Update sysinfo version to 0.30.1 2023-12-25 22:44:49 +01:00
Nadrieril c6aa16c469 Use `derivative` for better derive bounds 2023-12-23 00:04:20 +01:00
bors 3a539c0889 Auto merge of #118842 - Nadrieril:librarify-further, r=compiler-errors
Make exhaustiveness usable outside of rustc

With this PR, `rustc_pattern_analysis` compiles on stable (with the `stable` feature)! `rust-analyzer` will be able to use it to provide match-related diagnostics and refactors.

Two questions:
- Should I name the feature `nightly` instead of `rustc` for consistency with other crates? `rustc` makes more sense imo.
- `typed-arena` is an optional dependency but tidy made me add it to the allow-list anyway. Can I avoid that somehow?

r? `@compiler-errors`
2023-12-19 17:15:04 +00:00
sjwang05 2618e0f805
Provide better suggestions for T == &T and &T == T 2023-12-16 19:56:50 -08:00
Philipp Krones b92ab506d3
Update Cargo.lock 2023-12-16 14:13:12 +01:00
Nadrieril 63c5b008e1 Make the crate compile on stable 2023-12-15 16:58:38 +01:00
Rémy Rakic 4cb2a281cb update measureme to 10.1.2 to deduplicate parking_lot 2023-12-14 15:40:50 +00:00
bors 1aa6aefdc9 Auto merge of #118566 - klensy:cstr-new, r=WaffleLapkin
use c literals in compiler and library

Relands refreshed https://github.com/rust-lang/rust/pull/111647
2023-12-14 11:14:03 +00:00
Nadrieril 281002d42c Extract exhaustiveness into its own crate 2023-12-11 11:20:55 +01:00
Matthias Krüger 1889e5a00b
Rollup merge of #118694 - celinval:smir-alloc-methods, r=ouz-a
Add instance evaluation and methods to read an allocation in StableMIR

The instance evaluation is needed to handle intrinsics such as `type_id` and `type_name`.

Since we now use Allocation to represent all evaluated constants, provide a few methods to help process the data inside an allocation.

I've also started to add a structured way to get information about the compilation target machine. For now, I've only added information needed to process an allocation.

r? ``````@ouz-a``````
2023-12-08 23:15:12 +01:00
Michael Goulet cb41509601 Uplift canonicalizer into new trait solver crate 2023-12-08 17:44:01 +00:00