Skip to content

view-types: handle field accesses - #165764

Draft
scrabsha wants to merge 16 commits into
rust-lang:mainfrom
scrabsha:view-types/check-field-access
Draft

scrabsha wants to merge 16 commits into
rust-lang:mainfrom
scrabsha:view-types/check-field-access

Conversation

@scrabsha

@scrabsha scrabsha commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ still needs a lot of polish ⚠️

over #165694 and #165565.

@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. PG-exploit-mitigations Project group: Exploit mitigations S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Nov 10, 2026
@rust-log-analyzer

This comment has been minimized.

@scrabsha
scrabsha force-pushed the view-types/check-field-access branch from d7d5222 to 3a6417a Compare November 10, 2026 16:00
after some discussion, we decided we want view types to be `!Sized`, at
least at the beginning. this commit updates the test suite so that view
types are not passed by value anymore.
this commit is quite big because we want to always exhaustively match on
all the `TyKind` variants. none of the `unimplemented!()` is reachable
because we don't *actually* lower view types (yet!).
/!\ the test suite is has not been updated /!\

the `unreachable!()`s added previously are suddenly reached, triggering
literally all the view types test suite to ICE. this is fixed by the next
commit.
@scrabsha
scrabsha force-pushed the view-types/check-field-access branch from 3a6417a to b489285 Compare November 12, 2026 08:56
@rustbot rustbot added A-rustdoc-json Area: Rustdoc JSON backend T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. T-rustfmt Relevant to the rustfmt team, which will review and decide on the PR/issue. labels Nov 12, 2026
@rust-log-analyzer

This comment has been minimized.

@scrabsha
scrabsha force-pushed the view-types/check-field-access branch from b489285 to 73cdfb4 Compare November 12, 2026 09:10
/!\ the test suite is has not been updated /!\
/!\ the #legal revision of field-access.rs has not been updated /!\
/!\ the test suite is has not been updated /!\

the ICE we are currently fixing uses the debug print of view types, which
was `unimplemented!()`, which triggered another ICE. this commit adds an
implementation of `Debug` for `ty::View`, which gives us a much more
interesting backtrace (which is fixed by the next commit).
@scrabsha
scrabsha force-pushed the view-types/check-field-access branch from 73cdfb4 to 7d7b53b Compare November 12, 2026 15:04

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-rustdoc-json Area: Rustdoc JSON backend PG-exploit-mitigations Project group: Exploit mitigations S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler 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. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. T-rustfmt Relevant to the rustfmt team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants