Kevin Reid
58d4395c1a
Expand and organize offset_of! documentation.
...
* Give example of how to get the offset of an unsized tail field
(prompted by discussion <https://github.com/rust-lang/rust/pull/133055#discussion_r1986422206 >).
* Specify the return type.
* Add section headings.
* Reduce “Visibility is respected…”, to a single sentence.
2025-03-10 16:23:54 -07:00
Kevin Reid
96814ae55f
Rewrite example to not deal with Copy at all.
...
It also now demonstrates how to avoid memory leaks.
2025-03-10 15:03:36 -07:00
binarycat
20bac26165
main.js: remove searchState from globals.
2025-03-10 16:38:11 -05:00
Nicole L
2b3b0bd50b
Remove unused file
2025-03-10 14:19:27 -07:00
Kevin Reid
2cc999d0d4
Rewrite comments about dropping and leaking.
2025-03-10 13:54:07 -07:00
binarycat
7421546f6b
main.js: typecheck things related to window.register_type_impls
2025-03-10 15:00:36 -05:00
binarycat
749b6bf79f
rustdoc.d.ts: add window.{register_implementors,pending_implementors}
2025-03-10 15:00:36 -05:00
binarycat
2e1c8f088a
rustdoc.d.ts: window.SIDEBAR_ITEMS may exist.
2025-03-10 15:00:35 -05:00
binarycat
ab180c29e3
main.js: handle document.activeElement being null
...
this is technically possible if someone sticks rustdoc in
an iframe, i think?
2025-03-10 15:00:35 -05:00
binarycat
f5efd2aba3
main.js(isDisplayed): coerce truthy values to boolean
2025-03-10 15:00:35 -05:00
binarycat
6622111906
main.js: always refer to searchState through window.searchState
2025-03-10 15:00:34 -05:00
binarycat
da5da99999
main.js: handleEscape and handleShortcut accept KeyboardEvent
2025-03-10 15:00:34 -05:00
binarycat
cf7f3cf424
main.js: give type signatures to a few helper functions
2025-03-10 15:00:30 -05:00
binarycat
93161f5c14
main.js: don't set mouseMovedAfterSearch, as it is never read
2025-03-10 15:00:24 -05:00
binarycat
d75c9733f4
main.js: insertAfter needs non-root referenceNode
2025-03-10 15:00:17 -05:00
Nicole L
f5dd3d13fc
Update Trusty support to account for recent libstd reorganization
2025-03-10 12:54:59 -07:00
David Tenty
e337d87e96
Add powerpc64le maintainers
2025-03-10 15:50:50 -04:00
bors
9fb94b32df
Auto merge of #138310 - matthiaskrgr:rollup-zvbpuei, r=matthiaskrgr
...
Rollup of 8 pull requests
Successful merges:
- #137931 (Add remark for missing `llvm-tools` component re. `rustc_private` linker failures related to not finding LLVM libraries)
- #138138 (Pass `InferCtxt` to `InlineAsmCtxt` to properly taint on error)
- #138223 (Fix post-merge workflow)
- #138268 (Handle empty test suites in GitHub job summary report)
- #138278 (Delegation: fix ICE with invalid `MethodCall` generation)
- #138281 (Fix O(tests) stack usage in edition 2024 mergeable doctests)
- #138305 (Subtree update of `rust-analyzer`)
- #138306 (Revert "Use workspace lints for crates in `compiler/` #138084 ")
r? `@ghost`
`@rustbot` modify labels: rollup
2025-03-10 18:38:06 +00:00
David Barsky
da0e278647
Merge pull request #18964 from davidbarsky/davidbarsky/port-rust-analyzer-to-new-salsa
...
internal: port rust-analyzer to new Salsa
2025-03-10 18:12:35 +00:00
Matthias Krüger
dcf6137b5c
use next_back() instead of last() on DoubleEndedIterator
2025-03-10 19:03:51 +01:00
David Barsky
a5c071633b
internal: port rust-analyzer to new Salsa
2025-03-10 13:30:51 -04:00
rustbot
5d4ff50f49
Update books
2025-03-10 18:01:15 +01:00
Nicole LeGare
0b1a7ab339
Remove custom TLS implementation for Trusty targets
2025-03-10 10:00:25 -07:00
Nicole LeGare
5b941136f1
Update Trusty platform docs
2025-03-10 10:00:25 -07:00
Nicole LeGare
22fea97c9d
Disable unsupported tests
...
Unclear why this needs to be done manually and is not done by the existing Trusty patches.
2025-03-10 10:00:25 -07:00
Nicole LeGare
d633d8e074
Format after patches have been applied
2025-03-10 10:00:25 -07:00
Nicole LeGare
7f6ee12526
Apply rustc-0054-Add-std-os-fd-support-for-Trusty.patch
2025-03-10 10:00:24 -07:00
Nicole LeGare
87ca2dbb00
Apply rustc-0023-Add-Trusty-OS-support-to-Rust-std.patch
2025-03-10 10:00:24 -07:00
David Barsky
83c1c4c2bb
internal(config): use FxIndexMap for default completion snippets
2025-03-10 12:55:46 -04:00
Philipp Krones
a25cbd50ca
Improve needless_pass_by_value suggestion ( #13880 )
...
Fixes https://github.com/rust-lang/rust-clippy/issues/13744 .
A simple check to check if the type is an `Option` allows to improve the
suggestion.
changelog: Improve `needless_pass_by_value` suggestion
2025-03-10 15:48:43 +00:00
Paul Menage
9e5c942286
Mark some std tests as requiring panic = "unwind"
...
This allows these test modules to pass on builds/targets without
unwinding support, where `panic = "abort"` - the ignored tests are for
functionality that's not supported on those targets.
2025-03-10 08:31:06 -07:00
Nathaniel Woods
e48617f817
Changing #[stable] tag
2025-03-10 11:12:26 -04:00
Nathaniel Woods
8bbc080cc7
Added Clone implementation for ChunkBy
2025-03-10 11:12:26 -04:00
onur-ozkan
bf58a3521f
stabilize ci_rustc_if_unchanged_logic test for local environments
...
Signed-off-by: onur-ozkan <work@onurozkan.dev >
2025-03-10 18:10:56 +03:00
Matthias Krüger
44ec67fffb
Rollup merge of #138306 - jieyouxu:revert-workspace-lints, r=Noratrieb
...
Revert "Use workspace lints for crates in `compiler/` #138084 "
Revert <https://github.com/rust-lang/rust/pull/138084 > to buy time to consider options that avoids breaking downstream usages of cargo on distributed `rustc-src` artifacts, where such cargo invocations fail due to inability to inherit `lints` from workspace root manifest's `workspace.lints` (this is only valid for the source rust-lang/rust workspace, but not really the distributed `rustc-src` artifacts). The problem is that the `rustc-src` component doesn't include the root `Cargo.toml` manifest.
This breakage was reported in https://github.com/rust-lang/rust/issues/138304 .
This reverts commit 48caf81484 , reversing changes made to c6662879b2 .
cc `@RalfJung`
r? `@nnethercote` (sorry, I didn't consider this being a thing 💀 )
2025-03-10 15:57:22 +01:00
Matthias Krüger
2abeceeb97
Rollup merge of #138305 - lnicola:sync-from-ra, r=lnicola
...
Subtree update of `rust-analyzer`
r? `@ghost`
2025-03-10 15:57:19 +01:00
Matthias Krüger
d1a875cd37
Rollup merge of #138281 - saethlin:mergeable-doctests-stacksize, r=GuillaumeGomez
...
Fix O(tests) stack usage in edition 2024 mergeable doctests
Fixes https://github.com/rust-lang/rust/issues/138248
The important change here is that we are not passing a potentially-large array by value. Between the fact that `TestFn` cannot be `Clone` and `test_main` takes a `Vec<TestDescAndFn>`, the only way to call `test::test_main` without O(tests) stack use is to call `Vec::push` many times.
The normal test harness does not have this problem because it calls `test_main_static` or `test_main_static_abort`, which take `&[TestDescAndFn]`. Changing `test::test_main` to take a slice is not a simple change, so I'm avoiding doing it here.
2025-03-10 15:57:15 +01:00
Matthias Krüger
0d6311931b
Rollup merge of #138278 - Bryanskiy:delegation-ice-1, r=petrochenkov
...
Delegation: fix ICE with invalid `MethodCall` generation
`ExprKind::MethodCall` is now generated instead of `ExprKind::Call` if
- the resolved function has a `&self` argument
- the resolved function is an associated item <- was missed before
Fixes https://github.com/rust-lang/rust/issues/128190
Fixes https://github.com/rust-lang/rust/issues/128119
Fixes https://github.com/rust-lang/rust/issues/127916
r? `@petrochenkov`
2025-03-10 15:57:14 +01:00
Matthias Krüger
5717cc9ef7
Rollup merge of #138268 - Kobzol:fix-summary-nan, r=jieyouxu
...
Handle empty test suites in GitHub job summary report
Should fix [NaN](https://github.com/rust-lang-ci/rust/actions/runs/13739044506#summary-38426140405 )s being printed.
r? `@jieyouxu`
2025-03-10 15:57:12 +01:00
Matthias Krüger
739672cf16
Rollup merge of #138223 - Kobzol:fix-post-merge, r=marcoieni
...
Fix post-merge workflow
I forgot that `actions/checkout` only checks out a single commit by default. I also forgot to set the environment variable required for the `gh` CLI commands.
I did a few more tests on my fork and hopefully now it should work properly. I also tested it with fake rollup PRs and the comment was sent only to the merged rollup, as it should be.
r? `@marcoieni`
2025-03-10 15:57:10 +01:00
Matthias Krüger
69c7e3664d
Rollup merge of #138138 - compiler-errors:inline-asm-tainting, r=oli-obk
...
Pass `InferCtxt` to `InlineAsmCtxt` to properly taint on error
Pass an `InferCtxt` into the `InlineAsmCtxt` so that we can use the right dcx to taint the infcx properly, so that we don't try to build invalid MIR for inline asm blocks.
Fixes #138130
Shares the first commit with #137502 .
r? oli-obk
2025-03-10 15:57:09 +01:00
Matthias Krüger
150e88c549
Rollup merge of #137931 - xizheyin:issue-137421, r=jieyouxu
...
Add remark for missing `llvm-tools` component re. `rustc_private` linker failures related to not finding LLVM libraries
Fixes #137421
2025-03-10 15:57:08 +01:00
Lukas Wirth
5dfe55fb49
Merge pull request #19305 from davidbarsky/davidbarsky/vendor-query-group-macro
...
internal: vendor `query-group-macro` in rust-analyzer
2025-03-10 14:29:45 +00:00
Michael Goulet
bc4f0bb486
Pass InferCtxt to InlineAsmCtxt to properly taint on error
...
Split up some of the tests bc tainting causes some errors to become
suppressed
2025-03-10 14:28:09 +00:00
clubby789
28bd22c3d9
rustdoc: Gate unstable doc(cfg()) predicates
2025-03-10 14:18:56 +00:00
David Barsky
02ac23a7d6
internal: vendor query-group-macro
2025-03-10 10:12:52 -04:00
LemonJ
48a54d026d
add missing doc for intrinsic
2025-03-10 22:08:30 +08:00
Bryanskiy
61122d1829
Delegation: fix ICE with invalid MethodCall generation
2025-03-10 17:08:29 +03:00
Folkert de Vries
9213cb80c2
fix ICE in pretty-printing global_asm!
2025-03-10 14:46:01 +01:00
王宇逸
9cab8c25dc
Remove stack overflow handler for cygwin
2025-03-10 21:23:32 +08:00