-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Rollup of 6 pull requests #139300
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Rollup of 6 pull requests #139300
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Start removing `rustc_middle::hir::map::Map` Following commit f86f7ad from pull request rust-lang#136466 in the Rust project (https://github.com/rust-lang/rust), some methods in `Map` were moved to `TyCtxt`. This update reimplements `rustc-drive-example.rs`, `rustc-driver-interacting-with-the-ast.rs`, and `rustc-interface-example.rs` using the new versions of these methods, ensuring compatibility with the nightly-2025-03-08 toolchain.
(https://github.com/rust-lang/rust), `ErrorGuaranteed` was replaced by fatal errors. As a result, `tcx.analysis()` now aborts directly instead of returning an error guard. To accommodate this change, this update replaces `tcx.analysis()` with `typeck()` to perform type checking in the example.
Signed-off-by: xizheyin <[email protected]>
Add issue link for explaining that why rustc_private linker fails
Add Fuchsia ping group page and mention Fuchsia and RfL ping groups in integration test pages
Don't linkcheck external web links in PR CI
This makes this command pass mdbook test --chapter "Remarks on perma-unstable features"
use correct code block markers
add new section on the `rustdoc` test suite
Fix rib example
Includes redirects to avoid breaking existing links.
Update `ParamEnv` section for `TypingEnv` changes
…nfig-to-bootstrap doc: fix reference to #create-a-configtoml
Slightly reorganize ecosystem tests, stub out codegen backend test pages
Do the following: * Switch to `impl FnOnce` rather than a generic `F`. * Change `update` to return nothing. This was discussed at a libs-api meeting [1]. Tracking issue: rust-lang#50186 [1]: rust-lang#134446 (comment)
Co-authored-by: Travis Cross <[email protected]>
…r-errors impl !PartialOrd for HirId revive of rust-lang#92233 Another checkbox of rust-lang#90317, another small step in making incremental less likely to die in horrible ways
Experimental feature gate for `super let` This adds an experimental feature gate, `#![feature(super_let)]`, for the `super let` experiment. Tracking issue: rust-lang#139076 Liaison: `@nikomatsakis` ## Description There's a rough (inaccurate) description here: https://blog.m-ou.se/super-let/ In short, `super let` allows you to define something that lives long enough to be borrowed by the tail expression of the block. For example: ```rust let a = { super let b = temp(); &b }; ``` Here, `b` is extended to live as long as `a`, similar to how in `let a = &temp();`, the temporary will be extended to live as long as `a`. ## Properties During the temporary lifetimes work we did last year, we explored the properties of "super let" and concluded that the fundamental property should be that these two are always equivalent in any context: 1. `& $expr` 2. `{ super let a = & $expr; a }` And, additionally, that these are equivalent in any context when `$expr` is a temporary (aka rvalue): 1. `& $expr` 2. `{ super let a = $expr; & a }` This makes it possible to give a name to a temporary without affecting how temporary lifetimes work, such that a macro can transparently use a block in its expansion, without that having any effect on the outside. ## Implementing pin!() correctly With `super let`, we can properly implement the `pin!()` macro without hacks: ✨ ```rust pub macro pin($value:expr $(,)?) { { super let mut pinned = $value; unsafe { $crate::pin::Pin::new_unchecked(&mut pinned) } } } ``` This is important, as there is currently no way to express it without hacks in Rust 2021 and before (see [hacky definition](https://github.com/rust-lang/rust/blob/2a06022951893fe5b5384f8dbd75b4e6e3b5cee0/library/core/src/pin.rs#L1947)), and no way to express it at all in Rust 2024 (see [issue](rust-lang#138718)). ## Fixing format_args!() This will also allow us to express `format_args!()` in a way where one can assign the result to a variable, fixing a [long standing issue](rust-lang#92698): ```rust let f = format_args!("Hello {name}!"); // error today, but accepted in the future! (after separate FCP) ``` ## Experiment The precise definition of `super let`, what happens for `super let x;` (without initializer), and whether to accept `super let _ = _ else { .. }` are still open questions, to be answered by the experiment. Furthermore, once we have a more complete understanding of the feature, we might be able to come up with a better syntax. (Which could be just a different keywords, or an entirely different way of naming temporaries that doesn't involve a block and a (super) let statement.)
unstable book: document import_trait_associated_functions Documents rust-lang#134691 which was implemented in rust-lang#134754
…pratt Apply requested API changes to `cell_update` Do the following: * Switch to `impl FnOnce` rather than a generic `F`. * Change `update` to return nothing. This was discussed at a libs-api meeting [1]. Tracking issue: rust-lang#50186 [1]: rust-lang#134446 (comment)
Rustc dev guide subtree update r? `@jieyouxu` `@Kobzol`
…ure-gate, r=fmease Fix the `f16`/`f128` feature gates on integer literals The feature gating logic for `f16`/`f128` currently only checks float literals, meaning this code currently compiles with no feature gates on stable ([playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=b0c0e285ccb822fc7e2abc595557886b)): ```rust fn main() { let a = 1f16; let b = 1f128; dbg!(a, b); } ``` This PR fixes that. Tracking issue: rust-lang#116909
@bors r+ rollup=never p=5 |
The job Click to see the possible cause of the failure (guessed by this bot)
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-rustc-dev-guide
Area: rustc-dev-guide
rollup
A PR which is a rollup
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Successful merges:
super let
#139080 (Experimental feature gate forsuper let
)cell_update
#139273 (Apply requested API changes tocell_update
)f16
/f128
feature gates on integer literals #139294 (Fix thef16
/f128
feature gates on integer literals)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup