remove erroneous error message when checking impl trait params#48709
remove erroneous error message when checking impl trait params#48709bors merged 2 commits intorust-lang:masterfrom
Conversation
|
r? @eddyb (rust_highfive has picked a reviewer for you, use r? to override) |
e848adf to
a951343
Compare
|
i don't really like my solution here, but idk if doing the test in both functions would be any better |
nikomatsakis
left a comment
There was a problem hiding this comment.
Seems good to me, the only nit is in the name of the parameter, which could be clearer I think.
src/librustc_typeck/check/mod.rs
Outdated
There was a problem hiding this comment.
Nit: lots of bool parameters can get sorta hard to read. I like to do:
struct IsMethodCall(bool);
struct IsImplTrait(bool);and then use those types instead of plain bool. Then the caller can do check_path_parameter_count(span, segment, IsMethodCall(true), IsImplTrait(false)) or whatever. Inside the function, you can read the value by doing is_method_call.0.
There was a problem hiding this comment.
But in any case I kind of think the name is_impl_trait is not very informative. How about suppress_mismatch_error or something?
|
@tinaun -- do you think you'll have a chance to address the nit above? ❤️ |
6e23c12 to
d7dfc85
Compare
|
@nikomatsakis looks like there has been new code pushed! |
|
True, although it did not address my nit. That's ok, I don't care that much, but @tinaun you will need to fix this travis error: https://travis-ci.org/rust-lang/rust/builds/353614751#L1817 r=me once green |
|
@tinaun ping from triage! The travis build is failing, could you fix that so the PR can be merged? |
|
@bors r+ |
|
📌 Commit 97e0dc3 has been approved by |
remove erroneous error message when checking impl trait params fixes rust-lang#48703
|
⌛ Testing commit 97e0dc3 with merge 290420ba65d7e5829826c9cd84d20d9a923e3138... |
|
@bors: retry prioritizing rollup with this included in it |
remove erroneous error message when checking impl trait params fixes #48703
|
☀️ Test successful - status-appveyor, status-travis |
fixes #48703