Fix some issues with multi-target extraction#1131
Draft
Conversation
Member
|
Can you add the test case from #1130 to the test suite? |
Member
Author
Does that mean you want to merge this PR? (yes I can do) |
Member
Author
|
I added the test |
Member
Mostly I wanted to see the new output. If you remove the attribute and source_text stripping, does this PR still fix #1130? (I'd expect it to) |
Member
Author
|
When removing the attribute and source_text stripping I get the following diff on the -pub fn core::clone::impls::{impl core::clone::Clone for u32}::clone<'_0>(_1: &'_0 u32) -> u32
+pub fn core::clone::impls::{impl core::clone::Clone::aarch64-apple-darwin for u32}::clone::aarch64-apple-darwin<'_0>(_1: &'_0 u32) -> u32
= <opaque>
+pub fn core::clone::impls::{impl core::clone::Clone::x86_64-pc-windows-msvc for u32}::clone::x86_64-pc-windows-msvc<'_0>(_1: &'_0 u32) -> u32
+= <opaque>
+
+pub fn core::clone::impls::{impl core::clone::Clone::i686-pc-windows-msvc for u32}::clone::i686-pc-windows-msvc<'_0>(_1: &'_0 u32) -> u32
+= <opaque>
+
+pub fn core::clone::impls::{impl core::clone::Clone::x86_64-pc-windows-msvc for u32}::clone<'_0>(_1: &'_0 u32) -> u32
+= target_dispatch {
+ x86_64-pc-windows-msvc => core::clone::impls::{impl core::clone::Clone::x86_64-pc-windows-msvc for u32}::clone::x86_64-pc-windows-msvc<'_0>,
+ aarch64-apple-darwin => core::clone::impls::{impl core::clone::Clone::aarch64-apple-darwin for u32}::clone::aarch64-apple-darwin<'_0>,
+ i686-pc-windows-msvc => core::clone::impls::{impl core::clone::Clone::i686-pc-windows-msvc for u32}::clone::i686-pc-windows-msvc<'_0>,
+}
+
fn test_crate::clone_it<'_0>(x_1: &'_0 u32) -> u32
{
let _0: u32; // return
@@ -9,7 +22,7 @@ fn test_crate::clone_it<'_0>(x_1: &'_0 u32) -> u32
storage_live(_2)
_2 = &(*x_1)
- _0 = core::clone::impls::{impl core::clone::Clone for u32}::clone<'4>(move _2)
+ _0 = core::clone::impls::{impl core::clone::Clone::x86_64-pc-windows-msvc for u32}::clone<'4>(move _2)
storage_dead(_2)
return
} |
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.
This PR was AI generated and I'm not asking to merge it: I'm opening it because it is informative.
It solves #1130
Importantly, you will note that attributes, spans and source text led to item duplication, and the agent had to filter them to solve the issue. This is of course not what we want to do, but it seems the fix below is enough to make the deduplication work. About attributes specifically: Aeneas relies on some Unknown attributes (such as
verify::test) so we can't just clear them (we need a merge operation, and maybe we need to introduce the notion of target-specific attribute?).