about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2024-12-06Merge pull request #18610 from Veykril/push-kynytqktmnxqLukas Wirth-2/+157
Add implict unsafety inlay hints for extern blocks
2024-12-06Add implict unsafety inlay hints for extern blocksLukas Wirth-2/+157
2024-12-06Make bracket typing handler work on more thingsLukas Wirth-130/+199
2024-12-06fix SC fence logicRalf Jung-4/+8
2024-12-06Rollup merge of #133930 - chriskrycho:mdbook-trpl-package, r=ehussMatthias Krüger-29/+32
rustbook: update to use new mdbook-trpl package from The Book Updates to the latest merge from `rust-lang/book` and simplifies the dependency chain there. There are now three preprocessors, but only one package, so everything is a lot nicer to deal with from the consuming POV (i.e. here).
2024-12-06Rollup merge of #133211 - Strophox:miri-correct-state-update-ffi, r=RalfJungMatthias Krüger-47/+366
Extend Miri to correctly pass mutable pointers through FFI Based off of https://github.com/rust-lang/rust/pull/129684, this PR further extends Miri to execute native calls that make use of pointers to *mutable* memory. We adapt Miri's bookkeeping of internal state upon any FFI call that gives external code permission to mutate memory. Native code may now possibly write and therefore initialize and change the pointer provenance of bytes it has access to: Such memory is assumed to be *initialized* afterwards and bytes are given *arbitrary (wildcard) provenance*. This enables programs that correctly use mutating FFI calls to run Miri without errors, at the cost of possibly missing Undefined Behaviour caused by incorrect usage of mutating FFI. > <details> > > <summary> Simple example </summary> > > ```rust > extern "C" { > fn init_int(ptr: *mut i32); > } > > fn main() { > let mut x = std::mem::MaybeUninit::<i32>::uninit(); > let x = unsafe { > init_int(x.as_mut_ptr()); > x.assume_init() > }; > > println!("C initialized my memory to: {x}"); > } > ``` > ```c > void init_int(int *ptr) { > *ptr = 42; > } > ``` > should now show `C initialized my memory to: 42`. > > </details> r? ``@RalfJung``
2024-12-06Rollup merge of #130777 - azhogin:azhogin/reg-struct-return, r=workingjubileeMatthias Krüger-0/+15
rust_for_linux: -Zreg-struct-return commandline flag for X86 (#116973) Command line flag `-Zreg-struct-return` for X86 (32-bit) for rust-for-linux. This flag enables the same behavior as the `abi_return_struct_as_int` target spec key. - Tracking issue: https://github.com/rust-lang/rust/issues/116973
2024-12-06handle `json_output` in `test::run_cargo_test`onur-ozkan-0/+5
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-12-06skip formatting when `--json-output` is usedonur-ozkan-11/+21
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-12-06Merge pull request #4057 from RalfJung/scfixRalf Jung-241/+225
Fix weak memory emulation to avoid generating behaviors that are forbidden under C++ 20
2024-12-06Merge pull request #18625 from Veykril/push-npnxwpxuzlqzLukas Wirth-4/+71
fix: Fix parser getting stuck for bad asm expressions
2024-12-06Merge from rustcThe Miri Cronjob Bot-250/+148
2024-12-06Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2024-12-06fix: Fix parser getting stuck for bad asm expressionsLukas Wirth-4/+71
2024-12-06Update src/doc/rustc/src/platform-support/powerpc64le-unknown-linux-musl.mdJens Reidel-1/+1
Co-authored-by: famfo <famfo@famfo.xyz>
2024-12-06Fix markdown linkJens Reidel-1/+1
Signed-off-by: Jens Reidel <adrian@travitia.xyz>
2024-12-06Promote powerpc64le-unknown-linux-musl to tier 2 with host toolsJens Reidel-5/+101
MCP: https://github.com/rust-lang/compiler-team/issues/803 Signed-off-by: Jens Reidel <adrian@travitia.xyz>
2024-12-05Rollup merge of #133827 - ojeda:ci-rfl, r=lqdGuillaume Gomez-2/+2
CI: rfl: move job forward to Linux v6.13-rc1 Linux v6.13-rc1 contains commit 28e848386b92 ("rust: block: fix formatting of `kernel::block::mq::request` module"), which in turn contains commit c95bbb59a9b2 ("rust: enable arbitrary_self_types and remove `Receiver`"), which is why we had a hash rather than a tag. r? ```@Kobzol``` ```@lqd``` try-job: x86_64-rust-for-linux ```@rustbot``` label A-rust-for-linux ```@bors``` try
2024-12-05Rollup merge of #133821 - Kobzol:replace-black-with-ruff, r=onur-ozkanGuillaume Gomez-1007/+1514
Replace black with ruff in `tidy` `ruff` can both lint and format Python code (in fact, it should be a mostly drop-in replacement for `black` in terms of formatting), so it's not needed to use `black` anymore. This PR removes `black` and replaces it with `ruff`, to get rid of one Python dependency, and also to make Python formatting faster (although that's a small thing). If we decide to merge this, we'll need to "reformat the world" - `ruff` is not perfectly compatible with `black`, and it also looks like `black` was actually ignoring some files before. I tried it locally (`./x test tidy --extra-checks=py:fmt --bless`) and it also reformatted some code in subtrees (e.g. `clippy` or `rustc_codegen_gcc`) - I'm not sure how to handle that.
2024-12-05Rollup merge of #133256 - MarcoIeni:use-linux-free-runners, r=KobzolGuillaume Gomez-26/+77
CI: use free runners for i686-gnu jobs try-job: i686-gnu-1 try-job: i686-gnu-2 try-job: i686-gnu-nopt-1 try-job: i686-gnu-nopt-2
2024-12-05Stabilize noop_wakerEric Holk-10/+4
Co-authored-by: zachs18 <8355914+zachs18@users.noreply.github.com>
2024-12-05Improve positioning of "..." in collapsed impl blockGuillaume Gomez-3/+8
2024-12-05Use text ellipsis instead of bottom blurringGuillaume Gomez-11/+16
2024-12-05Turn `markdown_split_summary_and_content` into a method of `Markdown`Guillaume Gomez-49/+52
2024-12-05Update browser-ui-test version to 0.18.2Guillaume Gomez-1/+1
2024-12-05Always display first line of impl blocks even when collapsedGuillaume Gomez-47/+141
2024-12-05extend Miri to correctly pass mutable pointers through FFIStrophox-47/+366
Co-authored-by: Ralf Jung <post@ralfj.de>
2024-12-05Merge pull request #18622 from Veykril/push-wlzptrukvyupLukas Wirth-3/+68
fix: Fix parsing of dyn T in generic arg on 2015 edition
2024-12-05fix: Fix parsing of dyn T in generic arg on 2015 editionLukas Wirth-3/+68
2024-12-05Merge pull request #18538 from tareknaser/syntax_factory_sort_itemsDavid Barsky-23/+21
Migrate `sort_items` Assist to Use `SyntaxFactory`
2024-12-05Merge pull request #18483 from tareknaser/syntax_factory_introduce_named_genericDavid Barsky-27/+123
Migrate `introduce_named_generic` Assist to Use `SyntaxFactory`
2024-12-05fix: Resolve generic parameters within use capturesLukas Wirth-2/+90
2024-12-05rustbook: update to use new mdbook-trpl package from The BookChris Krycho-29/+32
2024-12-05Merge pull request #18620 from Veykril/push-pyulxnouvxkqLukas Wirth-85/+125
fix: Parse lifetime bounds in lifetime param into TypeBoundList
2024-12-05Parse lifetime bounds in lifetime param into TypeBoundListLukas Wirth-85/+125
This mainly aids in error recovery but also makes it a bit easier to handle lifetime resolution. While doing so it also came apparent that we were not actually lowering lifetime outlives relationships within lifetime parameter declaration bounds, so this fixes that.
2024-12-05Merge pull request #18619 from ShoyuVanilla/issue-18613Lukas Wirth-1/+55
fix: Panic when displaying generic params with defaults
2024-12-05fix: various typosBD103-1/+1
2024-12-06fix: Panic when displaying generic params with defaultsShoyu Vanilla-1/+55
2024-12-05Avoid passing byte slice to anonsocket_readtiif-8/+8
2024-12-05Merge pull request #18618 from Veykril/push-ysklqzomkyvpLukas Wirth-133/+351
fix: Fix parsing of integer/keyword name refs in various places
2024-12-05fix: Fix parsing of integer/keyword name refs in various placesLukas Wirth-133/+351
2024-12-05update section even more (#2156)lcnr-1/+9
2024-12-05fix: rename `syntax_editor_add_generic_param` to `add_generic_param`Tarek-2/+2
Signed-off-by: Tarek <tareknaser360@gmail.com>
2024-12-05closure constraints (#2155)lcnr-0/+21
2024-12-05Rollup merge of #133898 - onur-ozkan:ignore-git-hook-on-dist-sources, r=jieyouxuJacob Pratt-4/+6
skip `setup::Hook` on non-git sources Running `setup::Hook` (with `x setup`) leads tarball sources to panic and this PR resolves that problem by skipping `Hook` step on non-git sources.
2024-12-05Rollup merge of #133888 - ChrisDenton:job, r=jieyouxuJacob Pratt-26/+17
Improve bootstrap job objects This attempts to fix a few comments on bootstrap job objects. I also fixed an issue where if duplicating the job object handle into the python process failed, it would close the job object. This would then result in the job object closing all attached processes, which at that point includes the current process. The fix is to simply never close the job object handle at any point after the current process is assigned to it.
2024-12-05Rollup merge of #133867 - taiki-e:platform-support, r=NoratriebJacob Pratt-8/+8
Fix "std" support status of some tier 3 targets https://github.com/rust-lang/rust/pull/127265 marked targets with empty "std" support status as no-std targets in target-spec metadata: > * Where a targets 'std' or 'host tools' support is listed as '?' in the rust docs, these are left as 'None' with this PR. The corresponding changes in cargo will only reject an attempt to build std if the 'std' field is 'Some(false)'. In the case it is 'None', cargo will continue trying to build However, this is not accurate because "std" support status has a marker indicating that it is a no-std target. (empty status is just invalid.) https://doc.rust-lang.org/nightly/rustc/platform-support.html#tier-3 > The `std` column in the table below has the following meanings: > > * ✓ indicates the full standard library is available. > * \* indicates the target only supports [`no_std`] development. > * ? indicates the standard library support is unknown or a work-in-progress. > > [`no_std`]: https://rust-embedded.github.io/book/intro/no-std.html This PR fixes the status of targets whose "std" support status is currently set to empty and update target-spec metadata. The new status is set based on the following criteria: - Set to ✓ for targets that I regularly check in [rust-cross-toolchain](https://github.com/taiki-e/rust-cross-toolchain) that the `cargo test` works. (riscv32-unknown-linux-gnu,{riscv64,s390x}-unknown-linux-musl) - Targets where `cargo run` works but `cargo test` does not work tend to have incomplete std support (e.g., riscv32 musl https://github.com/taiki-e/rust-cross-toolchain/commit/f3068b66e042895806538bebba1ea982f13bfbb1), so I included them in the group below that means “work in progress” rather than in this group. - Set powerpc64le FreeBSD to ✓ on both std and host_tools, because the [Rust package](https://www.freshports.org/lang/rust/) is available. - Set to ? (which means "unknown" or “work in progress”) for all other affected targets because these are Linux, Android, FreeBSD, or Fuchsia, all of which are operating systems that support std if properly supported. r? Noratrieb cc ``@harmou01``
2024-12-05Merge pull request #18616 from Veykril/push-pkumxswtxspoLukas Wirth-3/+3
fix: Disable `<` typing handler again
2024-12-05Disable `<` typing handler againLukas Wirth-3/+3
2024-12-05skip `setup::Hook` on non-git sourcesonur-ozkan-4/+6
Signed-off-by: onur-ozkan <work@onurozkan.dev>