Skip to content

Commit 97e0dc3

Browse files
committed
added test
1 parent d2b9a77 commit 97e0dc3

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Copyright 2017 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+
#![feature(universal_impl_trait)]
12+
13+
use std::fmt::Debug;
14+
15+
fn foo<T>(x: impl Debug) { }
16+
17+
fn main() {
18+
foo::<String>('a'); //~ ERROR cannot provide explicit type parameters
19+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
error[E0632]: cannot provide explicit type parameters when `impl Trait` is used in argument position.
2+
--> $DIR/universal-issue-48703.rs:18:5
3+
|
4+
LL | foo::<String>('a'); //~ ERROR cannot provide explicit type parameters
5+
| ^^^^^^^^^^^^^
6+
7+
error: aborting due to previous error
8+
9+
For more information about this error, try `rustc --explain E0632`.

0 commit comments

Comments
 (0)