Skip to content

Commit 3b78a47

Browse files
committed
Fix HIR printing of existential type rust-lang#60662
This fixes rust-lang#60662
1 parent af98304 commit 3b78a47

File tree

3 files changed

+25
-1
lines changed

3 files changed

+25
-1
lines changed

src/librustc/hir/print.rs

-1
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,6 @@ impl<'a> State<'a> {
646646

647647
self.print_where_clause(&exist.generics.where_clause)?;
648648
self.s.space()?;
649-
self.word_space(":")?;
650649
let mut real_bounds = Vec::with_capacity(exist.bounds.len());
651650
for b in exist.bounds.iter() {
652651
if let GenericBound::Trait(ref ptr, hir::TraitBoundModifier::Maybe) = *b {

src/test/ui/issues/issue-60662.rs

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// compile-pass
2+
// compile-flags: -Z unpretty=hir
3+
4+
#![feature(existential_type)]
5+
6+
trait Animal {
7+
}
8+
9+
fn main() {
10+
pub existential type ServeFut: Animal;
11+
}

src/test/ui/issues/issue-60662.stdout

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// compile-pass
2+
// compile-flags: -Z unpretty=hir
3+
4+
#![feature(existential_type)]
5+
#[prelude_import]
6+
use ::std::prelude::v1::*;
7+
#[macro_use]
8+
extern crate std;
9+
10+
trait Animal { }
11+
12+
fn main() {
13+
pub existential type ServeFut : Animal;
14+
}

0 commit comments

Comments
 (0)