Commit Graph

3860 Commits

Author SHA1 Message Date
Travis Cross 2cc8f1a3a1 Merge PR #2360: Add docs about stabilizing an edition 2025-04-29 19:09:46 +00:00
Boxy 3c3aa7ebb4
Merge pull request #2365 from BoxyUwU/norm_footnotes
Fix footnotes
2025-04-29 19:38:28 +01:00
Boxy 2eae1c6f99 Fix footnotes 2025-04-29 19:35:26 +01:00
lcnr 12be276e9d
Merge pull request #2266 from BoxyUwU/normalization
Introduce a normalization chapter
2025-04-29 20:19:27 +02:00
Boxy 38a5e54ccd Introduce a normalization chapter 2025-04-29 19:08:55 +01:00
Ralf Jung a6df9f0507
Merge pull request #4272 from geetanshjuneja/scheduling
Make thread scheduling fully random
2025-04-29 15:49:27 +00:00
Stan Manilov 7700fb5dc8
Update compiler-src.md
Refactor the dependency structure from a nested unordered list to a single-level ordered list.

IMO, this is clearer, but happy to close this PR without merging, if the change is not desired.
2025-04-29 16:39:54 +03:00
Lukas Wirth d866389c94
Merge pull request #19685 from fbernier/pgo-install
Add PGO support to install
2025-04-29 09:46:09 +00:00
Ralf Jung f2c443f0dd
Merge pull request #4301 from rust-lang/rustup-2025-04-29
Automatic Rustup
2025-04-29 07:18:23 +00:00
The Miri Cronjob Bot 430c17c919 Merge from rustc 2025-04-29 06:23:41 +00:00
bors 3342c600d7 Auto merge of #137940 - 1c3t3a:alignment-borrows-check, r=saethlin
Extend the alignment check to borrows

The current alignment check does not include checks for creating misaligned references from raw pointers, which is now added in this patch.

When inserting the check we need to be careful with references to field projections (e.g. `&(*ptr).a`), in which case the resulting reference must be aligned according to the field type and not the type of the pointer.

r? `@saethlin`

cc `@RalfJung,` after our discussion in #134424
2025-04-29 05:36:44 +00:00
Yuki Okushi b5367b8f95
Merge pull request #2361 from ehuss/update-mdbook 2025-04-29 09:12:05 +09:00
Eric Huss fb49fb6ba0 Add documentation on how to stabilize the compiler edition
This adds documentation on how to stabilize the edition in the compiler.
2025-04-28 14:53:36 -07:00
David Barsky fb0db8e9d3
Merge pull request #19699 from ChayimFriedman2/escape-label
fix: Escape raw names in labels properly
2025-04-28 21:12:21 +00:00
Eric Huss 5df71be99d Update mdbook to 0.4.48
This updates to the latest version of mdbook which has had a variety
of fixes of new features since the last update.

Changelog: https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-0448
2025-04-28 11:41:17 -07:00
Eric Huss 4ba34d12fb Add documentation on how to migration the edition of the standard library
Based on lessons learned from 2024. There's probably still more details
to say here since it was a ton of work. These are the major points that
I remember.
2025-04-28 11:30:33 -07:00
Eric Huss d0998d33cb Add an example of the example of an edition migration lint
It was observed that some people were missing the `edition20xx` rustdoc
attribute. Although this probably won't solve that problem, I'd still
like to highlight it as something to be aware of.
2025-04-28 11:29:42 -07:00
bors e3c349a6c3 Auto merge of #140388 - GuillaumeGomez:rollup-aj9o3ch, r=GuillaumeGomez
Rollup of 7 pull requests

Successful merges:

 - #140056 (Fix a wrong error message in 2024 edition)
 - #140220 (Fix detection of main function if there are expressions around it)
 - #140249 (Remove `weak` alias terminology)
 - #140316 (Introduce `BoxMarker` to improve pretty-printing correctness)
 - #140347 (ci: clean more disk space in codebuild)
 - #140349 (ci: use aws codebuild for the `dist-x86_64-linux` job)
 - #140379 (rustc-dev-guide subtree update)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-04-28 17:22:11 +00:00
Guillaume Gomez 238c163f34
Rollup merge of #140379 - tshepang:rdg-push, r=jieyouxu
rustc-dev-guide subtree update
2025-04-28 13:30:47 +02:00
Guillaume Gomez 21f637c917
Rollup merge of #140249 - BoxyUwU:remove_weak_alias_terminology, r=oli-obk
Remove `weak` alias terminology

I find the "weak" alias terminology to be quite confusing. It implies the existence of "strong" aliases (which do not exist) and I'm not really sure what about weak aliases is "weak". I much prefer "free alias" as the term. I think it's much more obvious what it means as "free function" is a well defined term that already exists in rust.

It's also a little confusing given "weak alias" is already a term in linker/codegen spaces which are part of the compiler too. Though I'm not particularly worried about that as it's usually very obvious if you're talking about the type system or not lol. I'm also currently trying to write documentation about aliases and it's somewhat awkward/confusing to be talking about *weak* aliases, when I'm not really sure what the basis for that as the term actually *is*.

I would also be happy to just find out there's a nice meaning behind calling them "weak" aliases :-)

r? `@oli-obk`

maybe we want a types MCP to decide on a specific naming here? or maybe we think its just too late to go back on this naming decision ^^'
2025-04-28 13:30:45 +02:00
Guillaume Gomez bf9e3f922e
Rollup merge of #140220 - GuillaumeGomez:doctest-main-wrapping, r=fmease
Fix detection of main function if there are expressions around it

Fixes #140162.
Fixes #139651.

Once this is merged, we can backport and I'll send a follow-up to emit a warning in case a `main` function is about to be "wrapped" (and therefore not run).

r? `@fmease`

try-job: x86_64-mingw-1
2025-04-28 13:30:44 +02:00
Lukas Wirth 937807a723
Merge pull request #19706 from Veykril/push-nkpmknlvzyom
fix: Address minor FIXME
2025-04-28 10:12:20 +00:00
Lukas Wirth f069b2fe00
Merge pull request #19704 from Veykril/push-wrvznvvpvtvp
Add expression fill mode variant for filling with underscore expressions
2025-04-28 09:45:04 +00:00
Laurențiu Nicola ffa47805a9
Merge pull request #19702 from lnicola/sync-from-rust
internal: Sync from downstream
2025-04-28 08:31:31 +00:00
bors 45b93b30df Auto merge of #123239 - Urgau:dangerous_implicit_autorefs, r=jdonszelmann,traviscross
Implement a lint for implicit autoref of raw pointer dereference - take 2

*[t-lang nomination comment](https://github.com/rust-lang/rust/pull/123239#issuecomment-2727551097)*

This PR aims at implementing a lint for implicit autoref of raw pointer dereference, it is based on #103735 with suggestion and improvements from https://github.com/rust-lang/rust/pull/103735#issuecomment-1370420305.

The goal is to catch cases like this, where the user probably doesn't realise it just created a reference.

```rust
pub struct Test {
    data: [u8],
}

pub fn test_len(t: *const Test) -> usize {
    unsafe { (*t).data.len() }  // this calls <[T]>::len(&self)
}
```

Since #103735 already went 2 times through T-lang, where they T-lang ended-up asking for a more restricted version (which is what this PR does), I would prefer this PR to be reviewed first before re-nominating it for T-lang.

----

Compared to the PR it is as based on, this PR adds 3 restrictions on the outer most expression, which must either be:
   1. A deref followed by any non-deref place projection (that intermediate deref will typically be auto-inserted)
   2. A method call annotated with `#[rustc_no_implicit_refs]`.
   3. A deref followed by a `addr_of!` or `addr_of_mut!`. See bottom of post for details.

There are several points that are not 100% clear to me when implementing the modifications:
 - ~~"4. Any number of automatically inserted deref/derefmut calls." I as never able to trigger this. Am I missing something?~~ Fixed
 - Are "index" and "field" enough?

----

cc `@JakobDegen` `@WaffleLapkin`
r? `@RalfJung`

try-job: dist-various-1
try-job: dist-various-2
2025-04-28 08:25:23 +00:00
Laurențiu Nicola eeea654b38 Merge from rust-lang/rust 2025-04-28 11:06:53 +03:00
Tshepang Mbambo 1b150ed05c use repo name in push pr title
I found "Rustc dev guide subtree update awkward"
2025-04-28 06:49:13 +02:00
Tshepang Mbambo f2e5577050
Merge pull request #2358 from rust-lang/rustc-pull
Rustc pull update
2025-04-28 06:25:10 +02:00
The rustc-dev-guide Cronjob Bot 825c56bcaa Merge from rustc 2025-04-28 04:02:54 +00:00
The rustc-dev-guide Cronjob Bot 420aa5f9ea Preparing for merge from rustc 2025-04-28 04:02:47 +00:00
Yuki Okushi 9b18c5f55c
Merge pull request #2351 from rust-lang/rustc-pull 2025-04-27 18:53:00 +09:00
bors e6c1a64cca Auto merge of #140291 - GuillaumeGomez:doctest-2024-stdout, r=notriddle
Correctly display stdout and stderr in case a doctest is failing

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

Since the doctest is actually running itself, we need to handle the output directly inside it.

cc `@fmease`
r? `@notriddle`
2025-04-27 07:43:46 +00:00
bors 80e2e9f163 Auto merge of #139646 - lcnr:default-is-fully-concrete, r=BoxyUwU
check types of const param defaults

fixes #139643 by checking that the type of a const parameter default matches the type of the parameter as long as both types are fully concrete

r? `@BoxyUwU`
2025-04-27 01:59:43 +00:00
Tshepang Mbambo 28684f92ff
Merge pull request #2356 from rust-lang/tshepang-patch-2
replace command that does not work
2025-04-26 15:37:24 +02:00
Tshepang Mbambo e36f9af1cd
replace command that does not work 2025-04-26 15:34:43 +02:00
Tshepang Mbambo fae7588172
Merge pull request #2355 from rust-lang/tshepang-patch-1
copy-paste ease
2025-04-26 15:19:08 +02:00
Tshepang Mbambo 2b4bd30756
copy-paste ease 2025-04-26 15:18:36 +02:00
Tshepang Mbambo e708dad6b0
Merge pull request #2354 from rust-lang/tshepang-fix-code-blocks
use correct code block markers
2025-04-26 15:13:59 +02:00
Tshepang Mbambo 0220b0b8a5 use correct code block markers 2025-04-26 15:09:05 +02:00
Tshepang Mbambo b9fbcd1b13
Merge pull request #2343 from hwhsu1231-fork/fix-prefix-chapter
fix(docs): add newlines between prefix/suffix chapters
2025-04-26 14:47:39 +02:00
Tshepang Mbambo 1376352258
Merge pull request #2345 from rust-lang/extraneous
toolchain version does not need to be specified
2025-04-26 13:42:45 +02:00
bors f0ef8ea058 Auto merge of #140177 - tmandry:compiletest-par, r=jieyouxu
[compiletest] Parallelize test discovery

Certain filesystems are slow to service individual read requests, but can service many in parallel. This change brings down the time to run a single cached test on one of those filesystems from 40s to about 8s.
2025-04-26 02:03:54 +00:00
Tshepang Mbambo cc664309b4
Merge pull request #2353 from rust-lang/tshepang-patch-1
typo
2025-04-25 18:33:15 +02:00
Tshepang Mbambo 55d22e3d8c
typo 2025-04-25 18:32:43 +02:00
bors c22085360c Auto merge of #139756 - Zoxc:out-of-order-dep-graph, r=oli-obk
Allow out of order dep graph node encoding

This allows out of order dep graph node encoding by also encoding the index instead of using the file node order as the index.

`MemEncoder` is also brought back to life and used for encoding.

Both of these are done to enable thread-local encoding of dep graph nodes.

This is based on https://github.com/rust-lang/rust/pull/139636.
2025-04-25 15:38:58 +00:00
Ralf Jung 85449ca31e
Merge pull request #4292 from rust-lang/rustup-2025-04-25
Automatic Rustup
2025-04-25 10:43:50 +00:00
xizheyin da24e30420
Enable [behind-upstream] triagebot option
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-04-25 15:17:19 +08:00
bors 25ffc1ef86 Auto merge of #140233 - Zalathar:revert-new-executor, r=jieyouxu
Revert compiletest new-executor, to re-land without download-rustc

Revert <https://github.com/rust-lang/rust/pull/139998> because the original merge triggered download-rustc, which messes with test metrics and prevents us from properly comparing them before/after the change.

The plan is to re-land this PR as-is, combined with a trivial compiler change to avoid download-rustc and get proper test metrics for comparison.

This reverts commit be181dd75c83d72fcc95538e235768bc367b76b9, reversing changes made to 645d0ad2a4f145ae576e442ec5c73c0f8eed829b.

r? ghost
2025-04-25 06:00:11 +00:00
The Miri Cronjob Bot 90bf390fa9 Merge from rustc 2025-04-25 05:01:33 +00:00
bors b31bdf9282 Auto merge of #139752 - usamoi:macos-used, r=saethlin,madsmtm
set subsections_via_symbols for ld64 helper sections

closes https://github.com/rust-lang/rust/issues/139744
cc `@madsmtm`
2025-04-24 22:59:00 +00:00