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 some pub use privacy errors and a bit of resolve refactoring #23400

Merged
merged 5 commits into from
Mar 17, 2015

Conversation

nrc
Copy link
Member

@nrc nrc commented Mar 15, 2015

r? @eddyb

// Make all tests public so we can call them from outside
// the module (note that the tests are re-exported and must
// be made public themselves to avoid privacy errors).
let mut result = (*i).clone();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're never supposed to clone AST nodes if you own them (can we make specific impls of Clone warn/error?), here's what you can do instead:

i.map(|mut i| { i.vis = ast::Public; i })

@eddyb
Copy link
Member

eddyb commented Mar 15, 2015

r=me with nits fixed - are there really no issues closed by this?

@nrc
Copy link
Member Author

nrc commented Mar 15, 2015

#23266 is closed by this (see the comment on the second commit)

@nrc
Copy link
Member Author

nrc commented Mar 16, 2015

@bors r+ @eddyb 1fd38c1

@Manishearth
Copy link
Member

@bors: r=eddyb

@bors
Copy link
Contributor

bors commented Mar 16, 2015

@bors r=eddyb 1fd38c1

Manishearth added a commit to Manishearth/rust that referenced this pull request Mar 17, 2015
@bors bors merged commit 1fd38c1 into rust-lang:master Mar 17, 2015
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.

4 participants