Skip to content

view-types: make sure view types are !Sized - #165694

Open
scrabsha wants to merge 11 commits into
rust-lang:mainfrom
scrabsha:view-types/unsizedness
Open

scrabsha wants to merge 11 commits into
rust-lang:mainfrom
scrabsha:view-types/unsizedness

Conversation

@scrabsha

@scrabsha scrabsha commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

after writing #165565 i realized we had no test for view type sizedness, so i added some. it also allowed me to improve the formatting of view types a bit.

over #165565.

part of #155938.

@rustbot blocked by #165565
r? oli-obk

@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 9, 2026
@rustbot rustbot added S-blocked Status: Blocked on something else such as an RFC or other implementation work. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 10, 2026
@scrabsha
scrabsha marked this pull request as ready for review November 10, 2026 16:11
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 10, 2026
@rustbot

rustbot commented Nov 10, 2026

Copy link
Copy Markdown
Collaborator

This PR changes rustc_public

cc @oli-obk, @celinval, @ouz-a, @makai410

Some changes occurred to the CTFE machinery

cc @RalfJung, @oli-obk, @lcnr

Some changes occurred in compiler/rustc_sanitizers

cc @rcvalle

changes to the core type system

cc @lcnr

Some changes occurred in compiler/rustc_codegen_llvm/src/debuginfo

cc @Walnut356

Some changes occurred to the CTFE / Miri interpreter

cc @rust-lang/miri

Some changes occurred in exhaustiveness checking

cc @Nadrieril

clippy is developed in its own repository. If possible, consider making this change to rust-lang/rust-clippy instead.

cc @rust-lang/clippy

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

HIR ty lowering was modified

cc @fmease

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/unsizedness branch from 6568099 to c759b6e Compare November 12, 2026 08:56
@rustbot

rustbot commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator

rustfmt is developed in its own repository. If possible, consider making this change to rust-lang/rustfmt instead.

cc @rust-lang/rustfmt

@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
@rustbot

rustbot commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@scrabsha

Copy link
Copy Markdown
Contributor Author

force-push contains:

@rust-log-analyzer

This comment has been minimized.

@scrabsha
scrabsha force-pushed the view-types/unsizedness branch from c759b6e to f90bc74 Compare November 12, 2026 09:10
@scrabsha
scrabsha force-pushed the view-types/unsizedness branch from f90bc74 to 2235438 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-blocked Status: Blocked on something else such as an RFC or other implementation work. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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.

5 participants