Skip to content

Irrefutable while-let pattern in log4rs-rolling-file-0.2.0, Rust 1.16 #38972

Closed
@brson

Description

@brson

UPDATE: The underlying problem has been solved (we believe), but there is not yet a regression test in the test base. Here are some instructions for how to add a regression test.


https://github.com/sfackler/log4rs-rolling-file 1ce36b4301c86fa750134d35cb815d146c5836ee

Not on stable/beta.

101 brian@ip-10-145-43-250:~⟫ rustc +nightly -Vv
rustc 1.16.0-nightly (47c8d9fdc 2017-01-08)
binary: rustc
commit-hash: 47c8d9fdcf2e6502cf4ca7d7f059fdc1a2810afa
commit-date: 2017-01-08
host: x86_64-unknown-linux-gnu
release: 1.16.0-nightly
LLVM version: 3.9
brian@ip-10-145-43-250:~/dev/log4rs-rolling-file⟫ cargo +nightly test
   Compiling crossbeam v0.2.10
   Compiling serde v0.7.15
   Compiling libc v0.2.19
   Compiling traitobject v0.0.3
   Compiling unsafe-any v0.4.1
   Compiling typemap v0.3.3
   Compiling winapi-build v0.1.1
   Compiling yaml-rust v0.3.5
   Compiling kernel32-sys v0.2.2
   Compiling num-traits v0.1.36
   Compiling log v0.3.6
   Compiling winapi v0.2.8
   Compiling time v0.1.35
   Compiling num-integer v0.1.32
   Compiling num-iter v0.1.32
   Compiling rand v0.3.15
   Compiling quick-error v1.1.0
   Compiling num v0.1.36
   Compiling chrono v0.2.25
   Compiling humantime v0.1.3
   Compiling serde_yaml v0.2.5
   Compiling ordered-float v0.1.0
   Compiling serde-value v0.2.1
   Compiling antidote v1.0.0
   Compiling tempdir v0.3.5
   Compiling log4rs v0.4.8
   Compiling log4rs-rolling-file v0.2.0 (file:///mnt2/dev/log4rs-rolling-file)
error[E0165]: irrefutable while-let pattern
  --> src/policy/compound/roll/delete/config.rs:81:43
   |
81 |                                 while let Some(key) =
   |                                           ^^^^^^^^^ irrefutable pattern

error: aborting due to previous error

Build failed, waiting for other jobs to finish...
error[E0165]: irrefutable while-let pattern
  --> src/policy/compound/roll/delete/config.rs:81:43
   |
81 |                                 while let Some(key) =
   |                                           ^^^^^^^^^ irrefutable pattern

error: aborting due to previous error

error: Could not compile `log4rs-rolling-file`.

To learn more, run the command again with --verbose.

This case is interesting. The loop is generated by serde and from inspection seems be a degenerate case. I can't tell if it was previously right or wrong.

cc @sfackler @erickt

Metadata

Metadata

Assignees

Labels

A-type-systemArea: Type systemP-highHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions