Skip to content

Nightly regression. #32301

Closed
Closed
@dpc

Description

@dpc

Mioco works on nightly, but recent nightly (around two day ago) does not compile mioco anymore.

I have minimized code to:

https://gist.github.com/dpc/a6bd306b8187651ec700

This code compiles on stable, but breaks on nightly, so I believe this is a regression.

dpc@futex ~/t/mioco-break (master) [I]> multirust override nightly ; make
multirust: using existing install for 'nightly'
multirust: override toolchain for '/home/dpc/tmp/mioco-break' set to 'nightly'
cargo build
   Compiling mioco-break v0.1.0 (file:///home/dpc/tmp/mioco-break)
udp.rs:11:5: 13:6 error: duplicate definitions with name `try_read`: [E0201]
udp.rs:11     pub fn try_read(&mut self, buf: &mut [u8]) -> io::Result<Option<(usize, SocketAddr)>> {
udp.rs:12         Ok(None)
udp.rs:13     }
udp.rs:11:5: 13:6 help: run `rustc --explain E0201` to see a detailed explanation
lib.rs:14:5: 16:6 note: conflicting definition is here:
lib.rs:14     pub fn try_read(&mut self, buf: &mut [u8]) -> io::Result<Option<usize>> {
lib.rs:15         Ok(None)
lib.rs:16     }
error: aborting due to previous error
       error Could not compile `mioco-break`.

To learn more, run the command again with --verbose.
Makefile:2: recipe for target 'all' failed
make: *** [all] Error 101
dpc@futex ~/t/mioco-break (master) [2] [I]> multirust override stable ; make
multirust: using existing install for 'stable'
multirust: override toolchain for '/home/dpc/tmp/mioco-break' set to 'stable'
cargo build
   Compiling mioco-break v0.1.0 (file:///home/dpc/tmp/mioco-break)
udp.rs:11:5: 13:6 warning: method is never used: `try_read`, #[warn(dead_code)] on by default
udp.rs:11     pub fn try_read(&mut self, buf: &mut [u8]) -> io::Result<Option<(usize, SocketAddr)>> {
udp.rs:12         Ok(None)
udp.rs:13     }
udp.rs:11:32: 11:35 warning: unused variable: `buf`, #[warn(unused_variables)] on by default
udp.rs:11     pub fn try_read(&mut self, buf: &mut [u8]) -> io::Result<Option<(usize, SocketAddr)>> {
                                         ^~~
lib.rs:14:32: 14:35 warning: unused variable: `buf`, #[warn(unused_variables)] on by default
lib.rs:14     pub fn try_read(&mut self, buf: &mut [u8]) -> io::Result<Option<usize>> {
                                         ^~~

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions