-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Erase regions in writeback #69189
Erase regions in writeback #69189
Conversation
Avoid using regions from `TypeckTables` These regions will all be `ReErased` soon. (rust-lang/rust#69189) changelog: none
This comment has been minimized.
This comment has been minimized.
86161e0
to
5ce0263
Compare
☔ The latest upstream changes (presumably #67953) made this pull request unmergeable. Please resolve the merge conflicts. |
Triaged |
5ce0263
to
24f824c
Compare
#[derive(Copy, Clone, Default, Debug)] | ||
pub struct SuppressRegionErrors { | ||
suppressed: bool, | ||
#[derive(Copy, Clone, Debug)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a doc comment explaining the overall role of this type?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was imagining that we might give some coverage of how regions are handled in type-check vs NLL here. Though really we ought to explain this in a rustc-dev-guide section and link to that
r=me with a comment, cc @matthewjasper |
24f824c
to
f8a08a9
Compare
@bors r=nikomatsakis |
📌 Commit f8a08a9 has been approved by |
…komatsakis Erase regions in writeback Regions in `TypeckTables` (except canonicalized user annotations) are now erased. Further, we no longer do lexical region solving on item bodies with `-Zborrowck=mir`. cc rust-lang#68261 r? @nikomatsakis
Rollup of 8 pull requests Successful merges: - #68746 (Make macro metavars respect (non-)hygiene) - #69189 (Erase regions in writeback) - #69402 (Extend search) - #69403 (Implement `Copy` for `IoSlice`) - #69460 (Move some `build-pass` tests to `check-pass`) - #69802 (fix more clippy findings) - #69809 (remove lifetimes that can be elided (clippy::needless_lifetimes)) - #69949 (triagebot.toml: add ping aliases) Failed merges: - #69589 (ast: `Mac`/`Macro` -> `MacCall`) r? @ghost
☔ The latest upstream changes (presumably #69076) made this pull request unmergeable. Please resolve the merge conflicts. |
f8a08a9
to
e53bc00
Compare
…komatsakis Erase regions in writeback Regions in `TypeckTables` (except canonicalized user annotations) are now erased. Further, we no longer do lexical region solving on item bodies with `-Zborrowck=mir`. cc rust-lang#68261 r? @nikomatsakis
…komatsakis Erase regions in writeback Regions in `TypeckTables` (except canonicalized user annotations) are now erased. Further, we no longer do lexical region solving on item bodies with `-Zborrowck=mir`. cc rust-lang#68261 r? @nikomatsakis
Rollup of 10 pull requests Successful merges: - rust-lang#67749 (keyword docs for else and inkeyword docs for else and in.) - rust-lang#69139 (clean up E0308 explanation) - rust-lang#69189 (Erase regions in writeback) - rust-lang#69837 (Use smaller discriminants for generators) - rust-lang#69838 (Expansion-driven outline module parsing) - rust-lang#69839 (Miri error reform) - rust-lang#69899 (Make methods declared by `newtype_index` macro `const`) - rust-lang#69920 (Remove some imports to the rustc crate) - rust-lang#70075 (Fix repr pretty display) - rust-lang#70106 (Tidy: fix running rustfmt twice) Failed merges: - rust-lang#70051 (Allow `hir().find` to return `None`) - rust-lang#70074 (Expand: nix all fatal errors) r? @ghost
@@ -4,8 +4,7 @@ error[E0512]: cannot transmute between types of different sizes, or dependently- | |||
LL | transmute(x) | |||
| ^^^^^^^^^ | |||
| | |||
= note: source type: `<C as TypeConstructor<'a>>::T` (size can vary because of <C as TypeConstructor>::T) | |||
= note: target type: `<C as TypeConstructor<'b>>::T` (size can vary because of <C as TypeConstructor>::T) | |||
= note: `<C as TypeConstructor>::T` does not have a fixed size |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait, we don't allow transmuting between the same type with only lifetimes changed?
I think we do when it's beyond a pointer, even if we don't know if it's Sized
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't allow transmutes between type projections at all it seems:
pub trait TypeConstructor {
type T;
}
unsafe fn transmute_lifetime<C>(x: C::T)
where C: TypeConstructor {
transmute::<C::T, C::T>(x); // ERROR !
}
@matthewjasper Question regarding a Clippy rustup: rust-lang/rust-clippy#5333 Clippy has a check in the linting code that compares two types like this:
Before this PR, this returned |
rustup rust-lang/rust#69189 rustups rust-lang/rust#69189 which is part of rust-lang/rust#70085 (at least I think this is the only pr that changes clippy test stdout) changelog: none
@flip1995 No, you were getting lucky before if that worked. |
Rollup of 4 pull requests Successful merges: - #5326 (rustup rust-lang/rust#69838) - #5333 (rustup rust-lang/rust#69189) - #5336 (rustup rust-lang/rust#69920) - #5341 (Rustup to rust-lang/rust#66131) Failed merges: r? @ghost
Rollup of 4 pull requests Successful merges: - #5326 (rustup rust-lang/rust#69838) - #5333 (rustup rust-lang/rust#69189) - #5336 (rustup rust-lang/rust#69920) - #5341 (Rustup to rust-lang/rust#66131) Failed merges: r? @ghost changelog: none
Rollup of 4 pull requests Successful merges: - #5326 (rustup rust-lang/rust#69838) - #5333 (rustup rust-lang/rust#69189) - #5336 (rustup rust-lang/rust#69920) - #5341 (Rustup to rust-lang/rust#66131) Failed merges: r? @ghost changelog: none
Rollup of 4 pull requests Successful merges: - #5326 (rustup rust-lang/rust#69838) - #5333 (rustup rust-lang/rust#69189) - #5336 (rustup rust-lang/rust#69920) - #5341 (Rustup to rust-lang/rust#66131) Failed merges: r? @ghost changelog: none
Rollup of 4 pull requests Successful merges: - #5326 (rustup rust-lang/rust#69838) - #5333 (rustup rust-lang/rust#69189) - #5336 (rustup rust-lang/rust#69920) - #5341 (Rustup to rust-lang/rust#66131) Failed merges: r? @ghost changelog: none
Regions in
TypeckTables
(except canonicalized user annotations) are now erased. Further, we no longer do lexical region solving on item bodies with-Zborrowck=mir
.cc #68261
r? @nikomatsakis