about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2023-10-06Miri: Add `CreateWaitableTimerEx` stubChris Denton-0/+12
This function will always fail, allowing std's `Sleep` fallback path to be taken instead.
2023-10-06Rollup merge of #116475 - notriddle:notriddle/impl-trait-null, r=GuillaumeGomezGuillaume Gomez-1/+1
rustdoc-search: fix bug with multi-item impl trait Preview searches: - https://notriddle.com/rustdoc-html-demo-5/compiler-doc-impl-trait-bugfix/index.html?search=-%3E%20globalctxt - https://notriddle.com/rustdoc-html-demo-5/compiler-doc-impl-trait-bugfix/index.html?search=globalctxt
2023-10-06add a direct dlsym testRalf Jung-19/+38
2023-10-06allow dyn_sym in the files where they are defined; remove unreachable ↵Ralf Jung-19/+25
android code
2023-10-06make some things on foreign_items privateRalf Jung-256/+256
2023-10-06refactor dlsym: dispatch symbols via the normal shim mechanismRalf Jung-461/+168
2023-10-06Make `tidy-alphabetical-{start,end}` work more widely.Nicholas Nethercote-2/+2
Don't restrict it to lines that have `//` in them. This means it can be used in `Cargo.toml` files, for example.
2023-10-06Auto merge of #3098 - BlackHoleFox:apple-entropy, r=RalfJungbors-4/+26
Support getentropy on macOS as a foreign item Prior this was always assumed to be accessed via `dlsym` shim, but in `std` I'm attempting to start [unconditionally linking](https://github.com/rust-lang/rust/pull/116319) to `getentropy` on macOS now that Rust's platform version support allows it. This just moves the main logic of the previous `dlsym` handler into an eval context extension so it can be used via both call paths. The `dlsym` handler is still needed as `getrandom` uses it.
2023-10-06Move getentropy handling to a shared location for foreign item implementationBlackHoleFox-4/+26
2023-10-05rustdoc-search: fix bug with multi-item impl traitMichael Howell-1/+1
2023-10-05Add more diagnostic items for clippyJason Newcomb-271/+191
2023-10-05Auto merge of #3107 - eduardosm:update-deps, r=RalfJungbors-503/+573
Update dependencies
2023-10-06remove the use of `fn update_submodule` on rust-analyzeronur-ozkan-2/+0
We don't need to run `fn update_submodule` on rust-analyzer as it's no longer a submodule. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-10-05Update test dependenciesEduardo Sánchez Muñoz-92/+162
2023-10-05Update miri-script dependenciesEduardo Sánchez Muñoz-41/+179
2023-10-05Update cargo-miri dependenciesEduardo Sánchez Muñoz-201/+99
2023-10-05Update miri dependenciesEduardo Sánchez Muñoz-169/+133
2023-10-05Remove `try-merge` from CI workflowJakub Beránek-1/+0
2023-10-05Enable new bors try branch to run on CIJakub Beránek-2/+3
2023-10-05Pass host flags to `rustc` shim using prefixed env. varsJakub Beránek-18/+42
2023-10-05Remove unused `RUSTDOC_FUSE_LD_LLD` flagJakub Beránek-4/+0
2023-10-05Rollup merge of #116296 - compiler-errors:default-return, r=estebankJubilee-17/+14
More accurately point to where default return type should go When getting the "default return type" span, instead of pointing to the low span of the next token, point to the high span of the previous token. This: 1. Makes forming return type suggestions more uniform, since we expect them all in the same place. 2. Arguably makes labels easier to understand, since we're pointing to where the implicit `-> ()` would've gone, rather than the starting brace or the semicolon. r? ```@estebank```
2023-10-05Rollup merge of #116223 - catandcoder:master, r=cjgillotJubilee-1/+1
Fix misuses of a vs an Fixes the misuse of "a" vs "an", according to English grammatical expectations and using https://www.a-or-an.com/
2023-10-05Auto merge of #3106 - RalfJung:tree-borrows-initial, r=RalfJungbors-61/+106
Tree Borrows: do not create new tags as 'Active' Cc `@Vanille-N`
2023-10-05Rename `Features::active_features`.Nicholas Nethercote-1/+1
The word "active" is currently used in two different and confusing ways: - `ACTIVE_FEATURES` actually means "available unstable features" - `Features::active_features` actually means "features declared in the crate's code", which can include feature within `ACTIVE_FEATURES` but also others. (This is also distinct from "enabled" features which includes declared features but also some edition-specific features automatically enabled depending on the edition in use.) This commit changes the `Features::active_features` to `Features::declared_features` which actually matches its meaning. Likewise, `Features::active` becomes `Features::declared`.
2023-10-05Tree Borrows: do not create new tags as 'Active'Ralf Jung-61/+106
2023-10-05Auto merge of #3000 - RalfJung:no_std, r=oli-obkbors-19/+22
auto-detect no_std where possible r? `@oli-obk` Cc https://rust-lang.zulipchat.com/#narrow/stream/269128-miri/topic/restricted_std.20sysroot.3F
2023-10-04Fix spans for comments in rustfmtMichael Goulet-1/+2
2023-10-04Fix spans for comments in rustfmtMichael Goulet-1/+2
2023-10-04Point to closure return instead of output if defaultedMichael Goulet-2/+2
2023-10-04Fix clippyMichael Goulet-18/+14
2023-10-04Auto merge of #3105 - RalfJung:sysroot-target, r=RalfJungbors-1/+4
miri-script: print which sysroot target we are building
2023-10-04miri-script: print which sysroot target we are buildingRalf Jung-1/+4
2023-10-04auto-detect no_std where possibleRalf Jung-19/+22
2023-10-04vendor distribution on the tarball sourcesonur-ozkan-5/+10
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-10-04Update documentation for LLVM CFI supportRamon de C Valle-76/+85
Updates documentation for LLVM CFI support with recommended information since the user can now rebuild and use both core and std with CFI enabled using the Cargo build-std feature.
2023-10-05Fix typo in attrs.rsIkko Eltociear Ashimine-2/+2
documenation -> documentation
2023-10-04Auto merge of #116381 - Mark-Simulacrum:drop-wasm32-unknown-emscripten, r=Kobzolbors-66/+0
Remove wasm32-unknown-emscripten tests from CI This builder tested the wasm32-unknown-emscripten target, which is tier 2 (and so not eligible for testing). In the recent beta [promotion](https://github.com/rust-lang/rust/pull/116362#issuecomment-1744960904), we ran into a problem with this target: emscripten doesn't support passing environment variables into the std environment, so we can't enable RUSTC_BOOTSTRAP for libtest in order to pass -Zunstable-options. We worked around this for the beta/stable branches, but given this problem, and its tier 2 status, just dropping the target's tests entirely seems warranted. Downgrading to tier 3 may also be a good idea, but that is a separate conversation not proposed here.
2023-10-04Bump host compiler on x64 dist Linux to LLVM 17.0.2Jakub Beránek-1/+1
2023-10-04Auto merge of #116360 - compiler-errors:async-span, r=oli-obkbors-19/+22
Point to full `async fn` for future Semi-follow-up to https://github.com/rust-lang/rust/pull/116296#discussion_r1342007575 cc `@asquared31415`
2023-10-04Auto merge of #116353 - Kobzol:new-bors-event, r=Mark-Simulacrumbors-0/+2
Add new bors try branches to CI Workflows for the new bors weren't launching, because its branches weren't whitelisted here. r? `@Mark-Simulacrum`
2023-10-04Auto merge of #116406 - weihanglo:update-cargo, r=weihanglobors-0/+0
Update cargo 9 commits in 59596f0f31a94fde48b5aa7e945cd0b7ceca9620..794d0a82547f3081044c0aca7b6083733ce51344 2023-09-29 19:29:17 +0000 to 2023-10-03 23:19:33 +0000 - Prep for automating MSRV management (rust-lang/cargo#12767) - chore(deps): update rust crate itertools to 0.11.0 (rust-lang/cargo#12759) - fix bug: corruption when cargo killed while writing (rust-lang/cargo#12744) - Disable custom_target::custom_bin_target on windows-gnu (rust-lang/cargo#12763) - chore(deps): update compatible (rust-lang/cargo#12757) - Add more missing `strip` info to docs. (rust-lang/cargo#12754) - chore(deps): update actions/checkout action to v4 (rust-lang/cargo#12762) - chore(deps): update rust crate cargo_metadata to 0.18.0 (rust-lang/cargo#12758) - fix(test): Add back in newlines to diffs (rust-lang/cargo#12753) r? ghost
2023-10-04Rollup merge of #116388 - ↵Matthias Krüger-104/+69
fmease:rustdoc-fix-n-clean-up-x-crate-higher-ranked-params, r=notriddle rustdoc: fix & clean up handling of cross-crate higher-ranked parameters Preparatory work for the refactoring planned in #113015 (for correctness & maintainability). --- 1. Render the higher-ranked parameters of cross-crate function pointer types **(*)**. 2. Replace occurrences of `collect_referenced_late_bound_regions()` (CRLBR) with `bound_vars()`. The former is quite problematic and the use of the latter allows us to yank a lot of hacky code **(†)** as you can tell from the diff! :) 3. Add support for cross-crate higher-ranked types (`#![feature(non_lifetime_binders)]`). We were previously ICE'ing on them (see `inline_cross/non_lifetime_binders.rs`). --- **(*)**: Extracted from test `inline_cross/fn-type.rs`: ```diff - fn(_: &'z fn(_: &'b str), _: &'a ()) -> &'a () + for<'z, 'a, '_unused> fn(_: &'z for<'b> fn(_: &'b str), _: &'a ()) -> &'a () ``` **(†)**: It returns an `FxHashSet` which isn't *predictable* or *stable* wrt. source code (`.rmeta`) changes. To elaborate, the ordering of late-bound regions doesn't necessarily reflect the ordering found in the source code. It does seem to be stable across compilations but modifying the source code of the to-be-documented crates (like adding or renaming items) may result in a different order: <details><summary>Example</summary> Let's assume that we're documenting the cross-crate re-export of `produce` from the code below. On `master`, rustdoc would render the list of binders as `for<'x, 'y, 'z>`. However, once you add back the functions `a`–`l`, it would be rendered as `for<'z, 'y, 'x>` (reverse order)! Results may vary. `bound_vars()` fixes this as it returns them in source order. ```rs // pub fn a() {} // pub fn b() {} // pub fn c() {} // pub fn d() {} // pub fn e() {} // pub fn f() {} // pub fn g() {} // pub fn h() {} // pub fn i() {} // pub fn j() {} // pub fn k() {} // pub fn l() {} pub fn produce() -> impl for<'x, 'y, 'z> Trait<'z, 'y, 'x> {} pub trait Trait<'a, 'b, 'c> {} impl Trait<'_, '_, '_> for () {} ``` </details> Further, as the name suggests, CRLBR only collects *referenced* regions and thus we drop unused binders. `bound_vars()` contains unused binders on the other hand. Let's stay closer to the source where possible and keep unused binders. Lastly, using `bound_vars()` allows us to get rid of * the deduplication and alphabetical sorting hack in `simplify.rs` * the weird field `bound_params` on `EqPredicate` both of which were introduced by me in #102707 back when I didn't know better. To illustrate, let's look at the cross-crate bound `T: for<'a, 'b> Trait<A<'a> = (), B<'b> = ()>`. * With CRLBR + `EqPredicate.bound_params`, *before* bounds simplification we would have the bounds `T: Trait`, `for<'a> <T as Trait>::A<'a> == ()` and `for<'b> <T as Trait>::B<'b> == ()` which required us to merge `for<>`, `for<'a>` and `for<'b>` into `for<'a, 'b>` in a deterministic manner and without introducing duplicate binders. * With `bound_vars()`, we now have the bounds `for<'a, b> T: Trait`, `<T as Trait>::A<'a> == ()` and `<T as Trait>::B<'b> == ()` before bound simplification similar to rustc itself. This obviously no longer requires any funny merging of `for<>`s. On top of that `for<'a, 'b>` is guaranteed to be in source order.
2023-10-04Rollup merge of #116365 - P1n3appl3:master, r=onur-ozkanMatthias Krüger-5/+7
bootstrap: make copying linker binaries conditional The change in #116276 breaks bootstrapping if you don't use `lld` for linking with your stage0 compiler. Making this copy conditional should be enough to fix it.
2023-10-04Update cargoWeihang Lo-0/+0
2023-10-04Fix misuses of a vs ancui fliter-1/+1
Signed-off-by: cui fliter <imcusg@gmail.com>
2023-10-03bootstrap: make copying linker binaries conditionalJoseph Ryan-5/+7
2023-10-03wording tweaksRalf Jung-2/+2
2023-10-03Fix typos `*ucom` → `ucom*`Eduardo Sánchez Muñoz-2/+2
2023-10-03rustdoc: add support for cross-crate higher-ranked typesLeón Orell Valerian Liehr-1/+16