rust-lang / rust-lang/rust-bindgen

Different results for tests/headers/objc_template.h in LLVM trunk.

Open
#695 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-Obj-C A-testing
Dominant language
Rust
Stars
5.3k
Forks
829
Avg merge
1d 1h
Merged PRs (30d)
15

Description

Running the tests on LLVM trunk with (or without) #694 yields:

diff --git a/tests/expectations/tests/objc_template.rs b/tests/expectations/tests/objc_template.rs
index e5a874c6..95d12ff6 100644
--- a/tests/expectations/tests/objc_template.rs
+++ b/tests/expectations/tests/objc_template.rs
@@ -11,8 +11,8 @@ extern crate objc;
 pub type id = *mut objc::runtime::Object;
 pub trait Foo {
     unsafe fn get(self)
-    -> id;
+    -> *mut ObjectType;
 }
 impl Foo for id {
-    unsafe fn get(self) -> id { msg_send!(self , get) }
+    unsafe fn get(self) -> *mut ObjectType { msg_send!(self , get) }
 }

cc @scoopr

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with tests/headers/objc_template.h and compare its generated output with tests/expectations/tests/objc_template.rs. Run the relevant tests and determine why the result changes between the expected id type and *mut ObjectType; done means the test output and expectation agree with the intended behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
objective-c, rust
Domain
compilers, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.