1
Fork 0
Commit graph

282339 commits

Author SHA1 Message Date
Tshepang Mbambo
a863f2c6b2
Merge pull request #2285 from KonaeAkira/master
Fix grammar and remove redundant info
2025-03-14 08:50:49 +02:00
KonaeAkira
88aaf1d25a Fix grammar and remove redundant info 2025-03-13 23:56:04 +01:00
许杰友 Jieyou Xu (Joe)
27d71f0946
Merge pull request #2284 from rust-lang/cuviper-patch-1
Remove the doc for `no-system-llvm`
2025-03-14 03:28:03 +08:00
Josh Stone
190187bfa7
Remove the doc for no-system-llvm
This compiletest directive was removed in rust-lang/rust#120265.
2025-03-13 12:15:29 -07:00
Jakub Beránek
ed29ebb576
Merge pull request #2282 from jieyouxu/fetch-prunetags
Document `fetch.prunetags = true` gotcha during rustc-pull
2025-03-13 09:49:22 +01:00
许杰友 Jieyou Xu (Joe)
440d336b71 Document fetch.prunetags = true gotcha during rustc-pull 2025-03-13 15:44:23 +08:00
Tshepang Mbambo
d0a3160374
Merge pull request #2281 from rust-lang/tshepang-patch-1
less text for same effect
2025-03-13 03:52:43 +02:00
Tshepang Mbambo
26176b017e
less text for same effect 2025-03-13 03:51:51 +02:00
Oli Scherer
240a6d3401
Merge pull request #2258 from fee1-dead-contrib/constck
Rewrite effects checking chapter
2025-03-10 12:35:40 +01:00
许杰友 Jieyou Xu (Joe)
e405878315
Merge pull request #2273 from rust-lang/tshepang-patch-1
use new terminology
2025-03-10 17:59:15 +08:00
Tshepang Mbambo
4cc14ce3a5
Merge pull request #2277 from rust-lang/tshepang-patch-2
add missing punctuation
2025-03-10 11:16:05 +02:00
Tshepang Mbambo
4b2c077a7b
add missing punctuation 2025-03-10 11:15:32 +02:00
Tshepang Mbambo
225e571718
Merge pull request #2276 from rust-lang/tshepang-patch-2
clean --bless text
2025-03-10 11:13:42 +02:00
Tshepang Mbambo
7c6d6e30be
clean --bless text 2025-03-10 11:12:44 +02:00
Tshepang Mbambo
e9088e46f9
Merge pull request #2275 from rust-lang/tshepang-patch-2
add a pause, for readability
2025-03-10 10:39:05 +02:00
Tshepang Mbambo
f2e77353be
add a pause, for readability 2025-03-10 10:38:30 +02:00
Tshepang Mbambo
7384623d97
Merge pull request #2274 from rust-lang/tshepang-patch-2
already mentioned before showing code snippet
2025-03-10 10:36:19 +02:00
Tshepang Mbambo
775167251a
already mentioned before showing code snippet 2025-03-10 10:35:40 +02:00
Tshepang Mbambo
d51c922268
use new terminology 2025-03-10 10:29:30 +02:00
许杰友 Jieyou Xu (Joe)
7f83057e3d
Merge pull request #2270 from tshepang/example-llvm-prs
mention llvm 20 in example prs
2025-03-09 08:06:06 +08:00
许杰友 Jieyou Xu (Joe)
fc7ad745bb
Merge pull request #2271 from rust-lang/tshepang-patch-1
fix text
2025-03-09 08:04:28 +08:00
许杰友 Jieyou Xu (Joe)
d9c920bd69
Merge pull request #2272 from rust-lang/tshepang-patch-2
compiletest directives: ignore-stage0 and only-stage0 do not exist
2025-03-09 08:03:57 +08:00
Tshepang Mbambo
f1a0665131
ignore-stage0 and only-stage0 do not exist 2025-03-08 23:51:17 +02:00
Tshepang Mbambo
2391f1038c
fix text
- There is more than just target and stage
- There is only 3 stages, so don't mention them specially
2025-03-08 22:58:09 +02:00
Tshepang Mbambo
ce2eef3b85 link to latest major llvm update pr 2025-03-08 20:40:44 +02:00
Tshepang Mbambo
93a8c7e6b4 only a few are needed as examples 2025-03-08 20:35:42 +02:00
Tshepang Mbambo
24f3812ce0 numbers were not sequential, so stop trying 2025-03-08 20:33:05 +02:00
Deadbeef
41f95b0fc9 consider explicit_implied_const_bounds 2025-03-08 16:38:44 +08:00
许杰友 Jieyou Xu (Joe)
515be00f0c
Merge pull request #2269 from moxian/patch-1
Don't suggest explicitly `cfg`-gating `trace!` calls in bootstrap
2025-03-06 17:30:16 +08:00
moxian
243f5699d5 Don't suggest explicitly cfg-gating trace! calls in bootstrap 2025-03-05 15:34:48 -08:00
Boxy
69369a7f1c
Merge pull request #2263 from BoxyUwU/rustc-pull2
Rustc pull
2025-02-25 21:37:33 +00:00
Boxy
d9683df7c2 Merge from rustc 2025-02-25 21:27:44 +00:00
Boxy
46392d1661 Preparing for merge from rustc 2025-02-25 21:22:45 +00:00
Jakub Beránek
5d65732511
Merge pull request #2262 from Kobzol/rustc-pull-ci-fix
Fix posting message to Zulip
2025-02-25 18:57:26 +01:00
Jakub Beránek
9423634997 Fix posting message to Zulip 2025-02-25 18:56:14 +01:00
bors
4ecd70ddd1 Auto merge of #137611 - fmease:rollup-ln673ux, r=fmease
Rollup of 6 pull requests

Successful merges:

 - #135480 (Don't require method impls for methods with `Self:Sized` bounds for impls for unsized types)
 - #137360 (Use `as_chunks` in `analyze_source_file_sse2`)
 - #137460 (downgrade bootstrap `cc`)
 - #137515 (Update `compiler-builtins` to 0.1.148)
 - #137522 (use stage 2 on cargo and clippy tests when possible)
 - #137597 (Revert accidental cargo submodule update)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-02-25 15:23:37 +00:00
León Orell Valerian Liehr
fb9ae4c018
Rollup merge of #137597 - oli-obk:push-unkusxkoqrus, r=Kobzol
Revert accidental cargo submodule update

This was accidentally introduced in #135726
2025-02-25 13:32:57 +01:00
León Orell Valerian Liehr
e6bd9e6928
Rollup merge of #137522 - onur-ozkan:137215-follow-ups, r=Kobzol
use stage 2 on cargo and clippy tests when possible

Follow-up for #137215.

For more context, read the discussion starting from https://github.com/rust-lang/rust/pull/137215#issuecomment-2674395959.

r? Kobzol (Feel free to re-r if you are not available).
2025-02-25 13:32:56 +01:00
León Orell Valerian Liehr
86fa9f895c
Rollup merge of #137515 - tgross35:update-builtins, r=tgross35
Update `compiler-builtins` to 0.1.148

Includes `f16` symbols on MIPS [1], updates for `libm` [2], and reapplies the patch that drops the `public_test_deps!` macro [3].

[1]: https://github.com/rust-lang/compiler-builtins/pull/762
[2]: https://github.com/rust-lang/compiler-builtins/pull/765
[3]: https://github.com/rust-lang/compiler-builtins/pull/766

try-job: aarch64-gnu
try-job: i686-mingw-1
try-job: i686-mingw-2
try-job: test-various
try-job: x86_64-msvc-1
try-job: x86_64-msvc-2
try-job: x86_64-rust-for-linux
2025-02-25 13:32:55 +01:00
León Orell Valerian Liehr
849a60a762
Rollup merge of #137460 - onur-ozkan:downgrade-cc, r=jieyouxu
downgrade bootstrap `cc`

Current `cc` version causing bootstrap to fail on custom targets. See https://github.com/rust-lang/cc-rs/issues/1317 for more context.

Fixes (after beta and stable backports): https://github.com/rust-lang/rust/issues/137064 and https://github.com/rust-lang/rust/issues/135271
2025-02-25 13:32:54 +01:00
León Orell Valerian Liehr
da31d840de
Rollup merge of #137360 - real-eren:rustc_span/use-chunks-exact, r=Noratrieb
Use `as_chunks` in `analyze_source_file_sse2`

Follow-up to #136460. Uses a slightly cleaner method of iterating over chunks of bytes.
2025-02-25 13:32:53 +01:00
León Orell Valerian Liehr
fb31487fdb
Rollup merge of #135480 - oli-obk:sized-method-on-unsized-impl, r=lcnr
Don't require method impls for methods with `Self:Sized` bounds for impls for unsized types

Similarly to how #112319 doesn't require specifying associated types with `Self: Sized` bounds on `dyn Trait`, we now don't require assoc items with `Self: Sized` bounds to be in impls of for unsized types.

Additionally we lint assoc items with `Self: Sized` bounds that are in such impls:

```rust
trait Foo {
    fn foo() where Self: Sized;
}

impl Foo for () {
    fn foo() {}
}

impl Foo for i32 {}
//~^ ERROR: not all trait items implemented, missing: `foo`

impl Foo for dyn std::fmt::Debug {}

#[deny(dead_code)]
impl Foo for dyn std::fmt::Display {
    fn foo() {}
    //~^ ERROR this item cannot be used as its where bounds are not satisfied
}
```

Note that this works with the same `Self: Sized` specific logic we already have for `dyn Trait`, so no new capabilities like avoiding assoc items with `Self: Copy` bounds on impls for `String` or such are added here. Specifying `where ConcreteType: Sized` in a trait and implementing the trait for `ConcreteType` also does not work, it *must* be exactly `Self: Sized`.
2025-02-25 13:32:52 +01:00
bors
c51b9b6d52 Auto merge of #133832 - madsmtm:apple-symbols.o, r=DianQK
Make `#[used]` work when linking with `ld64`

To make `#[used]` work in static libraries, we use the `symbols.o` trick introduced in https://github.com/rust-lang/rust/pull/95604.

However, the linker shipped with Xcode, ld64, works a bit differently from other linkers; in particular, [it completely ignores undefined symbols by themselves](https://github.com/apple-oss-distributions/ld64/blob/ld64-954.16/src/ld/parsers/macho_relocatable_file.cpp#L2455-L2468), and only consider them if they have relocations (something something atoms something fixups, I don't know the details).

So to make the `symbols.o` file work on ld64, we need to actually insert a relocation. That's kinda cumbersome to do though, since the relocation must be valid, and hence must point to a valid piece of machine code, and is hence very architecture-specific.

Fixes https://github.com/rust-lang/rust/issues/133491, see that for investigation.

---

Another option would be to pass `-u _foo` to the final linker invocation. This has the problem that `-u` causes the linker to not be able to dead-strip the symbol, which is undesirable. (If we did this, we would possibly also want to do it by putting the arguments in a file by itself, and passing that file via ``@`,` e.g. ``@undefined_symbols.txt`,` similar to https://github.com/rust-lang/rust/issues/52699, though that [is only supported since Xcode 12](https://developer.apple.com/documentation/xcode-release-notes/xcode-12-release-notes#Linking), and I'm not sure we wanna bump that).

Various other options that are probably all undesirable as they affect link time performance:
- Pass `-all_load` to the linker.
- Pass `-ObjC` to the linker (the Objective-C support in the linker has different code paths that load more of the binary), and instrument the binaries that contain `#[used]` symbols.
- Pass `-force_load` to libraries that contain `#[used]` symbols.

Failed attempt: Embed `-u _foo` in the object file with `LC_LINKER_OPTION`, akin to https://github.com/rust-lang/rust/issues/121293. Doesn't work, both because `ld64` doesn't read that from archive members unless it already has a reason to load the member (which is what this PR is trying to make it do), and because `ld64` only support the `-l`, `-needed-l`, `-framework` and `-needed_framework` flags in there.

---

TODO:
- [x] Support all Apple architectures.
- [x] Ensure that this works regardless of the actual type of the symbol.
- [x] Write up more docs.
- [x] Wire up a few proper tests.

`@rustbot` label O-apple
2025-02-25 11:59:11 +00:00
Oli Scherer
6cd0721882 Revert accidental cargo submodule update 2025-02-25 10:43:50 +00:00
Oli Scherer
ffc955bcfb Don't require method impls for methods with Self:Sized bounds for impls for unsized types 2025-02-25 08:06:30 +00:00
bors
ad27045c31 Auto merge of #137571 - tgross35:rollup-i1tcnv1, r=tgross35
Rollup of 8 pull requests

Successful merges:

 - #134655 (Stabilize `hash_extract_if`)
 - #135933 (Explain how Vec::with_capacity is faithful)
 - #136668 (Stabilize `core::str::from_utf8_mut` as `const`)
 - #136775 (Update `String::from_raw_parts` safety requirements)
 - #137109 (stabilize extract_if)
 - #137349 (Implement `read_buf` for zkVM stdin)
 - #137493 (configure.py: don't instruct user to run nonexistent program)
 - #137516 (remove some unnecessary rustc_const_unstable)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-02-25 05:41:34 +00:00
bors
f5729cfed3 Auto merge of #137573 - compiler-errors:rollup-noq9yhp, r=compiler-errors
Rollup of 11 pull requests

Successful merges:

 - #136522 (Remove `feature(dyn_compatible_for_dispatch)` from the compiler)
 - #137289 (Consolidate and improve error messaging for `CoerceUnsized` and `DispatchFromDyn`)
 - #137321 (Correct doc about `temp_dir()` behavior on Android)
 - #137417 (rustc_target: Add more RISC-V atomic-related features)
 - #137489 (remove `#[rustc_intrinsic_must_be_overridde]`)
 - #137530 (DWARF mixed versions with LTO on MIPS)
 - #137543 (std: Fix another new symlink test on Windows)
 - #137548 (Pass correct `TypingEnv` to `InlineAsmCtxt`)
 - #137550 (Don't immediately panic if dropck fails without returning errors)
 - #137552 (Update books)
 - #137556 (rename simd_shuffle_generic → simd_shuffle_const_generic)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-02-25 02:24:40 +00:00
Michael Goulet
6c1f959288
Rollup merge of #137556 - RalfJung:simd_shuffle_const_generic, r=oli-obk
rename simd_shuffle_generic → simd_shuffle_const_generic

I've been confused by this name one time too often. ;)

r? `@oli-obk`
2025-02-24 19:21:51 -05:00
Michael Goulet
c11a523f74
Rollup merge of #137552 - rustbot:docs-update, r=ehuss
Update books

## rust-lang/book

2 commits in d4d2c18cbd20876b2130a546e790446a8444cb32..4a01a9182496f807aaa5f72d93a25ce18bcbe105
2025-02-24 14:48:34 UTC to 2025-02-13 19:29:47 UTC

- Fix typos in chapter 17 (rust-lang/book#4238)
- NoStarch backports (rust-lang/book#4224)

## rust-lang/edition-guide

2 commits in 8dbdda7cae4fa030f09f8f5b63994d4d1dde74b9..daa4b763cd848f986813b5cf8069e1649f7147af
2025-02-22 14:58:51 UTC to 2025-02-21 02:30:17 UTC

- Remove precise capturing features (rust-lang/edition-guide#362)
- use same name as previous example (rust-lang/edition-guide#360)

## rust-lang/nomicon

1 commits in 336f75835a6c0514852cc65aba9a698b699b13c8..8f5c7322b65d079aa5b242eb10d89a98e12471e1
2025-02-19 13:16:47 UTC to 2025-02-19 13:16:47 UTC

- other-reprs: do not make it sound like we are making ABI promises for repr(int) enums (rust-lang/nomicon#461)

## rust-lang/reference

4 commits in 6195dbd70fc6f0980c314b4d23875ac570d8253a..615b4cec60c269cfc105d511c93287620032d5b0
2025-02-18 23:01:53 UTC to 2025-02-13 15:12:49 UTC

- Add rule identifiers to names chapters (rust-lang/reference#1737)
- Switch from AVX to SSE in the example (rust-lang/reference#1735)
- Remove attributes from struct field rest patterns (rust-lang/reference#1736)
- Update reference for target_feature_11. (rust-lang/reference#1720)
2025-02-24 19:21:50 -05:00
Michael Goulet
6e6dcedb61
Rollup merge of #137550 - matthewjasper:panic-later-for-missing-dropck-error, r=compiler-errors
Don't immediately panic if dropck fails without returning errors

This span_bug was a little too optimistic. I've decided that matching on the ErrorGuaranteed is a little more sensible than a delay bug that will always be ignored.

closes #137329
r? `@compiler-errors`
2025-02-24 19:21:49 -05:00