You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When trying to generate bindings to a type with the name String I get the error
Error: × cxx couldn't handle our generated bindings - could be a bug in autocxx:
│ unsupported unique_ptr target type
In my particular case the String type is being incidentally generated because it is being returned from another function. But it will reproduce when directly generating the type named String as well.
To Reproduce
I created a minimized example which reproduces this behaviour with a header named test.h
without the corresponding type String = super::bindgen::root::tester::String; declaration (which appears later). If these lines are removed then compilation will fail with cxx0.h containing a function conversion which attempts to return a rust::String instead of tester::String.
I am happy to continue to explore/fix this problem, but I would like some guidance on where I should look to find the String -> rust::String conversion machinery.
The text was updated successfully, but these errors were encountered:
I was able to create a simpler reproducible test case, I believe it's just name conflicts with the default prelude, using a different struct name other than String should generate bindings without problems
Describe the bug
When trying to generate bindings to a type with the name String I get the error
In my particular case the String type is being incidentally generated because it is being returned from another function. But it will reproduce when directly generating the type named String as well.
To Reproduce
I created a minimized example which reproduces this behaviour with a header named
test.h
Additional notes
I did some initial digging and found that the
cxxbridge
that autocxx is generating containswithout the corresponding
type String = super::bindgen::root::tester::String;
declaration (which appears later). If these lines are removed then compilation will fail withcxx0.h
containing a function conversion which attempts to return arust::String
instead oftester::String
.I am happy to continue to explore/fix this problem, but I would like some guidance on where I should look to find the String -> rust::String conversion machinery.
The text was updated successfully, but these errors were encountered: