Skip to content

Removes suggestions for misspelled private fields for structs defined in non-local crates #22516

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 4 commits into from
Feb 22, 2015
Merged

Removes suggestions for misspelled private fields for structs defined in non-local crates #22516

merged 4 commits into from
Feb 22, 2015

Conversation

leejunseok
Copy link
Contributor

closes #22421

@rust-highfive
Copy link
Contributor

r? @nikomatsakis

(rust_highfive has picked a reviewer for you, use r? to override)

@ghost
Copy link

ghost commented Feb 19, 2015

@leejunseok Looking good, thank you!

Could you please also add a test for the new behaviour? It's not hard to do! You'll need to create an auxiliary compile-fail test in src/test/compile-fail.

// aux-build:struct-field-privacy.rs

extern crate struct-field-privacy;

use struct-field-privacy::A;

fn main () {
    // ...
}

struct-field-privacy.rs will then act as your external create. struct-field-hints.rs is an example of what you will need to put in in place of // ... to assert what field hints the compiler should provide.

@leejunseok
Copy link
Contributor Author

Er, it looks like the dashes in struct-field-privacy trips everything up. Is there another external crate I could use instead?

@leejunseok
Copy link
Contributor Author

Oops, just kidding, doing extern crate "struct-field-privacy" as xc; seems to work.

@ghost
Copy link

ghost commented Feb 19, 2015

@leejunseok My bad, you'll need a license header for the test as well! With that r=me. :)

@leejunseok
Copy link
Contributor Author

Haha, thank you for your help. I'm relatively new to rust and I appreciate the friendly guidance!

@leejunseok
Copy link
Contributor Author

r? @jakub-

@rust-highfive rust-highfive assigned ghost and unassigned nikomatsakis Feb 19, 2015
@ghost
Copy link

ghost commented Feb 19, 2015

@bors: r+ c87b722

@ghost
Copy link

ghost commented Feb 19, 2015

@leejunseok No probs! Thanks again. :)

@ghost
Copy link

ghost commented Feb 21, 2015

@bors: r+ 9b67d07

Manishearth added a commit to Manishearth/rust that referenced this pull request Feb 21, 2015
@bors
Copy link
Collaborator

bors commented Feb 22, 2015

⌛ Testing commit 9b67d07 with merge 9abf514...

@bors
Copy link
Collaborator

bors commented Feb 22, 2015

💔 Test failed - auto-linux-32-nopt-t

@Manishearth
Copy link
Member

The failure above was triggered by me; this PR is part of the rollup so it's redundant to test it individually (and given the state of the queue, rather wasteful). If the rollup doesn't go through in a couple of tries, ask for a retry on this 😄

Sorry for the trouble!

@huonw huonw merged commit 9b67d07 into rust-lang:master Feb 22, 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.

Field spelling correction suggests private fields
6 participants