<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_const_eval/src/transform, branch master</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=master</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=master'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2024-05-24T16:56:56+00:00</updated>
<entry>
<title>compiler: unnest rustc_const_eval::check_consts</title>
<updated>2024-05-24T16:56:56+00:00</updated>
<author>
<name>Jubilee Young</name>
<email>workingjubilee@gmail.com</email>
</author>
<published>2024-05-24T08:33:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=87048a46fc75dc343637e3c7d3d654fc10d5e589'/>
<id>urn:sha1:87048a46fc75dc343637e3c7d3d654fc10d5e589</id>
<content type='text'>
</content>
</entry>
<entry>
<title>compiler: const_eval/transform/validate.rs -&gt; mir_transform/validate.rs</title>
<updated>2024-05-24T16:56:56+00:00</updated>
<author>
<name>Jubilee Young</name>
<email>workingjubilee@gmail.com</email>
</author>
<published>2024-05-24T08:14:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=db6ec2618a2abb82efe9e119f301f4ae8ec07682'/>
<id>urn:sha1:db6ec2618a2abb82efe9e119f301f4ae8ec07682</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Auto merge of #125479 - scottmcm:validate-vtable-projections, r=Nilstrieb</title>
<updated>2024-05-24T08:53:27+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2024-05-24T08:53:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=464987730ab36e3456ba57c53965372989382deb'/>
<id>urn:sha1:464987730ab36e3456ba57c53965372989382deb</id>
<content type='text'>
Validate the special layout restriction on `DynMetadata`

If you look at &lt;https://stdrs.dev/nightly/x86_64-unknown-linux-gnu/std/ptr/struct.DynMetadata.html&gt;, you'd think that `DynMetadata` is a struct with fields.

But it's actually not, because the lang item is special-cased in rustc_middle layout:

https://github.com/rust-lang/rust/blob/7601adcc764d42c9f2984082b49948af652df986/compiler/rustc_middle/src/ty/layout.rs#L861-L864

That explains the very confusing codegen ICEs I was getting in https://github.com/rust-lang/rust/pull/124251#issuecomment-2128543265

&gt; Tried to extract_field 0 from primitive OperandRef(Immediate((ptr:  %5 = load ptr, ptr %4, align 8, !nonnull !3, !align !5, !noundef !3)) @ TyAndLayout { ty: DynMetadata&lt;dyn Callsite&gt;, layout: Layout { size: Size(8 bytes), align: AbiAndPrefAlign { abi: Align(8 bytes), pref: Align(8 bytes) }, abi: Scalar(Initialized { value: Pointer(AddressSpace(0)), valid_range: 1..=18446744073709551615 }), fields: Primitive, largest_niche: Some(Niche { offset: Size(0 bytes), value: Pointer(AddressSpace(0)), valid_range: 1..=18446744073709551615 }), variants: Single { index: 0 }, max_repr_align: None, unadjusted_abi_align: Align(8 bytes) } })

because there was a `Field` projection despite the layout clearly saying it's [`Primitive`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_target/abi/enum.FieldsShape.html#variant.Primitive).

Thus this PR updates the MIR validator to check for such a projection, and changes `libcore` to not ever emit any projections into `DynMetadata`, just to transmute the whole thing when it wants a pointer.
</content>
</entry>
<entry>
<title>Validate the special layout restriction on DynMetadata</title>
<updated>2024-05-24T06:38:44+00:00</updated>
<author>
<name>Scott McMurray</name>
<email>scottmcm@users.noreply.github.com</email>
</author>
<published>2024-05-24T06:17:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=d83f3ca8ca2d20eadf92a135a1a4b65ca91a24f6'/>
<id>urn:sha1:d83f3ca8ca2d20eadf92a135a1a4b65ca91a24f6</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Remove `#[macro_use] extern crate tracing` from `rustc_const_eval`.</title>
<updated>2024-05-23T08:02:38+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-05-22T04:20:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=7a5d814a047376223da9331061d9642dd33b3f9a'/>
<id>urn:sha1:7a5d814a047376223da9331061d9642dd33b3f9a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Remove `Rvalue::CheckedBinaryOp`</title>
<updated>2024-05-18T03:33:02+00:00</updated>
<author>
<name>Scott McMurray</name>
<email>scottmcm@users.noreply.github.com</email>
</author>
<published>2024-05-16T09:07:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=95c0e5c6a86ca467b0fb7043bd56dee82418ac5f'/>
<id>urn:sha1:95c0e5c6a86ca467b0fb7043bd56dee82418ac5f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Remove `extern crate rustc_middle` from `rustc_const_eval`.</title>
<updated>2024-05-12T22:02:14+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-05-08T09:03:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=4497d345a8196554021f6d145b86bfc814c954d3'/>
<id>urn:sha1:4497d345a8196554021f6d145b86bfc814c954d3</id>
<content type='text'>
This requires exporting the interpreter macros so they can be used with
`use crate::interpret::*`.
</content>
</entry>
<entry>
<title>Consolidate obligation cause codes for where clauses</title>
<updated>2024-05-11T06:10:45+00:00</updated>
<author>
<name>Michael Goulet</name>
<email>michael@errs.io</email>
</author>
<published>2024-05-10T15:04:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=e444017b4942bf0137b8679d8e8811a8cc604cb4'/>
<id>urn:sha1:e444017b4942bf0137b8679d8e8811a8cc604cb4</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Auto merge of #124982 - compiler-errors:uplift-trait-ref, r=lcnr</title>
<updated>2024-05-10T22:24:53+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2024-05-10T22:24:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=19dacee0d8820d42b34e21eae99ff41026413add'/>
<id>urn:sha1:19dacee0d8820d42b34e21eae99ff41026413add</id>
<content type='text'>
Uplift `TraitRef` into `rustc_type_ir`

Emotional rollercoaster

r? lcnr
</content>
</entry>
<entry>
<title>Lift `TraitRef` into `rustc_type_ir`</title>
<updated>2024-05-10T19:44:03+00:00</updated>
<author>
<name>Michael Goulet</name>
<email>michael@errs.io</email>
</author>
<published>2024-05-10T18:59:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=1e5ec0a12c73efdd9a492fdc7ab661d90dc5bcf5'/>
<id>urn:sha1:1e5ec0a12c73efdd9a492fdc7ab661d90dc5bcf5</id>
<content type='text'>
</content>
</entry>
</feed>
