about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2024-09-30Provide an config option to not set `cfg(test)`Chayim Refael Friedman-15/+73
2024-09-29rustdoc-json: `Id(String)` -> `Id(u32)`schvv31n-333/+326
2024-09-29Auto merge of #18205 - noahmbright:object_safety, r=HKalbasibors-109/+117
Rename object_safety First PR here (yay!), so I read some of the getting started docs. There are a couple references to `handlers.rs`, which as far as I can tell has been refactored into `handlers/*.rs`. I made some tweaks to that in one commit. There is one fixme about a function called `to_lsp_runnable`, which I can't find anywhere at all. I can update that if I get some more info there. Otherwise I changed references to object safety, is object safe, etc., trying to match case/style as I went. There was one case I found where there's a trait from somewhere else called `is_object_safe`, which I found defined in my cargo registry. I didn't touch that for now, just marked it with a fixme
2024-09-29When glueing together tokens from macros, merge their spansChayim Refael Friedman-3/+31
2024-09-29Copy correct path to clipboard for modules/keywords/primitivesclubby789-5/+9
2024-09-29Auto merge of #18208 - davidbarsky:davidbarsky/push-qkwkmttnukqt, r=lnicolabors-3/+12
internal: allow overriding proc macro server in analysis-stats Needed this argument in order to profile the proc macro expansion server (c.f., [this Zulip conversation](https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Frust-analyzer/topic/.60macro_rules!.60-based.20macros.20for.20derives.2Fattributes/near/473466794)). I also took the opportunity to change the phrasing for `--proc-macro-srv`. Ran with `samply record ~/.cargo/bin/rust-analyzer analysis-stats --proc-macro-srv /Users/dbarsky/.cargo/bin/rust-analyzer-proc-macro-srv --parallel .` on rust-analyzer itself.
2024-09-29let rustfmt format importsRalf Jung-319/+255
2024-09-29internal: allow overriding proc macro server in analysis-statsDavid Barsky-3/+12
2024-09-29Rollup merge of #131000 - rust-lang:cargo_update, r=clubby789Matthias Krüger-26/+26
Weekly `cargo update` Automation to keep dependencies in `Cargo.lock` current. The following is the output from `cargo update`: ```txt Locking 5 packages to latest compatible versions Updating autocfg v1.3.0 -> v1.4.0 Updating flate2 v1.0.33 -> v1.0.34 Updating portable-atomic v1.8.0 -> v1.9.0 Updating syn v2.0.77 -> v2.0.79 Updating tempfile v3.12.0 -> v3.13.0 note: pass `--verbose` to see 81 unchanged dependencies behind latest library dependencies: Locking 0 packages to latest compatible versions note: pass `--verbose` to see 9 unchanged dependencies behind latest rustbook dependencies: Locking 13 packages to latest compatible versions Updating autocfg v1.3.0 -> v1.4.0 Updating cc v1.1.21 -> v1.1.22 Updating flate2 v1.0.33 -> v1.0.34 Updating libc v0.2.158 -> v0.2.159 Updating pkg-config v0.3.30 -> v0.3.31 Updating redox_syscall v0.5.4 -> v0.5.6 Updating serde_spanned v0.6.7 -> v0.6.8 Updating syn v2.0.77 -> v2.0.79 Updating tempfile v3.12.0 -> v3.13.0 Updating thiserror v1.0.63 -> v1.0.64 Updating thiserror-impl v1.0.63 -> v1.0.64 Updating toml_edit v0.22.21 -> v0.22.22 Updating winnow v0.6.18 -> v0.6.20 note: pass `--verbose` to see 30 unchanged dependencies behind latest ```
2024-09-29Rollup merge of #130931 - GuillaumeGomez:standalone-crate, r=notriddleMatthias Krüger-41/+44
Rename `standalone` doctest attribute into `standalone_crate` Following [zulip discussion](https://rust-lang.zulipchat.com/#narrow/stream/266220-t-rustdoc/topic/Renaming.20code.20block.20.22standalone.22.20attribute.3F) and poll results. r? `@notriddle`
2024-09-29Add documentation for `{{rust-src-base}}` (#2079)Urgau-0/+1
2024-09-29Rename object_safety to dyn_compatibilityNoah Bright-106/+112
Up to a trait implemented by another package, linking to $CARGO_HOME/registry/cache/index.crates.io-6f17d22bba15001f/
2024-09-29Rename doctest attribute `standalone-crate` into `standalone_crate` for ↵Guillaume Gomez-5/+5
coherency
2024-09-29Auto merge of #131012 - GuillaumeGomez:rollup-e9ovh3a, r=GuillaumeGomezbors-15/+50
Rollup of 5 pull requests Successful merges: - #130383 (check if it's rust-lang/rust CI job in `llvm::is_ci_llvm_modified`) - #130416 (resolve #130122: reword 'sort-by' edge-conditions documentation) - #130537 (rustdoc: add doc comment to DocVisitor) - #130743 (Clarifications for set_nonblocking methods) - #131010 (extend comment in global_llvm_features regarding target-cpu=native) r? `@ghost` `@rustbot` modify labels: rollup
2024-09-29Rollup merge of #130537 - lolbinarycat:rustdoc-DocVisitor-docs, r=GuillaumeGomezGuillaume Gomez-2/+9
rustdoc: add doc comment to DocVisitor
2024-09-29Rollup merge of #130383 - onur-ozkan:ignore-llvm-changes-on-ci-llvm-true, ↵Guillaume Gomez-13/+41
r=Mark-Simulacrum check if it's rust-lang/rust CI job in `llvm::is_ci_llvm_modified` Changes `llvm::is_ci_llvm_modified` to only work on rust-lang/rust managed CI.
2024-09-29bump few depsklensy-63/+24
2024-09-29Fix ambiguity with CamelCase diagnostic messagesMatthew Wilding-21/+21
2024-09-29Auto merge of #130983 - GuillaumeGomez:wait-for-false, r=notriddlebors-1/+1
Update `browser-ui-test` version and make use of `wait-for*-false` commands I added `wait-for*-false` commands, making possible these changes. r? `@notriddle`
2024-09-29skip old getrandom crate on SolarisRalf Jung-5/+10
2024-09-29in `llvm::is_ci_llvm_modified`, check if it's rust-lang/rust CI jobonur-ozkan-11/+1
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-09-29create `CiEnv::is_rust_lang_managed_ci_job`onur-ozkan-0/+9
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-09-29make `Step` doc-comments more clearonur-ozkan-18/+22
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-09-29Auto merge of #129687 - Urgau:rfc3127-sysroot-2, r=jieyouxubors-4/+15
Implement RFC3137 trim-paths sysroot changes - take 2 This PR is a continuation of https://github.com/rust-lang/rust/pull/118149. Nothing really changed, except for https://github.com/rust-lang/rust/pull/129408 which I was able to trigger locally. Original description: > Implement parts of #111540 > > Right now, backtraces into sysroot always shows /rustc/$hash in diagnostics, e.g. > > ``` > thread 'main' panicked at 'hello world', map-panic.rs:2:50 > stack backtrace: > 0: std::panicking::begin_panic > at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/panicking.rs:616:12 > 1: map_panic::main::{{closure}} > at ./map-panic.rs:2:50 > 2: core::option::Option<T>::map > at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/option.rs:929:29 > 3: map_panic::main > at ./map-panic.rs:2:30 > 4: core::ops::function::FnOnce::call_once > at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/ops/function.rs:248:5 > note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. > ``` > > [RFC 3127 said](https://rust-lang.github.io/rfcs/3127-trim-paths.html#changing-handling-of-sysroot-path-in-rustc) > > > We want to change this behaviour such that, when rust-src source files can be discovered, the virtual path is discarded and therefore the local path will be embedded, unless there is a --remap-path-prefix that causes this local path to be remapped in the usual way. > > This PR implements this behaviour. When `rust-src` is present at compile time, rustc replaces /rustc/$hash with a real path into local rust-src with best effort. To sanitise this, users must explicitly supply `--remap-path-prefix=<path to rust-src>=foo`. cc `@cbeuw` Fix #105907 Fix #85463 try-job: dist-x86_64-linux try-job: x86_64-msvc try-job: dist-x86_64-msvc try-job: armhf-gnu
2024-09-29Hook up std::net to wasi-libc on wasm32-wasip2 targetNicola Krumschmidt-2/+7
2024-09-29Adjust spacings and sizing to improve behavior with over-long namesFrank Steffahn-6/+12
2024-09-29cargo updategithub-actions-26/+26
Locking 5 packages to latest compatible versions Updating autocfg v1.3.0 -> v1.4.0 Updating flate2 v1.0.33 -> v1.0.34 Updating portable-atomic v1.8.0 -> v1.9.0 Updating syn v2.0.77 -> v2.0.79 Updating tempfile v3.12.0 -> v3.13.0 note: pass `--verbose` to see 81 unchanged dependencies behind latest library dependencies: Locking 0 packages to latest compatible versions note: pass `--verbose` to see 9 unchanged dependencies behind latest rustbook dependencies: Locking 13 packages to latest compatible versions Updating autocfg v1.3.0 -> v1.4.0 Updating cc v1.1.21 -> v1.1.22 Updating flate2 v1.0.33 -> v1.0.34 Updating libc v0.2.158 -> v0.2.159 Updating pkg-config v0.3.30 -> v0.3.31 Updating redox_syscall v0.5.4 -> v0.5.6 Updating serde_spanned v0.6.7 -> v0.6.8 Updating syn v2.0.77 -> v2.0.79 Updating tempfile v3.12.0 -> v3.13.0 Updating thiserror v1.0.63 -> v1.0.64 Updating thiserror-impl v1.0.63 -> v1.0.64 Updating toml_edit v0.22.21 -> v0.22.22 Updating winnow v0.6.18 -> v0.6.20 note: pass `--verbose` to see 30 unchanged dependencies behind latest
2024-09-28Convert `&Option<T>` to `Option<&T>`Yuri Astrakhan-7/+7
2024-09-28rustdoc: add doc comment to DocVisitorbinarycat-2/+9
2024-09-28compiletest: normalize to `$SRC_DIR_REAL` before `$TEST_BUILD_DIR`Urgau-6/+6
in case the real paths into the libstd/libcore are located inside the the build directory, maybe because it's coming from an extracted dist component in the build dir (cc opt-dist)
2024-09-28Auto merge of #3918 - devnexen:solaris_arc4random_buf, r=RalfJungbors-4/+31
implements arc4random_buf shim for freebsd/solarish platforms. close #3914
2024-09-28make sure the new function is testedRalf Jung-4/+4
2024-09-28implements arc4random_buf shim for freebsd/solarish platforms.David Carlier-0/+27
close #3914
2024-09-28Add warning to arm-none-eabi.md instead of a Note:Jonathan 'theJPster' Pallant-1/+5
2024-09-28Suggested -fpregs instead of +soft-float.Jonathan 'theJPster' Pallant-16/+30
Has the same effect, but turning off a feature matches the other flags better than turning on a feature (which actually turns off a feature).
2024-09-28Improve mistyped docblock attribute warning messagesGuillaume Gomez-31/+27
2024-09-28Add warning if `standalone-crate` is mistypedGuillaume Gomez-0/+14
2024-09-28Improve code for codeblock invalid attributesGuillaume Gomez-25/+18
2024-09-28Rename `standalone` doctest attribute into `standalone-crate`Guillaume Gomez-8/+8
2024-09-28Update `browser-ui-test` version to `0.18.1`Guillaume Gomez-1/+1
2024-09-28Fix typos in arm-none-eabi.mdJonathan 'theJPster' Pallant-5/+4
These arrived in #125690, I think by mistake.
2024-09-28Rollup merge of #130973 - matthiaskrgr:crash_rename, r=jieyouxuMatthias Krüger-1/+1
compiletest: rename "runtest/crash.rs" to "runtest/crashes.rs" to be in line with the test directory r? jieyouxu
2024-09-28Rollup merge of #130918 - onur-ozkan:better-llvm-submodule-handling, r=KobzolMatthias Krüger-11/+19
simplify LLVM submodule handling Fixes #130906.
2024-09-28Rollup merge of #128778 - RalfJung:atomic-read-read-races, r=Mark-SimulacrumMatthias Krüger-275/+262
atomics: allow atomic and non-atomic reads to race We currently define our atomics in terms of C++ `atomic_ref`. That has the unfortunate side-effect of making it UB for an atomic and a non-atomic read to race (concretely, [this code](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=d1a743774e60923db33def7fe314d754) has UB). There's really no good reason for this, all the academic models of the C++ memory model I am aware of allow this -- C++ just disallows this because of their insistence on an "object model" with typed memory, where `atomic_ref` temporarily creates an "atomic object" that may not be accesses via regular non-atomic operations. So instead of tying our operations to `atomic_ref`, let us tie them directly to the underlying C++ memory model. I am not sure what is the best way to phrase this, so here's a first attempt. We also carve out an exception from the "no mixed-size atomic accesses" rule to permit mixed-size atomic reads -- given that we permit mixed-size non-atomic reads, it seems odd that this would be disallowed for atomic reads. However, when an atomic write races with any other atomic operation, they must use the same size. With this change, it is finally the case that every non-atomic access can be replaced by an atomic access without introducing UB. Cc `@rust-lang/opsem` `@chorman0773` `@m-ou-se` `@WaffleLapkin` `@Amanieu` Fixes https://github.com/rust-lang/unsafe-code-guidelines/issues/483
2024-09-28building/suggested: Add instructions for Emacs & Helix (#2080)Kajetan Puchalski-138/+171
Co-authored-by: 许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com>
2024-09-28add tests for validity of Box with custom allocatorRalf Jung-0/+99
2024-09-28Auto merge of #130964 - matthiaskrgr:rollup-suriuub, r=matthiaskrgrbors-24/+4
Rollup of 8 pull requests Successful merges: - #125404 (Fix `read_buf` uses in `std`) - #130866 (Allow instantiating object trait binder when upcasting) - #130922 (Reference UNSPECIFIED instead of INADDR_ANY in join_multicast_v4) - #130924 (Make clashing_extern_declarations considering generic args for ADT field) - #130939 (rustdoc: update `ProcMacro` docs section on helper attributes) - #130940 (Revert space-saving operations) - #130944 (Allow instantiating trait object binder in ptr-to-ptr casts) - #130953 (Rename a few tests to make tidy happier) r? `@ghost` `@rustbot` modify labels: rollup
2024-09-28compiletest: rename "runtest/crash.rs" to "runtest/crashes.rs" to be in line ↵Matthias Krüger-1/+1
with the test directory r? jieyouxu
2024-09-28Update handlers.rs to handlers/requests.rsNoah Bright-3/+5
2024-09-28Further clarificarion for atomic and UnsafeCell docs:Ralf Jung-0/+17
- UnsafeCell: mention the term "data race", and reference the data race definition - atomic: failing RMWs are just reads, reorder and reword docs