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

More suggestions for misspelled names #38166

Closed
leonardo-m opened this issue Dec 4, 2016 · 3 comments
Closed

More suggestions for misspelled names #38166

leonardo-m opened this issue Dec 4, 2016 · 3 comments

Comments

@leonardo-m
Copy link

leonardo-m commented Dec 4, 2016

Some ideas from: https://gcc.gnu.org/gcc-7/changes.html

const MAX_ITEM: usize = 10;
fn foo_bar() {}
fn foo(c: esize) {} // Misspelled type name.
enum Bar { First, Second }
fn main() {
    let v = [0u32; MAXITEM]; // Misspelled constant name.
    foobar(); // Misspelled function name.
    let b: Bar = Bar::second; // Misspelled enum variant.
}

In all four cases I'd like the Rust compiler to suggest the closest names (usize/isize, MAX_ITEM, foo_bar, Bar::Second).

@nagisa
Copy link
Member

nagisa commented Dec 5, 2016

Duplicate of #30197. Please note the cases where the compiler does not suggest a name in the linked issue.

@leonardo-m
Copy link
Author

Thank you. The text of this issue is short enough, so I've copied it all, I think it can't hurt much.
I have used Bugzilla a lot in past. How do I close this issue? How can I find duplicated issues before submitting it? How can I add tags to my issues?

@nagisa
Copy link
Member

nagisa commented Dec 5, 2016

How do I close this issue?

There should be a button “Close issue” near the one that says “Comment”.

How can I find duplicated issues before submitting it?

Using the issue search with smartly crafted queries. In case of ICE the message of ICE or function name in backtrace works well. In case of issues like yours you can simply rely on other people noticing a duplicate.

How can I add tags to my issues?

You cannot. It is, unlike in (Mozilla’s) Bugzilla, something that only people in a list of some sort can do.

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

No branches or pull requests

2 participants