From 97e0dc330fb4dfc3fc5161fbba1f0b4193d80bc9 Mon Sep 17 00:00:00 2001 From: tinaun Date: Sat, 3 Mar 2018 17:32:47 -0500 Subject: [PATCH] added test --- .../ui/impl-trait/universal-issue-48703.rs | 19 +++++++++++++++++++ .../impl-trait/universal-issue-48703.stderr | 9 +++++++++ 2 files changed, 28 insertions(+) create mode 100644 src/test/ui/impl-trait/universal-issue-48703.rs create mode 100644 src/test/ui/impl-trait/universal-issue-48703.stderr diff --git a/src/test/ui/impl-trait/universal-issue-48703.rs b/src/test/ui/impl-trait/universal-issue-48703.rs new file mode 100644 index 0000000000000..e017b37b7b733 --- /dev/null +++ b/src/test/ui/impl-trait/universal-issue-48703.rs @@ -0,0 +1,19 @@ +// Copyright 2017 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. + +#![feature(universal_impl_trait)] + +use std::fmt::Debug; + +fn foo(x: impl Debug) { } + +fn main() { + foo::('a'); //~ ERROR cannot provide explicit type parameters +} diff --git a/src/test/ui/impl-trait/universal-issue-48703.stderr b/src/test/ui/impl-trait/universal-issue-48703.stderr new file mode 100644 index 0000000000000..ea509684f9efc --- /dev/null +++ b/src/test/ui/impl-trait/universal-issue-48703.stderr @@ -0,0 +1,9 @@ +error[E0632]: cannot provide explicit type parameters when `impl Trait` is used in argument position. + --> $DIR/universal-issue-48703.rs:18:5 + | +LL | foo::('a'); //~ ERROR cannot provide explicit type parameters + | ^^^^^^^^^^^^^ + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0632`.