Skip to content

item: Consider replaced items hidden. #82

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

Merged
merged 1 commit into from
Oct 18, 2016

Conversation

emilio
Copy link
Contributor

@emilio emilio commented Oct 13, 2016

Fixes #81

r? @nox

@fitzgen
Copy link
Member

fitzgen commented Oct 14, 2016

By modifying this test header, I get a similar error (using this PR and #85). Not sure if we want to put this off for another PR or not.

diff --git a/tests/headers/replaces_double.hpp b/tests/headers/replaces_double.hpp
index 1a78b0d..74d500b 100644
--- a/tests/headers/replaces_double.hpp
+++ b/tests/headers/replaces_double.hpp
@@ -7,14 +7,15 @@ struct Wrapper {
     };
     using Type = Wrapped;
 };

 template<typename T>
 class Rooted {
     using MaybeWrapped = typename Wrapper<T>::Type;
     MaybeWrapped ptr;
-
-    /**
-     * <div rustbindgen replaces="Rooted_MaybeWrapped"></div>
-     */
-    using MaybeWrapped_simple = T;
 };
+
+/**
+ * <div rustbindgen replaces="Rooted_MaybeWrapped"></div>
+ */
+template <typename T>
+using MaybeWrapped_simple = T;

Results in this error due to duplicate types:

error[E0428]: a type named `Rooted_MaybeWrapped` has already been defined in this module
  --> tests/expectations/replaces_double.rs:16:1
   |
12 | pub type Rooted_MaybeWrapped<T> = T;
   | ------------------------------------ previous definition of `Rooted_MaybeWrapped` here
...
16 | pub type Rooted_MaybeWrapped<T> = T;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ already defined

error: aborting due to previous error

@fitzgen
Copy link
Member

fitzgen commented Oct 14, 2016

Nevermind: I think I failed to recompile.

@fitzgen fitzgen mentioned this pull request Oct 17, 2016
@nox
Copy link
Contributor

nox commented Oct 18, 2016

@bors-servo r+

@bors-servo
Copy link

📌 Commit c30320f has been approved by nox

@bors-servo
Copy link

⌛ Testing commit c30320f with merge b162e92...

bors-servo pushed a commit that referenced this pull request Oct 18, 2016
item: Consider replaced items hidden.

Fixes #81

r? @nox
@bors-servo
Copy link

☀️ Test successful - status-travis

@bors-servo bors-servo merged commit c30320f into rust-lang:master Oct 18, 2016
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.

5 participants