Add feature gate for view_types experiment#155939
Merged
rust-bors[bot] merged 2 commits intorust-lang:mainfrom May 1, 2026
Merged
Add feature gate for view_types experiment#155939rust-bors[bot] merged 2 commits intorust-lang:mainfrom
rust-bors[bot] merged 2 commits intorust-lang:mainfrom
Conversation
8 tasks
Contributor
nikomatsakis
requested changes
Apr 28, 2026
Collaborator
|
Reminder, once the PR becomes ready for a review, use |
711ae3e to
d3992fa
Compare
lqd
reviewed
Apr 28, 2026
Collaborator
|
The parser was modified, potentially altering the grammar of (stable) Rust cc @fmease |
Contributor
|
We discussed this in the @rust-lang/lang meeting today. My recollection is generally positive vibes and excitement. |
nikomatsakis
requested changes
Apr 29, 2026
| let view_end_span = self.prev_token.span; | ||
| let span = view_start_span.to(view_end_span); | ||
| self.psess.gated_spans.gate(sym::view_types, span); | ||
| } |
Contributor
There was a problem hiding this comment.
ok, so, right now we are effectively discarding the .{...} syntax. Seems ok for the first PR.
fmease
reviewed
Apr 29, 2026
e433590 to
77fb8d1
Compare
nikomatsakis
approved these changes
Apr 29, 2026
Contributor
|
@bors r+ |
Contributor
jhpratt
added a commit
to jhpratt/rust
that referenced
this pull request
Apr 30, 2026
…r=nikomatsakis Add feature gate for view_types experiment
jhpratt
added a commit
to jhpratt/rust
that referenced
this pull request
Apr 30, 2026
…r=nikomatsakis Add feature gate for view_types experiment
rust-bors Bot
pushed a commit
that referenced
this pull request
Apr 30, 2026
Rollup of 6 pull requests Successful merges: - #155853 (Use `_mcount` as the mcount symbol name on RISC-V Linux GNU targets) - #155939 (Add feature gate for view_types experiment) - #155974 (add `c_variadic_experimental_arch` feature) - #155523 (Reorganize `tests/ui/issues/` - 02) - #155980 (Move `feature*` methods from `parse` mod to `errors` mod.) - #155987 (Make lifting infallible) Failed merges: - #155237 (Disentangle AST crates and error crates)
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Apr 30, 2026
…r=nikomatsakis Add feature gate for view_types experiment
rust-bors Bot
pushed a commit
that referenced
this pull request
Apr 30, 2026
…uwer Rollup of 13 pull requests Successful merges: - #155249 (Fix: On wasm targets, call `panic_in_cleanup` if panic occurs in cleanup) - #155853 (Use `_mcount` as the mcount symbol name on RISC-V Linux GNU targets) - #155919 (simplify `ast_fragments!`) - #155939 (Add feature gate for view_types experiment) - #155974 (add `c_variadic_experimental_arch` feature) - #155991 (Catch unwinds from the global ctxt callback to complete queries profiling data in more cases) - #156003 (Pass Session to optimize_and_codegen_fat_lto) - #153566 (Add suggestion for E0401 on inner const items) - #154610 (Suggest public re-exports when a private module makes an import path inaccessible) - #155523 (Reorganize `tests/ui/issues/` - 02) - #155980 (Move `feature*` methods from `parse` mod to `errors` mod.) - #155987 (Make lifting infallible) - #155988 (tests/run-make/print-cfg: add Android target_env case)
rust-bors Bot
pushed a commit
that referenced
this pull request
May 1, 2026
Rollup of 19 pull requests Successful merges: - #155237 (Disentangle AST crates and error crates) - #155249 (Fix: On wasm targets, call `panic_in_cleanup` if panic occurs in cleanup) - #155853 (Use `_mcount` as the mcount symbol name on RISC-V Linux GNU targets) - #155919 (simplify `ast_fragments!`) - #155939 (Add feature gate for view_types experiment) - #155954 (rustdoc: preserve parent doc cfg for `macro_export` macros) - #155974 (add `c_variadic_experimental_arch` feature) - #155991 (Catch unwinds from the global ctxt callback to complete queries profiling data in more cases) - #156003 (Pass Session to optimize_and_codegen_fat_lto) - #153566 (Add suggestion for E0401 on inner const items) - #154610 (Suggest public re-exports when a private module makes an import path inaccessible) - #155523 (Reorganize `tests/ui/issues/` - 02) - #155821 (c-variadic: document `Clone` and `Drop` instances and require `VaArgSafe: Copy`) - #155980 (Move `feature*` methods from `parse` mod to `errors` mod.) - #155987 (Make lifting infallible) - #155988 (tests/run-make/print-cfg: add Android target_env case) - #156000 (Fix ICE when using -Zinstrument-mcount and -Clinker-flavor=lld) - #156002 (Allow to use `Diagnostic` directly in `SharedContext::emit_lint`) - #156015 (rustc-dev-guide subtree update)
rust-timer
added a commit
that referenced
this pull request
May 1, 2026
Rollup merge of #155939 - scrabsha:view-types/feature-gate, r=nikomatsakis Add feature gate for view_types experiment
github-actions Bot
pushed a commit
to rust-lang/rustc-dev-guide
that referenced
this pull request
May 4, 2026
Rollup of 19 pull requests Successful merges: - rust-lang/rust#155237 (Disentangle AST crates and error crates) - rust-lang/rust#155249 (Fix: On wasm targets, call `panic_in_cleanup` if panic occurs in cleanup) - rust-lang/rust#155853 (Use `_mcount` as the mcount symbol name on RISC-V Linux GNU targets) - rust-lang/rust#155919 (simplify `ast_fragments!`) - rust-lang/rust#155939 (Add feature gate for view_types experiment) - rust-lang/rust#155954 (rustdoc: preserve parent doc cfg for `macro_export` macros) - rust-lang/rust#155974 (add `c_variadic_experimental_arch` feature) - rust-lang/rust#155991 (Catch unwinds from the global ctxt callback to complete queries profiling data in more cases) - rust-lang/rust#156003 (Pass Session to optimize_and_codegen_fat_lto) - rust-lang/rust#153566 (Add suggestion for E0401 on inner const items) - rust-lang/rust#154610 (Suggest public re-exports when a private module makes an import path inaccessible) - rust-lang/rust#155523 (Reorganize `tests/ui/issues/` - 02) - rust-lang/rust#155821 (c-variadic: document `Clone` and `Drop` instances and require `VaArgSafe: Copy`) - rust-lang/rust#155980 (Move `feature*` methods from `parse` mod to `errors` mod.) - rust-lang/rust#155987 (Make lifting infallible) - rust-lang/rust#155988 (tests/run-make/print-cfg: add Android target_env case) - rust-lang/rust#156000 (Fix ICE when using -Zinstrument-mcount and -Clinker-flavor=lld) - rust-lang/rust#156002 (Allow to use `Diagnostic` directly in `SharedContext::emit_lint`) - rust-lang/rust#156015 (rustc-dev-guide subtree update)
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
View all comments
Tracking issue: #155938
The goal of this feature is to experiment with the concept of view types: allowing the borrow checker to reason about borrows across function calls by having an syntax to express which fields of a
structare used by a function.This will have the following limitations:
puborpub(...)functions is a hard error.r? nikomatsakis