From 4f3f55cc667fd78bf075a06085e02988d1341a51 Mon Sep 17 00:00:00 2001 From: Andrew Paseltiner Date: Fri, 28 Aug 2015 12:54:17 -0400 Subject: [PATCH] add test for #20803 closes #20803 --- src/test/run-pass/issue-20803.rs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/test/run-pass/issue-20803.rs diff --git a/src/test/run-pass/issue-20803.rs b/src/test/run-pass/issue-20803.rs new file mode 100644 index 00000000000..2c00510ba97 --- /dev/null +++ b/src/test/run-pass/issue-20803.rs @@ -0,0 +1,19 @@ +// Copyright 2015 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +use std::ops::Add; + +fn foo(x: T) -> >::Output where i32: Add { + 42i32 + x +} + +fn main() { + println!("{}", foo(0i32)); +}