Skip to content

Getting a warning on an empty line after updating to 0.7 #7589

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

Closed
AutomatedTester opened this issue Jul 4, 2013 · 1 comment · Fixed by #7591
Closed

Getting a warning on an empty line after updating to 0.7 #7589

AutomatedTester opened this issue Jul 4, 2013 · 1 comment · Fixed by #7591
Labels
A-diagnostics Area: Messages for errors, warnings, and lints

Comments

@AutomatedTester
Copy link

I have just updated to 0.7 and getting the following

☁ rust_learning rustc --test about_arrays.rs
about_arrays.rs:1:0: 1:0 warning: static constant should have an uppercase identifier [-W non-uppercase-statics (default)]
about_arrays.rs:1
^
warning: no debug symbols in executable (-arch x86_64)


#[test]
fn test_we_can_get_item_from_array() {
    let foo = ["a","b","5"];
    assert!("5" == foo[2]);
}

#[test]
fn test_we_add_a_new_item_to_an_array() {
    let mut foo = ~[];
    foo.push(1);
    foo.push(3);
    foo.push(2);
    foo.push(5);
    assert!(foo.len() == 4);
}

#[test]
fn test_we_can_pop_items_from_list() {
    let mut foo = ~["a", "b", "c"];
    foo.pop();
    assert!(foo.len() == 2);
    assert!(~["a", "b"] == foo);
}

#[test]
fn test_that_we_can_slice_arrays() {
    let foo = ["a", "b", "c"];
    assert!(["c"] == foo.slice(2, 3));
}
@AutomatedTester
Copy link
Author

cc @huonw

@bors bors closed this as completed in e07ae9e Jul 8, 2013
flip1995 pushed a commit to flip1995/rust that referenced this issue Jul 18, 2022
…ffate

Fixes for `branches_sharing_code`

fixes rust-lang#7198
fixes rust-lang#7452
fixes rust-lang#7555
fixes rust-lang#7589

changelog: Don't suggest moving modifications to locals used in any of the condition expressions in `branches_sharing_code`
changelog: Don't suggest moving anything after a local with a significant drop in `branches_sharing_code`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant