Skip to content

Commit 02f7524

Browse files
Fix rustdoc ICE for impl trait in argument position
1 parent 0eb68b7 commit 02f7524

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

src/librustdoc/clean/mod.rs

-1
Original file line numberDiff line numberDiff line change
@@ -4048,7 +4048,6 @@ where
40484048

40494049
let old_bounds = mem::replace(&mut *cx.impl_trait_bounds.borrow_mut(), bounds);
40504050
let r = f();
4051-
assert!(cx.impl_trait_bounds.borrow().is_empty());
40524051
*cx.impl_trait_bounds.borrow_mut() = old_bounds;
40534052
r
40544053
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
use std::io::Read;
12+
13+
pub struct D<R>(R);
14+
15+
pub struct A;
16+
impl A {
17+
pub fn a(&self, d: impl IntoIterator<Item = D<impl Read>>) -> Result<(), ()> {
18+
unimplemented!()
19+
}
20+
21+
pub fn b(&self, d: impl IntoIterator<Item = D<()>>) -> Result<(), ()> {
22+
unimplemented!()
23+
}
24+
}

0 commit comments

Comments
 (0)