Commit graph

273442 commits

Author SHA1 Message Date
许杰友 Jieyou Xu (Joe)
88428f4dc3
Rollup merge of #134444 - jyn514:cranelift-std, r=bjorn3
Fix `x build --stage 1 std` when using cg_cranelift as the default backend

Before, cg_cranelift would ICE when trying to lower f16 and f128. The library/ crates had all the infrastructure to omit using them, it just wasn't hooked up to bootstrap.

r? `````@bjorn3`````
2024-12-18 22:56:57 +08:00
许杰友 Jieyou Xu (Joe)
af96692372
Rollup merge of #134436 - taiki-e:assembly-asm-minicore, r=jieyouxu
tests/assembly/asm: Remove uses of rustc_attrs and lang_items features by using minicore

Similar to https://github.com/rust-lang/rust/pull/134385 (for tests/ui/asm), but for tests/assembly/asm.

r? jieyouxu
2024-12-18 22:56:57 +08:00
许杰友 Jieyou Xu (Joe)
099faa8beb
Rollup merge of #134420 - Integral-Tech:pathbuf-refactor, r=compiler-errors
refactor: replace &PathBuf with &Path to enhance generality

- According to [style.md](https://github.com/rust-lang/rust/blob/master/src/tools/rust-analyzer/docs/dev/style.md#useless-types):

> More generally, always prefer types on the left
```rust
// GOOD      BAD
&[T]         &Vec<T>
&str         &String
Option<&T>   &Option<T>
&Path        &PathBuf
```
2024-12-18 22:56:56 +08:00
许杰友 Jieyou Xu (Joe)
7e4f45a377
Rollup merge of #134399 - spastorino:invert-if-condition, r=jieyouxu
Do not do if ! else, use unnegated cond and swap the branches instead

I'm tidying up my ergonomic ref counting PR and I'm going to make some small, simple and unrelated changes outside that PR, so the main PR sticks more straight to the point.
2024-12-18 22:56:55 +08:00
许杰友 Jieyou Xu (Joe)
f3faaf524c
Rollup merge of #134394 - dianne:clarify-pat-2024-migration, r=compiler-errors
Clarify the match ergonomics 2024 migration lint's output

This makes a few changes:
- Rather than using the whole pattern as a span for the lint, this collects spans for each problematic default binding mode reset and labels them with why they're problems.
- The lint's suggestions are now verbose-styled, so that it's clear what's being suggested vs. what's problematic.
- The wording is now less technical, and the hard error version of this diagnostic now links to the same reference material as the lint (currently an unwritten page of the edition guide).

I'm not totally confident in the wording or formatting, so I'd appreciate feedback on that in particular. I tried to draw a connection with word choice between the labels and the suggestion, but it might be imprecise, unclear, or cluttered. If so, it might be worth making the labels more terse and adding notes that explain them, but that's harder to read in a way too.

cc ```@Nadrieril``` ```@Jules-Bertholet```

Closes #133854. For reference, the error from that issue becomes:
```
error: pattern uses features incompatible with edition 2024
  --> $DIR/remove-me.rs:6:25
   |
LL |     map.iter().filter(|(&(_x, _y), &_c)| false);
   |                         ^          ^ cannot implicitly match against multiple layers of reference
   |                         |
   |                         cannot implicitly match against multiple layers of reference
   |
help: make the implied reference pattern explicit
   |
LL |     map.iter().filter(|&(&(_x, _y), &_c)| false);
   |                        +
```
2024-12-18 22:56:54 +08:00
许杰友 Jieyou Xu (Joe)
0a2d708c31
Rollup merge of #134253 - nnethercote:overhaul-keywords, r=petrochenkov
Overhaul keyword handling

The compiler's list of keywords has some problems.
- It contains several items that aren't keywords.
- The order isn't quite right in a couple of places.
- Some of the names of predicates relating to keywords are confusing.
- rustdoc and rustfmt have their own (incorrect) versions of the keyword list.
- `AllKeywords` is unnecessarily complex.

r? ```@jieyouxu```
2024-12-18 22:56:53 +08:00
许杰友 Jieyou Xu (Joe)
477f222b02
Rollup merge of #134161 - nnethercote:overhaul-token-cursors, r=spastorino
Overhaul token cursors

Some nice cleanups here.

r? `````@davidtwco`````
2024-12-18 22:56:53 +08:00
许杰友 Jieyou Xu (Joe)
81fccef2b2
Rollup merge of #133926 - compiler-errors:const-conditions, r=lcnr
Fix const conditions for RPITITs

Fixes #133918

r? lcnr
2024-12-18 22:56:52 +08:00
许杰友 Jieyou Xu (Joe)
2d08e94d12
Rollup merge of #130786 - DianQK:early_otherwise_branch_cleanup, r=oli-obk
mir-opt: a sub-BB of a cleanup BB must also be a cleanup BB in `EarlyOtherwiseBranch`

Fixes #130769.

r? `@cjgillot` or mir-opt
2024-12-18 22:56:51 +08:00
DianQK
d08738c397
mir-opt: Do not handle the cleanup BB in the EarlyOtherwiseBranch 2024-12-18 20:43:55 +08:00
DianQK
93aea1d0fe
mir: require is_cleanup when creating BasicBlockData 2024-12-18 20:43:54 +08:00
DianQK
15fa788cc3
mir-opt: a sub-BB of a cleanup BB must also be a cleanup BB 2024-12-18 20:43:54 +08:00
DianQK
7a0b78da91
Reapply "Auto merge of #129047 - DianQK:early_otherwise_branch_scalar, r=cjgillot"
This reverts commit 16a02664e6.
2024-12-18 20:43:54 +08:00
Santiago Pastorino
3218476c12 Do not do if ! else, use unnegated cond and swap the branches instead 2024-12-18 18:57:33 +08:00
bors
3378a5e084 Auto merge of #134425 - clubby789:cargo-update, r=jieyouxu
Pin `cc` and run `cargo update`

`cc` tends to cause issues with automatic bumps so locking it to be bumped individually when necessary
<details>
<summary>compiler and tools dependencies</summary>

```
    Updating allocator-api2 v0.2.20 -> v0.2.21
    Updating annotate-snippets v0.11.4 -> v0.11.5
    Updating anyhow v1.0.93 -> v1.0.94
    Updating bstr v1.11.0 -> v1.11.1
    Updating chrono v0.4.38 -> v0.4.39
    Updating clap v4.5.21 -> v4.5.23
    Updating clap_builder v4.5.21 -> v4.5.23
    Updating clap_complete v4.5.38 -> v4.5.39
    Updating clap_lex v0.7.3 -> v0.7.4
    Updating colored v2.1.0 -> v2.2.0
    Updating console v0.15.8 -> v0.15.10
    Updating crossbeam-channel v0.5.13 -> v0.5.14
    Updating crossbeam-deque v0.8.5 -> v0.8.6
    Updating crossbeam-utils v0.8.20 -> v0.8.21
    Updating encode_unicode v0.3.6 -> v1.0.0
    Updating fastrand v2.2.0 -> v2.3.0
    Updating home v0.5.9 -> v0.5.11
    Updating js-sys v0.3.74 -> v0.3.76
    Updating libc v0.2.167 -> v0.2.168
    Updating miniz_oxide v0.8.0 -> v0.8.1
    Updating pest v2.7.14 -> v2.7.15
    Updating pest_derive v2.7.14 -> v2.7.15
    Updating pest_generator v2.7.14 -> v2.7.15
    Updating pest_meta v2.7.14 -> v2.7.15
    Updating redox_syscall v0.5.7 -> v0.5.8
    Updating rustc-stable-hash v0.1.0 -> v0.1.1
    Updating rustix v0.38.41 -> v0.38.42
    Updating self_cell v1.0.4 -> v1.1.0
    Updating semver v1.0.23 -> v1.0.24
    Updating serde v1.0.215 -> v1.0.216
    Updating serde_derive v1.0.215 -> v1.0.216
      Adding thiserror v2.0.7
      Adding thiserror-impl v2.0.7
    Updating time v0.3.36 -> v0.3.37
    Updating time-macros v0.2.18 -> v0.2.19
    Updating tokio v1.41.1 -> v1.42.0
    Updating wasm-bindgen v0.2.97 -> v0.2.99
    Updating wasm-bindgen-backend v0.2.97 -> v0.2.99
    Updating wasm-bindgen-macro v0.2.97 -> v0.2.99
    Updating wasm-bindgen-macro-support v0.2.97 -> v0.2.99
    Updating wasm-bindgen-shared v0.2.97 -> v0.2.99
    Updating wasm-encoder v0.221.0 -> v0.221.2
    Updating wasmparser v0.221.0 -> v0.221.2
    Updating wast v221.0.0 -> v221.0.2
    Updating wat v1.221.0 -> v1.221.2
```

</details>

<details>
<summary>library dependencies</summary>

```
    Updating allocator-api2 v0.2.20 -> v0.2.21
    Updating libc v0.2.167 -> v0.2.168
```

</details>

<details>
<summary>rustbook dependencies</summary>

```
    Updating anyhow v1.0.93 -> v1.0.94
    Updating bstr v1.11.0 -> v1.11.1
    Updating chrono v0.4.38 -> v0.4.39
    Updating clap v4.5.21 -> v4.5.23
    Updating clap_builder v4.5.21 -> v4.5.23
    Updating clap_complete v4.5.38 -> v4.5.39
    Updating clap_lex v0.7.3 -> v0.7.4
    Updating fastrand v2.2.0 -> v2.3.0
    Updating js-sys v0.3.74 -> v0.3.76
    Updating libc v0.2.167 -> v0.2.168
    Updating miniz_oxide v0.8.0 -> v0.8.1
    Updating pest v2.7.14 -> v2.7.15
    Updating pest_derive v2.7.14 -> v2.7.15
    Updating pest_generator v2.7.14 -> v2.7.15
    Updating pest_meta v2.7.14 -> v2.7.15
    Updating pulldown-cmark-to-cmark v19.0.0 -> v19.0.1
    Updating redox_syscall v0.5.7 -> v0.5.8
    Updating rustix v0.38.41 -> v0.38.42
    Updating semver v1.0.23 -> v1.0.24
    Updating serde v1.0.215 -> v1.0.216
    Updating serde_derive v1.0.215 -> v1.0.216
      Adding thiserror v2.0.7
      Adding thiserror-impl v2.0.7
    Updating wasm-bindgen v0.2.97 -> v0.2.99
    Updating wasm-bindgen-backend v0.2.97 -> v0.2.99
    Updating wasm-bindgen-macro v0.2.97 -> v0.2.99
    Updating wasm-bindgen-macro-support v0.2.97 -> v0.2.99
    Updating wasm-bindgen-shared v0.2.97 -> v0.2.99
    Removing windows-sys v0.52.0
```

</details>
2024-12-18 09:23:22 +00:00
Nicholas Nethercote
6de550cc68 Improve comments on Keywords.
In particular, clarify which predicates apply to which keywords.
2024-12-18 20:21:03 +11:00
Nicholas Nethercote
ed5b91abc8 Move gen in the keyword list.
`gen` is an edition-specific keyword used in unstable Rust, and so
belongs with `try` (as `is_unused_keyword_conditional` indicates).

Also, the cases in `is_unused_keyword_conditional` should be in
alphabetical order, to match the keyword list.

These changes don't affect the behaviour of any of the `Symbol::is_*`
functions.
2024-12-18 20:21:03 +11:00
Nicholas Nethercote
1564318482 Only have one source of truth for keywords.
`rustc_symbol` is the source of truth for keywords.

rustdoc has its own implicit definition of keywords, via the
`is_doc_keyword`. It (presumably) intends to include all keywords, but
it omits `yeet`.

rustfmt has its own explicit list of Rust keywords. It also (presumably)
intends to include all keywords, but it omits `await`, `builtin`, `gen`,
`macro_rules`, `raw`, `reuse`, `safe`, and `yeet`. Also, it does linear
searches through this list, which is inefficient.

This commit fixes all of the above problems by introducing a new
predicate `is_any_keyword` in rustc and using it in rustdoc and rustfmt.
It documents that it's not the right predicate in most cases.
2024-12-18 20:21:03 +11:00
Nicholas Nethercote
64abe8be33 Simplify AllKeywords.
It's a verbose reinvention of a range type, and can be cut down a lot.
2024-12-18 20:21:01 +11:00
bors
37e74596c0 Auto merge of #134450 - weihanglo:update-cargo, r=weihanglo
Update cargo

6 commits in 769f622e12db0001431d8ae36d1093fb8727c5d9..99dff6d77db779716dda9ca3b29c26addd02c1be
2024-12-14 04:27:35 +0000 to 2024-12-18 00:55:17 +0000
- fix(build-std): make Resolve  align to what to build (rust-lang/cargo#14938)
- test(build-std): Isolate output test to avoid spurious `[BLOCKING]` messages from concurrent runs (rust-lang/cargo#14943)
- docs: fix wrong changelog PR link (rust-lang/cargo#14947)
- docs(unstable): Correct stabilization version for MSRV-resolver (rust-lang/cargo#14945)
- Update release information for home 0.5.11 (rust-lang/cargo#14939)
- Limit release trigger to 0.* tags (rust-lang/cargo#14940)
2024-12-18 05:38:23 +00:00
Nicholas Nethercote
8a85bdc9fb Remove a comment that shouldn't have been committed. 2024-12-18 15:54:17 +11:00
Michael Goulet
4977640c79 Fix const conditions for RPITITs 2024-12-18 03:02:46 +00:00
bors
a89ca2c85e Auto merge of #134243 - nnethercote:re-export-more-rustc_span, r=jieyouxu
Re-export more `rustc_span::symbol` things from `rustc_span`.

`rustc_span::symbol` defines some things that are re-exported from `rustc_span`, such as `Symbol` and `sym`. But it doesn't re-export some closely related things such as `Ident` and `kw`. So you can do `use rustc_span::{Symbol, sym}` but you have to do `use rustc_span::symbol::{Ident, kw}`, which is inconsistent for no good reason.

This commit re-exports `Ident`, `kw`, and `MacroRulesNormalizedIdent`, and changes many `rustc_span::symbol::` qualifiers to `rustc_span::`. This is a 300+ net line of code reduction, mostly because many files with two `use rustc_span` items can be reduced to one.

r? `@jieyouxu`
2024-12-18 02:56:38 +00:00
Weihang Lo
fadcbef1a4
Update cargo 2024-12-17 21:53:33 -05:00
Nicholas Nethercote
2620eb42d7 Re-export more rustc_span::symbol things from rustc_span.
`rustc_span::symbol` defines some things that are re-exported from
`rustc_span`, such as `Symbol` and `sym`. But it doesn't re-export some
closely related things such as `Ident` and `kw`. So you can do `use
rustc_span::{Symbol, sym}` but you have to do `use
rustc_span::symbol::{Ident, kw}`, which is inconsistent for no good
reason.

This commit re-exports `Ident`, `kw`, and `MacroRulesNormalizedIdent`,
and changes many `rustc_span::symbol::` qualifiers in `compiler/` to
`rustc_span::`. This is a 200+ net line of code reduction, mostly
because many files with two `use rustc_span` items can be reduced to
one.
2024-12-18 13:38:53 +11:00
Nicholas Nethercote
2903356b2e Overhaul TokenTreeCursor.
- Move it to `rustc_parse`, which is the only crate that uses it. This
  lets us remove all the `pub` markers from it.

- Change `next_ref` and `look_ahead` to `get` and `bump`, which work
  better for the `rustc_parse` uses.

- This requires adding a `TokenStream::get` method, which is simple.

- In `TokenCursor`, we currently duplicate the
  `DelimSpan`/`DelimSpacing`/`Delimiter` from the surrounding
  `TokenTree::Delimited` in the stack. This isn't necessary so long as
  we don't prematurely move past the `Delimited`, and is a small perf
  win on a very hot code path.

- In `parse_token_tree`, we clone the relevant `TokenTree::Delimited`
  instead of constructing an identical one from pieces.
2024-12-18 12:50:22 +11:00
bors
52890e8215 Auto merge of #134439 - matthiaskrgr:rollup-grmmmx2, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #133265 (Add a range argument to vec.extract_if)
 - #133801 (Promote powerpc64le-unknown-linux-musl to tier 2 with host tools)
 - #134323 (coverage: Dismantle `map_data.rs` by moving its responsibilities elsewhere)
 - #134378 (An octuple of polonius fact generation cleanups)
 - #134408 (Regression test for RPIT inheriting lifetime from projection)
 - #134423 (bootstrap: use specific-purpose ui test path for `test_valid` self-test)
 - #134426 (Fix typo in uint_macros.rs)

Failed merges:

 - #133103 (Pass FnAbi to find_mir_or_eval_fn)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-12-18 00:14:56 +00:00
jyn
39305bfaf2 Fix x build --stage 1 std when using cg_cranelift as the default backend
Before, cg_cranelift would ICE when trying to lower f16 and f128. The
library/ crates had all the infrastructure to omit using them, it just
wasn't hooked up to bootstrap.
2024-12-17 18:47:19 -05:00
Nicholas Nethercote
fd83954d66 Factor out repeated code from eat_dollar. 2024-12-18 10:43:30 +11:00
Nicholas Nethercote
c82d5865f2 Remove Peekable<TokenStreamIter> uses.
Currently there are two ways to peek at a `TokenStreamIter`.
- Wrap it in a `Peekable` and use that traits `peek` method.
- Use `TokenStreamIter`'s inherent `peek` method.

Some code uses one, some use the other. This commit converts all places
to the inherent method. This eliminates mixing of `TokenStreamIter` and
`Peekable<TokenStreamIter>` and some use of `impl Iterator` and `dyn
Iterator`.
2024-12-18 10:43:28 +11:00
Nicholas Nethercote
809975c94a Rename RefTokenTreeCursor.
Because `TokenStreamIter` is a much better name for a `TokenStream`
iterator. Also rename the `TokenStream::trees` method as
`TokenStream::iter`, and some local variables.
2024-12-18 10:39:07 +11:00
Nicholas Nethercote
3575e7943b Simplify RefTokenTreeCursor::look_ahead.
It's only ever used with a lookahead of 0, so this commit removes the
lookahead and renames it `peek`.
2024-12-18 10:31:39 +11:00
Nicholas Nethercote
0bf6e82c54 Change the lookahead in MacroParser::new.
As it happens, lookahead values of 0, 1, and 2 all work fine here, due
to the structure of the code. (Values or 3 or greater cause test
failures.) This commit changes the lookahead to zero because that will
facilitate cleanups in subsequent commits.
2024-12-18 10:31:38 +11:00
dianne
28c6d0b55b Add the edition guide link from the match 2024 migration lint to the error as well 2024-12-17 15:21:28 -08:00
dianne
77e9051e22 Improve the pattern migration 2024 migration lint's message 2024-12-17 13:46:00 -08:00
dianne
70b8527377 Correctly check the edition of subpatterns in the pattern migration 2024 lint 2024-12-17 13:46:00 -08:00
dianne
a676872e0f Clarify the match ergonomics 2024 migration lint's output 2024-12-17 13:38:21 -08:00
Matthias Krüger
3b0df8c59f
Rollup merge of #134426 - hkBst:patch-3, r=lqd
Fix typo in uint_macros.rs
2024-12-17 22:34:44 +01:00
Matthias Krüger
4b905c8a5d
Rollup merge of #134423 - jieyouxu:bootstrap-test-valid, r=onur-ozkan
bootstrap: use specific-purpose ui test path for `test_valid` self-test

I wanted to move some ui tests around in #134418, which broke `test_valid` since it was referencing two non-specific-purpose ui tests. This PR instead adds two dummy tests under `tests/ui/bootstrap/self-test/`, for that purpose specifically.

r? bootstrap
2024-12-17 22:34:44 +01:00
Matthias Krüger
53635e5547
Rollup merge of #134408 - rmehri01:rpit-inherits-lifetime, r=compiler-errors
Regression test for RPIT inheriting lifetime from projection

Regression test to close https://github.com/rust-lang/rust/issues/51525
2024-12-17 22:34:43 +01:00
Matthias Krüger
264566fc61
Rollup merge of #134378 - lqd:polonius-next-episode-2, r=jackh726
An octuple of polonius fact generation cleanups

This PR is extracted from https://github.com/rust-lang/rust/pull/134268 for easier review and contains its first 8 commits. They have already been reviewed by ````@jackh726```` over there.

r? ````@jackh726````
2024-12-17 22:34:43 +01:00
Matthias Krüger
e696f5c180
Rollup merge of #134323 - Zalathar:dismantle-map-data, r=jieyouxu
coverage: Dismantle `map_data.rs` by moving its responsibilities elsewhere

This is a series of incremental changes that combine to let us get rid of `coverageinfo/map_data.rs`, by moving all of its responsibilities into more appropriate places.

Some of the notable consequences are:

- We once again build the per-CGU file table on the fly while preparing individual covfun records, instead of building the whole table up-front. The up-front approach was introduced by #117042 to work around various other problems in generating the covmap/covfun records, but subsequent cleanups have made that approach no longer necessary.
- Expression conversion and mapping-region conversion are now performed directly in `mapgen::covfun`, which should make future changes easier.
- We no longer insert unused function instances into the same map that is also used to track used function instances. This helps to decouple the handling of used vs unused functions.

---

There should be no meaningful change to compiler output. The file table is no longer sorted, because reordering it would invalidate the file indices stored in individual covfun records, but the table order should still be deterministic (albeit arbitrary).

There are some subsequent cleanups that I intend to investigate, but this is enough change for one PR.
2024-12-17 22:34:42 +01:00
Matthias Krüger
ca5dfa74f1
Rollup merge of #133801 - Gelbpunkt:powerpc64le-unknown-linux-musl-tier-2, r=jieyouxu,Urgau,Kobzol
Promote powerpc64le-unknown-linux-musl to tier 2 with host tools

MCP: https://github.com/rust-lang/compiler-team/issues/803

I'm using crosstool-ng for building a toolchain because GCC 9 from `musl-toolchain.sh` has float ABI issues (?) and can't compile LLVM, and writing a crosstool-ng config for a target feels less hacky than yet another target specific shell script. I also defined a kernel version, since there wasn't one specified before. If a lower version is desired, just let me know. I also tried to match the rust configure args with the loongarch64 musl tier 2 target.

The resulting compiler works fine, built with `DEPLOY=1 ./src/ci/docker/run.sh dist-powerpc64le-linux` and tested on Alpine Linux in a VM and on a bare metal POWER8 machine:
```
qemu-ppc64le:/tmp/rust-nightly-powerpc64le-unknown-linux-musl$ ash install.sh
install: creating uninstall script at /usr/local/lib/rustlib/uninstall.sh
install: installing component 'rustc'
install: installing component 'rust-std-powerpc64le-unknown-linux-musl'
install: installing component 'cargo'
install: installing component 'rustfmt-preview'
install: installing component 'rls-preview'
install: installing component 'rust-analyzer-preview'
install: installing component 'llvm-tools-preview'
install: installing component 'clippy-preview'
install: installing component 'miri-preview'
install: installing component 'rust-analysis-powerpc64le-unknown-linux-musl'
install: installing component 'llvm-bitcode-linker-preview'
install: WARNING: failed to run ldconfig. this may happen when not installing as root. run with --verbose to see the error

    rust installed.

qemu-ppc64le:~$ echo 'fn main() { println!("hello world"); }' > test.rs
qemu-ppc64le:~$ rustc test.rs
qemu-ppc64le:~$ ./test
hello world
qemu-ppc64le:~$ file test
test: ELF 64-bit LSB executable, 64-bit PowerPC or cisco 7500, OpenPOWER ELF V2 ABI, version 1 (SYSV), statically linked, BuildID[sha1]=596ee6abf9add487ebc54fb71c2076fb6faea013, with debug_info, not stripped
```

try-job: dist-powerpc64le-linux
2024-12-17 22:34:41 +01:00
Matthias Krüger
938742e687
Rollup merge of #133265 - the8472:extract-if-ranges, r=cuviper
Add a range argument to vec.extract_if

tracking issue: #43244

This adds the range argument requested in https://github.com/rust-lang/rust/issues/43244#issuecomment-2486160659
2024-12-17 22:34:40 +01:00
bors
7e6bf003f3 Auto merge of #134376 - jdonszelmann:fix-rustdoc-perf, r=jieyouxu
Try to fix perf regression in rustdoc after hir attributes

Slight performance regression introduced in #131808

r? `@jieyouxu`
2024-12-17 21:34:13 +00:00
bors
a4cb3c8318 Auto merge of #134381 - jdonszelmann:move-attribute-types, r=oli-obk
Split up attribute parsing code and move data types to `rustc_attr_data_structures`

This change renames `rustc_attr` to `rustc_attr_parsing`, and splits up the parsing code. At the same time, all the data types used move to `rustc_attr_data_structures`. This is in preparation of also having a third crate: `rustc_attr_validation`

I initially envisioned this as two separate PRs, but I think doing it in one go reduces the number of ways others would have to rebase their changes on this. However, I can still split them.

r? `@oli-obk` (we already discussed how this is a first step in a larger plan)

For a more detailed plan on how attributes are going to change, see https://github.com/rust-lang/rust/issues/131229

Edit: this looks like a giant PR, but the changes are actually rather trivial. Each commit is reviewable on its own, and mostly moves code around. No new logic is added.
2024-12-17 18:50:50 +00:00
Taiki Endo
bd7213ff89 tests/assembly/asm: Remove uses of rustc_attrs and lang_items features by using minicore 2024-12-18 02:59:07 +09:00
clubby789
0b095f80d8 compiler & tools dependencies:
Updating allocator-api2 v0.2.20 -> v0.2.21
    Updating annotate-snippets v0.11.4 -> v0.11.5
    Updating anyhow v1.0.93 -> v1.0.94
    Updating bstr v1.11.0 -> v1.11.1
    Updating chrono v0.4.38 -> v0.4.39
    Updating clap v4.5.21 -> v4.5.23
    Updating clap_builder v4.5.21 -> v4.5.23
    Updating clap_complete v4.5.38 -> v4.5.39
    Updating clap_lex v0.7.3 -> v0.7.4
    Updating colored v2.1.0 -> v2.2.0
    Updating console v0.15.8 -> v0.15.10
    Updating crossbeam-channel v0.5.13 -> v0.5.14
    Updating crossbeam-deque v0.8.5 -> v0.8.6
    Updating crossbeam-utils v0.8.20 -> v0.8.21
    Updating encode_unicode v0.3.6 -> v1.0.0
    Updating fastrand v2.2.0 -> v2.3.0
    Updating home v0.5.9 -> v0.5.11
    Updating js-sys v0.3.74 -> v0.3.76
    Updating libc v0.2.167 -> v0.2.168
    Updating miniz_oxide v0.8.0 -> v0.8.1
    Updating pest v2.7.14 -> v2.7.15
    Updating pest_derive v2.7.14 -> v2.7.15
    Updating pest_generator v2.7.14 -> v2.7.15
    Updating pest_meta v2.7.14 -> v2.7.15
    Updating redox_syscall v0.5.7 -> v0.5.8
    Updating rustc-stable-hash v0.1.0 -> v0.1.1
    Updating rustix v0.38.41 -> v0.38.42
    Updating self_cell v1.0.4 -> v1.1.0
    Updating semver v1.0.23 -> v1.0.24
    Updating serde v1.0.215 -> v1.0.216
    Updating serde_derive v1.0.215 -> v1.0.216
      Adding thiserror v2.0.7
      Adding thiserror-impl v2.0.7
    Updating time v0.3.36 -> v0.3.37
    Updating time-macros v0.2.18 -> v0.2.19
    Updating tokio v1.41.1 -> v1.42.0
    Updating wasm-bindgen v0.2.97 -> v0.2.99
    Updating wasm-bindgen-backend v0.2.97 -> v0.2.99
    Updating wasm-bindgen-macro v0.2.97 -> v0.2.99
    Updating wasm-bindgen-macro-support v0.2.97 -> v0.2.99
    Updating wasm-bindgen-shared v0.2.97 -> v0.2.99
    Updating wasm-encoder v0.221.0 -> v0.221.2
    Updating wasmparser v0.221.0 -> v0.221.2
    Updating wast v221.0.0 -> v221.0.2
    Updating wat v1.221.0 -> v1.221.2

library dependencies:
    Updating allocator-api2 v0.2.20 -> v0.2.21
    Updating libc v0.2.167 -> v0.2.168

rustbook dependencies:
    Updating anyhow v1.0.93 -> v1.0.94
    Updating bstr v1.11.0 -> v1.11.1
    Updating chrono v0.4.38 -> v0.4.39
    Updating clap v4.5.21 -> v4.5.23
    Updating clap_builder v4.5.21 -> v4.5.23
    Updating clap_complete v4.5.38 -> v4.5.39
    Updating clap_lex v0.7.3 -> v0.7.4
    Updating fastrand v2.2.0 -> v2.3.0
    Updating js-sys v0.3.74 -> v0.3.76
    Updating libc v0.2.167 -> v0.2.168
    Updating miniz_oxide v0.8.0 -> v0.8.1
    Updating pest v2.7.14 -> v2.7.15
    Updating pest_derive v2.7.14 -> v2.7.15
    Updating pest_generator v2.7.14 -> v2.7.15
    Updating pest_meta v2.7.14 -> v2.7.15
    Updating pulldown-cmark-to-cmark v19.0.0 -> v19.0.1
    Updating redox_syscall v0.5.7 -> v0.5.8
    Updating rustix v0.38.41 -> v0.38.42
    Updating semver v1.0.23 -> v1.0.24
    Updating serde v1.0.215 -> v1.0.216
    Updating serde_derive v1.0.215 -> v1.0.216
      Adding thiserror v2.0.7
      Adding thiserror-impl v2.0.7
    Updating wasm-bindgen v0.2.97 -> v0.2.99
    Updating wasm-bindgen-backend v0.2.97 -> v0.2.99
    Updating wasm-bindgen-macro v0.2.97 -> v0.2.99
    Updating wasm-bindgen-macro-support v0.2.97 -> v0.2.99
    Updating wasm-bindgen-shared v0.2.97 -> v0.2.99
    Removing windows-sys v0.52.0
2024-12-17 17:41:00 +00:00
Integral
7eb0d84424
refactor: replace &PathBuf with &Path to enhance generality 2024-12-18 00:28:34 +08:00
bors
1d35638dc3 Auto merge of #130766 - clarfonthey:stable-coverage-attribute, r=wesleywiser
Stabilize #[coverage] attribute

Closes #84605, which passed FCP.

Stabilisation report here: https://github.com/rust-lang/rust/issues/84605#issuecomment-2166514660

Also added to reference here: rust-lang/reference#1628

---

try-job: aarch64-apple
try-job: x86_64-gnu
try-job: x86_64-msvc
2024-12-17 15:56:58 +00:00