Make Ty::boxed_ty return an Option#129969
Merged
bors merged 1 commit intorust-lang:masterfrom Sep 6, 2024
Merged
Conversation
Collaborator
|
r? @Nadrieril rustbot has assigned @Nadrieril. Use |
Collaborator
|
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt Some changes occurred in src/tools/clippy cc @rust-lang/clippy Some changes occurred to the CTFE / Miri engine cc @rust-lang/miri |
488d17b to
cdbe3a7
Compare
RalfJung
reviewed
Sep 5, 2024
compiler-errors
suggested changes
Sep 5, 2024
Contributor
compiler-errors
left a comment
There was a problem hiding this comment.
Looks fine other than some nits and please rename boxed_ty_unchecked to expect_boxed_ty.
cdbe3a7 to
49144b7
Compare
compiler-errors
suggested changes
Sep 5, 2024
Contributor
Author
|
@rustbot author Until I unbreak clippy |
49144b7 to
f6e8a84
Compare
Contributor
Author
|
@rustbot ready |
compiler-errors
approved these changes
Sep 5, 2024
Contributor
|
@bors r+ rollup |
Collaborator
workingjubilee
added a commit
to workingjubilee/rustc
that referenced
this pull request
Sep 6, 2024
…errors Make `Ty::boxed_ty` return an `Option` Looks like a good place to use Rust's type system. --- Most of https://github.com/rust-lang/rust/blob/4ac7bcbaad8d6fd7a51bdf1b696cbc3ba4c796cf/compiler/rustc_middle/src/ty/sty.rs#L971-L1963 looks like it could be moved to `TyKind` (then I guess `Ty` should be made to deref to `TyKind`).
workingjubilee
added a commit
to workingjubilee/rustc
that referenced
this pull request
Sep 6, 2024
…errors Make `Ty::boxed_ty` return an `Option` Looks like a good place to use Rust's type system. --- Most of https://github.com/rust-lang/rust/blob/4ac7bcbaad8d6fd7a51bdf1b696cbc3ba4c796cf/compiler/rustc_middle/src/ty/sty.rs#L971-L1963 looks like it could be moved to `TyKind` (then I guess `Ty` should be made to deref to `TyKind`).
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Sep 6, 2024
…kingjubilee Rollup of 14 pull requests Successful merges: - rust-lang#128919 (Add an internal lint that warns when accessing untracked data) - rust-lang#129021 (Check WF of source type's signature on fn pointer cast) - rust-lang#129472 (fix ICE when `asm_const` and `const_refs_to_static` are combined) - rust-lang#129653 (clarify that addr_of creates read-only pointers) - rust-lang#129775 (bootstrap: Try to track down why `initial_libdir` sometimes fails) - rust-lang#129781 (Make `./x.py <cmd> compiler/<crate>` aware of the crate's features) - rust-lang#129939 (explain why Rvalue::Len still exists) - rust-lang#129942 (copy rustc rustlib artifacts from ci-rustc) - rust-lang#129944 (Add compat note for trait solver change) - rust-lang#129947 (Add digit separators in `Duration` examples) - rust-lang#129955 (Temporarily remove fmease from the review rotation) - rust-lang#129957 (forward linker option to lint-docs) - rust-lang#129969 (Make `Ty::boxed_ty` return an `Option`) - rust-lang#129995 (Remove wasm32-wasip2's tier 2 status from release notes) r? `@ghost` `@rustbot` modify labels: rollup
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Sep 6, 2024
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#129021 (Check WF of source type's signature on fn pointer cast) - rust-lang#129781 (Make `./x.py <cmd> compiler/<crate>` aware of the crate's features) - rust-lang#129963 (Inaccurate `{Path,OsStr}::to_string_lossy()` documentation) - rust-lang#129969 (Make `Ty::boxed_ty` return an `Option`) - rust-lang#129995 (Remove wasm32-wasip2's tier 2 status from release notes) - rust-lang#130013 (coverage: Count await when the Future is immediately ready ) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Sep 6, 2024
Rollup merge of rust-lang#129969 - GrigorenkoPV:boxed-ty, r=compiler-errors Make `Ty::boxed_ty` return an `Option` Looks like a good place to use Rust's type system. --- Most of https://github.com/rust-lang/rust/blob/4ac7bcbaad8d6fd7a51bdf1b696cbc3ba4c796cf/compiler/rustc_middle/src/ty/sty.rs#L971-L1963 looks like it could be moved to `TyKind` (then I guess `Ty` should be made to deref to `TyKind`).
1 task
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.
Looks like a good place to use Rust's type system.
Most of
rust/compiler/rustc_middle/src/ty/sty.rs
Lines 971 to 1963 in 4ac7bcb
TyKind(then I guessTyshould be made to deref toTyKind).