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

an easy way to impl Default #122

Closed
wants to merge 1 commit into from

Conversation

tshepang
Copy link
Member

@tshepang tshepang commented Sep 9, 2019

No description provided.

@nikomatsakis
Copy link
Contributor

I was going to close this PR, but actually @tshepang maybe you want to replace it with one that adds a comment for future folks to explain why the impl is there?

@tshepang
Copy link
Member Author

tshepang commented Sep 18, 2019

Why don't we want Default for this case (a question for my curiosity and for the upcoming PR)?

As an aside, I should have seen #49.

@nikomatsakis
Copy link
Contributor

@tshepang thanks! unfortunately this has a merge conflict... and, actually, with @csmoe's changes in #127, we actually probably can derive(Default) now

@tshepang
Copy link
Member Author

tshepang commented Oct 3, 2019

ok, will wait for integration into rustc to test the derive(Default)

@nikomatsakis
Copy link
Contributor

I think @tshepang we should be able to derive-default now, with perhaps some minor changes.

@tshepang
Copy link
Member Author

Is that more like it?

@tshepang
Copy link
Member Author

Ok, it still results in a failing rustc build (with these changes)...

error[E0599]: no function or associated item named `default` found for type `polonius_engine::facts::AllFacts<borrow_check::nll::facts::RustcFacts>` in the current scope
   --> src/librustc_mir/borrow_check/nll/mod.rs:175:24                       
    |                                                                            
175 |         Some(AllFacts::default())                                                      
    |                        ^^^^^^^ function or associated item not found in `polonius_engine::facts::AllFacts<borrow_check::nll::facts::RustcFacts>`
    |                                                                  
    = note: the method `default` exists but the following trait bounds were not satisfied:
            `polonius_engine::facts::AllFacts<borrow_check::nll::facts::RustcFacts> : std::default::Default`

I will let this one rest.

@tshepang tshepang closed this Oct 15, 2019
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.

2 participants