You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RUST_LOG=rustc=1 rustc main.rs
task 'rustc' failed at 'assertion failed: end <= self.len()', /home/derek/dev/rust/src/libstd/vec.rs:980
error: internal compiler error: unexpected failure
This message reflects a bug in the Rust compiler.
We would appreciate a bug report: https://github.com/mozilla/rust/wiki/HOWTO-submit-a-Rust-bug-report
note: the compiler hit an unexpected failure path. this is a bug
note: try running with RUST_LOG=rustc=1 to get further details and report the results to github.com/mozilla/rust/issues
task '<main>' failed at 'explicit failure', /home/derek/dev/rust/src/librustc/lib.rs:397
The second appears to be a parser error
pubmod m {pubfnfoo(){}}fnmain(){::m::.foo()}
$ RUST_LOG=rustc=1 rustc main.rs
main.rs:6:4: 6:9 error: unresolved name `m`.
main.rs:6 ::m::.foo()
^~~~~
error: aborting due to previous error
task 'rustc' failed at 'explicit failure', /home/derek/dev/rust/src/libsyntax/diagnostic.rs:101
task '<main>' failed at 'explicit failure', /home/derek/dev/rust/src/librustc/lib.rs:397
Seems to me the parser should catch that and report something like
main.rs:6:4: 6:9 error: expected identifier, but found `.`
… r=blyxyas
feature: add new lint `pub_underscore_fields`
fixes: rust-lang#10282
This PR introduces a new lint `pub_underscore_fields` that lints when a user has marked a field of a struct as public, but also prefixed it with an underscore (`_`). This is something users should avoid because the two ideas are contradictory. Prefixing a field with an `_` is inferred as the field being unused, but making a field public infers that it will be used.
- \[x] Followed [lint naming conventions][lint_naming]
- I believe I followed the naming conventions, more than happy to update the naming if I did not :)
- \[x] Added passing UI tests (including committed `.stderr` file)
- \[x] `cargo test` passes locally
- \[x] Executed `cargo dev update_lints`
- \[x] Added lint documentation
- \[x] Run `cargo dev fmt`
---
changelog: new lint: [`pub_underscore_fields`]
[rust-lang#10283](rust-lang/rust-clippy#10283)
<!-- changelog_checked -->
I've got two clues, the first is the ICE
The second appears to be a parser error
Seems to me the parser should catch that and report something like
main.rs:6:4: 6:9 error: expected identifier, but found `.`
$ rustc -v
rustc 0.9-pre (72e432d 2013-11-04 17:22:03 -0800)
host: x86_64-unknown-linux-gnu
$ uname -a
Linux hostname 3.10-1-amd64 #1 SMP Debian 3.10.1-1 (2013-07-16) x86_64 GNU/Linux
The text was updated successfully, but these errors were encountered: