1
Fork 0
Commit graph

280080 commits

Author SHA1 Message Date
Matthias Krüger
f8d103df43
Rollup merge of #133382 - mu001999-contrib:diag/fnitem, r=lcnr
Suggest considering casting fn item as fn pointer in more cases

Fixes #132648
2025-01-29 15:29:27 +01:00
Guillaume Gomez
b7951380ca Improve check for --output-format combinations and add ui regression test 2025-01-29 15:18:14 +01:00
Guillaume Gomez
a5d66e07e1 Improve code and add missing docs for new doctest::extracted module 2025-01-29 14:38:03 +01:00
Guillaume Gomez
07c878910b Add documentation for --output-format=doctest 2025-01-29 14:38:03 +01:00
Guillaume Gomez
5e9e27e21b Mention the tracking issue of --output-format=doctest 2025-01-29 13:57:28 +01:00
Guillaume Gomez
43bf52989a Move extracted doctest code and types into its own file 2025-01-29 13:57:27 +01:00
Guillaume Gomez
7fa2094cb1 Add ui test for new rustdoc --output-format=doctest option 2025-01-29 13:57:27 +01:00
Guillaume Gomez
0323af93b4 Add new output-format 2025-01-29 13:57:27 +01:00
onur-ozkan
869bc2fded override build profile for bootstrap tests
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-01-29 11:49:13 +00:00
bors
a1d7676d6a Auto merge of #136227 - fmease:rollup-ewpvznh, r=fmease
Rollup of 9 pull requests

Successful merges:

 - #136121 (Deduplicate operand creation between scalars, non-scalars and string patterns)
 - #136134 (Fix SIMD codegen tests on LLVM 20)
 - #136153 (Locate asan-odr-win with other sanitizer tests)
 - #136161 (rustdoc: add nobuild typescript checking to our JS)
 - #136166 (interpret: is_alloc_live: check global allocs last)
 - #136168 (GCI: Don't try to eval / collect mono items inside overly generic free const items)
 - #136170 (Reject unsound toggling of Arm atomics-32 target feature)
 - #136176 (Render pattern types nicely in mir dumps)
 - #136186 (uefi: process: Fix args)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-01-29 11:27:18 +00:00
Guillaume Gomez
2511faf61d Add SemiBold for SourceSerif4 2025-01-29 11:44:14 +01:00
Oli Scherer
a639e276f3 Allow transmuting generic pattern types to and from their base 2025-01-29 10:25:55 +00:00
Oli Scherer
22f074129a Add tests for transmuting pattern types 2025-01-29 10:25:55 +00:00
Guillaume Gomez
895564e038 Add italic for newly added sans serif fonts 2025-01-29 11:01:14 +01:00
Guillaume Gomez
999a25ee89 Fix tidy errors 2025-01-29 11:01:14 +01:00
Guillaume Gomez
91f6e000c2 Fix tidy errors 2025-01-29 11:01:14 +01:00
Guillaume Gomez
65fedebfc4 Add GUI test for new "sans serif fonts" setting 2025-01-29 11:01:14 +01:00
Guillaume Gomez
d93cbe5d69 Add new setting allowing to switch to sans serif fonts 2025-01-29 11:01:14 +01:00
Kajetan Puchalski
b7916fb4b7 tests: Skip const OOM tests on aarch64-unknown-linux-gnu
Skip const OOM tests on AArch64 Linux through explicit annotations
instead of inside opt-dist.
Intended to avoid confusion in cases like #135952.

Prerequisite for https://github.com/rust-lang/rust/pull/135960.
2025-01-29 09:17:35 +00:00
Marijn Schouten
57cfcd228d use impl Into<String> 2025-01-29 09:48:08 +01:00
bors
61cc3e51f8 Auto merge of #136117 - lnicola:sync-from-ra, r=lnicola
Subtree update of `rust-analyzer`

r? `@ghost`
2025-01-29 08:43:30 +00:00
许杰友 Jieyou Xu (Joe)
6f5a1035f8 tests: port translation to rmake.rs
Co-authored-by: Oneirical <manchot@videotron.ca>
2025-01-29 08:11:01 +00:00
许杰友 Jieyou Xu (Joe)
5f513a6a88 run-make-support: improve docs for assert_exit_code 2025-01-29 08:11:01 +00:00
许杰友 Jieyou Xu (Joe)
dd616d6a16 run-make-support: add sysroot helper
Convenience helper for `rustc --print=sysroot`.
2025-01-29 08:10:05 +00:00
uellenberg
1565254478 Fix off-by-one error causing driftsort to crash
Fixes #136103.
Based on the analysis by @jonathan-gruber-jg and @orlp.
2025-01-28 23:39:46 -08:00
Bart Jacobs
810e4c1bc6
btree/node.rs: pop_internal_level: does not invalidate other handles 2025-01-29 08:35:29 +01:00
The Miri Cronjob Bot
667da1e3bd Merge from rustc 2025-01-29 05:25:22 +00:00
The Miri Cronjob Bot
548929f3d6 Preparing for merge from rustc 2025-01-29 05:18:27 +00:00
许杰友 Jieyou Xu (Joe)
bec4359db9
Merge pull request #2227 from Joren-vanGoethem/master 2025-01-29 05:03:36 +00:00
León Orell Valerian Liehr
7e60f276ce
Rollup merge of #136186 - Ayush1325:uefi-process-args-fix, r=nicholasbishop,Noratrieb
uefi: process: Fix args

- While working on process env support, I found that args were currently broken. Not sure how I missed it in the PR, but well here is the fix.
- Additionally, no point in adding space at the end of args.
2025-01-29 06:03:25 +01:00
León Orell Valerian Liehr
f49ad60fee
Rollup merge of #136176 - oli-obk:pattern-type-mir-opts, r=compiler-errors
Render pattern types nicely in mir dumps

avoid falling through to the fallback rendering that just does a hex dump

r? ``@scottmcm``

best reviewed commit by commit
2025-01-29 06:03:24 +01:00
León Orell Valerian Liehr
0b1d717758
Rollup merge of #136170 - taiki-e:atomics-32, r=workingjubilee
Reject unsound toggling of Arm atomics-32 target feature

This target feature has the same semantics as RISC-V `forced-atomics` target feature that already marked as Forbidden  (f5ed0cb217) and toggling it can cause ABI incompatibility.

2f348cb7ce/compiler/rustc_target/src/target_features.rs (L479-L483)

[Comment on feature definition in LLVM](7109f52197/llvm/lib/Target/ARM/ARMFeatures.td (L572-L574)) also says:

> Code built with this feature is not ABI-compatible with code built without this feature, if atomic variables are exposed across the ABI boundary.

r? `@workingjubilee` or `@RalfJung`

`@rustbot` label +O-Arm
2025-01-29 06:03:24 +01:00
León Orell Valerian Liehr
e37b744bae
Rollup merge of #136168 - fmease:gci-fix-mono, r=compiler-errors
GCI: Don't try to eval / collect mono items inside overly generic free const items

Fixes #136156. Thanks for the pointers, errs!

There's one (preexisting) thing of note (maybe?). There's a difference between `const _: () = panic!();` and `const _<'a>: () = panic!();`: The former is a pre-mono error, the latter is a post-mono error. For comparison, both `fn _f() { const { panic!() } }` and `fn _f<'a: 'a>() { const { panic!() } }` are post-mono errors.

cc `@oli-obk`
r? compiler-errors or reassign
2025-01-29 06:03:23 +01:00
León Orell Valerian Liehr
bde47b7ae8
Rollup merge of #136166 - RalfJung:interpet-is-alloc-live, r=compiler-errors
interpret: is_alloc_live: check global allocs last

See https://github.com/rust-lang/rust/pull/136105#discussion_r1930609553.

(A perf run makes no sense as this is only used by Miri.)
2025-01-29 06:03:23 +01:00
León Orell Valerian Liehr
3cc6ea2ac6
Rollup merge of #136161 - notriddle:typescript, r=GuillaumeGomez
rustdoc: add nobuild typescript checking to our JS

By nobuild, I mean that the type annotations are all [in comments], not in the "native" typescript syntax. This is a bit uglier, but it lets you rapid-prototype without tsc, works with all the native browser debugging tools, and keeps Node out of Rust's bootstrap chain.

[in comments]: https://news.ycombinator.com/item?id=35892250

This pull request mostly just adds ts-ignore annotations and type declarations. To actually take good advantage of typescript, we'll want to "burn down" this pile of unsafe code until we eventually have a version with almost none of these.

This PR also adds tsc to the mingw-check Dockerfile, so that it can't fall out of date like the Closure annotations did.

https://rust-lang.zulipchat.com/#narrow/channel/266220-t-rustdoc/topic/typescript

r? `@GuillaumeGomez` `@lolbinarycat`
2025-01-29 06:03:22 +01:00
León Orell Valerian Liehr
dbc204d5d5
Rollup merge of #136153 - tmiasko:mv-asan-test, r=lqd
Locate asan-odr-win with other sanitizer tests
2025-01-29 06:03:21 +01:00
León Orell Valerian Liehr
01f1dab0e9
Rollup merge of #136134 - nikic:llvm-20-simd-tests, r=Urgau
Fix SIMD codegen tests on LLVM 20

The splat constants are printed differently on LLVM 20.
2025-01-29 06:03:21 +01:00
León Orell Valerian Liehr
8d183d2b86
Rollup merge of #136121 - oli-obk:push-zzvxlynmnqpp, r=estebank
Deduplicate operand creation between scalars, non-scalars and string patterns

just something that felt duplicated and would make pattern type handling a bit more roundabout.
2025-01-29 06:03:20 +01:00
许杰友 Jieyou Xu (Joe)
7fa9822b3d
Merge pull request #2231 from yegeunyang/#2069 2025-01-29 05:02:55 +00:00
bors
ccc9ba5c30 Auto merge of #136225 - fmease:rollup-fm7m744, r=fmease
Rollup of 7 pull requests

Successful merges:

 - #135625 ([cfg_match] Document the use of expressions.)
 - #135902 (Do not consider child bound assumptions for rigid alias)
 - #135943 (Rename `Piece::String` to `Piece::Lit`)
 - #136104 (Add mermaid graphs of NLL regions and SCCs to polonius MIR dump)
 - #136143 (Update books)
 - #136147 (ABI-required target features: warn when they are missing in base CPU)
 - #136164 (Refactor FnKind variant to hold &Fn)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-01-29 05:00:20 +00:00
yegeunyang
4260e3a5b8 Touch up a sentence 2025-01-28 22:56:52 -06:00
许杰友 Jieyou Xu (Joe)
d8cca31abf
Merge pull request #2232 from yegeunyang/#2114
Add a link to declare_lint! macro doc in diagnostics.md
2025-01-29 04:08:54 +00:00
许杰友 Jieyou Xu (Joe)
8520031842
Merge pull request #2229 from notriddle/typescript
Add some extra pointers for rustdoc frontend devs
2025-01-29 03:53:00 +00:00
yegeunyang
0127e6479f Add link to declare_lint! macro 2025-01-28 21:05:12 -06:00
yegeunyang
941ab8cd18 Add "Writing tests" section 2025-01-28 20:42:26 -06:00
León Orell Valerian Liehr
28393070ab
Rollup merge of #136164 - celinval:chores-fnkind, r=oli-obk
Refactor FnKind variant to hold &Fn

Pulling the change suggested in #128045 to reduce the impact of changing `Fn` item.

r? `@oli-obk`
2025-01-29 03:12:22 +01:00
León Orell Valerian Liehr
7e123e4940
Rollup merge of #136147 - RalfJung:required-target-features-check-not-add, r=workingjubilee
ABI-required target features: warn when they are missing in base CPU

Part of https://github.com/rust-lang/rust/pull/135408:
instead of adding ABI-required features to the target we build for LLVM, check that they are already there. Crucially we check this after applying `-Ctarget-cpu` and `-Ctarget-feature`, by reading `sess.unstable_target_features`. This means we can tweak the ABI target feature check without changing the behavior for any existing user; they will get warnings but the target features behave as before.

The test changes here show that we are un-doing the "add all required target features" part. Without the full #135408, there is no way to take a way an ABI-required target feature with `-Ctarget-cpu`, so we cannot yet test that part.

Cc ``@workingjubilee``
2025-01-29 03:12:21 +01:00
León Orell Valerian Liehr
bb31b9c0aa
Rollup merge of #136143 - rustbot:docs-update, r=ehuss
Update books

## rust-lang/book

3 commits in 82a4a49789bc96db1a1b2a210b4c5ed7c9ef0c0d..fa312a343fbff01bc6cef393e326817f70719813
2025-01-22 17:14:29 UTC to 2025-01-22 15:09:26 UTC

- chore: reformat src with dprint (rust-lang/book#4211)
- Redirects: get rid of the weird gap in Ch. 20 sections! (rust-lang/book#4209)
- Document that `use` is also for `precise capturing` (rust-lang/book#4210)

## rust-lang/edition-guide

1 commits in d56e0f3a0656b7702ca466d4b191e16c28262b82..4ed5a1a4a2a7ecc2e529a5baaef04f7bc7917eda
2025-01-21 21:39:56 UTC to 2025-01-21 21:39:56 UTC

- Add alternatives for static-mut-refs (rust-lang/edition-guide#354)

## rust-lang/nomicon

3 commits in 625b200e5b33a5af35589db0bc454203a3d46d20..bc2298865544695c63454fc1f9f98a3dc22e9948
2025-01-23 19:01:24 UTC to 2025-01-20 14:37:52 UTC

- corrected grammatical error. (rust-lang/nomicon#477)
- Remove `#![start]` attribute (rust-lang/nomicon#478)
- Update guidance on uninitialized fields to use &raw mut instead of addr_of_mut! (rust-lang/nomicon#476)

## rust-lang/reference

10 commits in 293af991003772bdccf2d6b980182d84dd055942..93b921c7d3213d38d920f7f905a3bec093d2217d
2025-01-25 21:59:01 UTC to 2025-01-14 17:28:04 UTC

- distinct 'static' items never overlap (rust-lang/reference#1657)
- Change `'_static` to `'static` as an invalid lifetime parameter name (rust-lang/reference#1721)
- reword reference about inert attributes (rust-lang/reference#1719)
- Provide a better error message for broken links in mdbook-spec (rust-lang/reference#1716)
- Remove unstable vectorcall (rust-lang/reference#1717)
- Move the function pointer example (rust-lang/reference#1718)
- references and Box must be non-null (rust-lang/reference#1715)
- Fix filename for theme customization (rust-lang/reference#1711)
- Add Identifier Syntax to Several Chapters (rust-lang/reference#1597)
- move r[rules] to the left of the main body, using a grid (rust-lang/reference#1710)
2025-01-29 03:12:20 +01:00
León Orell Valerian Liehr
ee96bf2a94
Rollup merge of #136104 - lqd:polonius-debugger-episode-2, r=matthewjasper
Add mermaid graphs of NLL regions and SCCs to polonius MIR dump

This PR expands the polonius MIR dump again with a couple of mermaid charts ported from the graphviz version:
- the NLL region graph
- and the NLL SCCs

I still have done zero visual design on this until now, but [here's](https://gistpreview.github.io/?fbbf900fed2ad21108c7ca0353456398) how it looks (i.e. still bad) just to give an idea of the result.

r? `````@matthewjasper````` (feel free to reassign) or anyone
2025-01-29 03:12:20 +01:00
León Orell Valerian Liehr
dbb092b671
Rollup merge of #135943 - hkBst:opt_imports, r=estebank
Rename `Piece::String` to `Piece::Lit`

This renames Piece::String to Piece::Lit to avoid shadowing std::string::String and removes "pub use Piece::*;".
2025-01-29 03:12:19 +01:00