Skip to content

librustc: dont warn for inside of items when the parent is dead #29682

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
Nov 9, 2015

Conversation

Ryman
Copy link
Contributor

@Ryman Ryman commented Nov 8, 2015

This standardises the current behavior to match enum variants, hopefully leading to less warning spam for users!

For example the code below will have 2 warnings (for Foo and Bar) rather than 7:

enum Foo {
    A,
    B { a: String, b: isize },
    C
}

struct Bar {
    a: i32,
    b: String,
    c: ()
}

fn main() {
    println!("Hi")
}

http://is.gd/zAztKW

@rust-highfive
Copy link
Contributor

r? @jroesch

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

@sanxiyn
Copy link
Member

sanxiyn commented Nov 9, 2015

@bors r+

@bors
Copy link
Collaborator

bors commented Nov 9, 2015

📌 Commit c0a3538 has been approved by sanxiyn

@bors
Copy link
Collaborator

bors commented Nov 9, 2015

⌛ Testing commit c0a3538 with merge 36f211b...

bors added a commit that referenced this pull request Nov 9, 2015
This standardises the current behavior to match `enum` variants, hopefully leading to less warning spam for users!

For example the code below will have 2 warnings (for `Foo` and `Bar`) rather than 7:
```rust
enum Foo {
    A,
    B { a: String, b: isize },
    C
}

struct Bar {
    a: i32,
    b: String,
    c: ()
}

fn main() {
    println!("Hi")
}
```
http://is.gd/zAztKW
@bors bors merged commit c0a3538 into rust-lang:master Nov 9, 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.

5 participants