]> git.proxmox.com Git - rustc.git/blame - src/test/compile-fail/issue-32995-2.rs
New upstream version 1.20.0+dfsg1
[rustc.git] / src / test / compile-fail / issue-32995-2.rs
CommitLineData
7cac9316
XL
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
7cac9316 11#![feature(conservative_impl_trait)]
041b39d2 12#![allow(unused)]
7cac9316
XL
13
14fn main() {
15 { fn f<X: ::std::marker()::Send>() {} }
16 //~^ ERROR parenthesized parameters may only be used with a trait
17 //~| WARN previously accepted
7cac9316
XL
18
19 { fn f() -> impl ::std::marker()::Send { } }
20 //~^ ERROR parenthesized parameters may only be used with a trait
21 //~| WARN previously accepted
7cac9316
XL
22}
23
24#[derive(Clone)]
25struct X;
26
27impl ::std::marker()::Copy for X {}
28//~^ ERROR parenthesized parameters may only be used with a trait
29//~| WARN previously accepted