Uh oh!
There was an error while loading. Please reload this page.
Prohibit patterns in trait methods without bodies - #37378
Conversation
eddyb
commented
Oct 24, 2016
Started crater run. |
eddyb
commented
Oct 24, 2016
Crater run looks pretty bad (177 root regressions). |
petrochenkov
commented
Oct 24, 2016
Something is wrong with root/non-root partitioning in crater. Anyway, it looks like we can't make this an error in the nearest future, but I still hope to proceed with a warn-by-default lint. |
@petrochenkov Maybe they don't show themselves? They might be broken or missing? EDIT: started a second run, only on the "after" half. |
traits: Remove pattern in trait's method signature This use of `mut` was nonsensical for now, but is proposed to be disallowed by rustc in the future (as a bugfix). See rust-lang/rust/pull/37378 for context.
eddyb
commented
Oct 25, 2016
Second crater report shows only 22 root regressions. |
petrochenkov
commented
Oct 25, 2016
I've updated the PR with warning-by-default and tracking issue number. |
eddyb
commented
Oct 25, 2016
@bors r+ |
bors
commented
Oct 25, 2016
📌 Commit 82d4200 has been approved by |
Prohibit patterns in trait methods without bodies
They are not properly type checked
```rust
trait Tr {
fn f(&a: u8); // <- This compiles
}
```
, mostly rejected by the parser already and generally don't make much sense.
This PR is kind of a missing part of rust-lang#35015.
Needs crater run.
cc rust-lang#35078 (comment)rust-lang#35015rust-lang/rfcs#1685rust-lang#35203
r? @eddybManishearth
commented
Oct 26, 2016
Fails tidy, d230a7e |
TimNN
commented
Oct 26, 2016
The used error code ( |
| register_diagnostics! { | ||
| E0472, // asm! is unsupported on this target | ||
| E0561, // patterns aren't allowed in function pointer types | ||
| E0570, // patterns aren't allowed in methods without bodies |
retep998
commented
Oct 26, 2016
I believe this caused #37416 to fail https://buildbot.rust-lang.org/builders/auto-win-msvc-64-cargotest/builds/2155 |
Fixrust-lang/rust#35203 warning/error rust-lang/rust#35203 made patterns in functions without body into a warn by default lint (which is being `deny`ed here). cc rust-lang/rust#37378, rust-lang/rust#37416
petrochenkov
commented
Oct 26, 2016
@bors r=eddyb |
bors
commented
Oct 26, 2016
📌 Commit 811a2b9 has been approved by |
bors
commented
Oct 29, 2016
⌛ Testing commit 811a2b9 with merge e61c918... |
bors
commented
Oct 29, 2016
💔 Test failed - auto-win-msvc-64-cargotest |
TimNN
commented
Oct 29, 2016
This probably needs to update the sha at https://github.com/rust-lang/rust/blob/master/src/tools/cargotest/main.rs#L27 to at least rust-lang/cargo@806e3c3 |
petrochenkov
commented
Oct 29, 2016
@bors r=eddyb |
bors
commented
Oct 29, 2016
📌 Commit 4ca11ce has been approved by |
bors
commented
Oct 29, 2016
Prohibit patterns in trait methods without bodies
They are not properly type checked
```rust
trait Tr {
fn f(&a: u8); // <- This compiles
}
```
, mostly rejected by the parser already and generally don't make much sense.
This PR is kind of a missing part of #35015.
Given the [statistics from crater](#37378 (comment)), the effect of this PR is mostly equivalent to improving `unused_mut` lint.
cc #35078 (comment)#35015rust-lang/rfcs#1685#35203
r? @eddybbors
commented
Oct 29, 2016
@petrochenkov Edit. Ah the first one was broken already from rustc-serialize and num-traits and didn't reveal that the crate would fail to build even without them... (And this is why I would really like central place to check crater runs...) |
petrochenkov
commented
Nov 14, 2016
@WaDelma , anonymous parameters are not reported (yet, waiting for rust-lang/rfcs#1685). |
WaDelma
commented
Nov 14, 2016
Ah okay. That was the part I was missing. :D |
They are not properly type checked
, mostly rejected by the parser already and generally don't make much sense.
This PR is kind of a missing part of #35015.
Given the statistics from crater, the effect of this PR is mostly equivalent to improving
unused_mutlint.cc #35078 (comment)#35015rust-lang/rfcs#1685#35203
r? @eddyb