Closed
Description
I tried this code:
use std::io::{Read, Seek, Write};
pub struct ShallowTees<R: Read + Seek, W: Write> {
read: R,
write: W,
}
impl<R: Read + Seek, W: Write> ShallowTees<R, W> {
pub fn tee_take(&mut self, limit: u64) -> impl Read + Seek {
struct Take(Self);
Take(self)
}
}
fn main() {}
Running rustc main.rs
does not terminate after a long time. After running for 4 minutes, the rustc
process is using 99.2% CPU and about 80 MB memory.
Meta
rustc --version --verbose
:
rustc 1.48.0 (7eac88abb 2020-11-16)
binary: rustc
commit-hash: 7eac88abb2e57e752f3302f02be5f3ce3d7adfb4
commit-date: 2020-11-16
host: x86_64-unknown-linux-gnu
release: 1.48.0
LLVM version: 11.0