Skip to content
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

Fix generated wrapper for nested struct with static fn, alternative PR #1387

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

adetaylor
Copy link
Collaborator

Tests PR #1380 which for some reason didn't run tests.

@roife
Copy link

roife commented Aug 30, 2024

I just encountered an unusual issue on main branch that's preventing me from testing on my machine: when I run cargo run in the demo, I get the following error:

error[E0599]: no method named `describe` found for struct `Pin<Box<root::Goat>>` in the current scope
  --> demo/src/main.rs:23:14
   |
23 |         goat.describe().as_ref().unwrap().to_string_lossy(),
   |         -----^^^^^^^^--
   |         |    |
   |         |    this is an associated function, not a method
   |         help: use associated function syntax instead: `root::Goat::describe()`
   |
   = note: found the following associated functions; to be used as methods, functions must have a `self` parameter
note: the candidate is defined in an impl for the type `root::Goat`
  --> /Users/roife/code/autocxx/target/debug/build/autocxx-demo-a2dd4b564c10039d/out/autocxx-build-dir/rs/autocxx-ffi-default-gen.rs:1:1542
   |
1  | ...orward declaration. If you're sure it didn't, then you may be able to solve this by using instantiable!."] fn describe (_uhoh : autocxx :: BindingGenerationFailure) { } pub fn new () -> impl autocxx :: moveit :: new :: New < Output = Self > { unsafe { autocxx :: moveit ::...
   |                                                                                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

For more information about this error, try `rustc --explain E0599`.

UPDATE: This could be due to the issue that libc++ and autocxx do not work well together yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants