diff options
| author | bors <bors@rust-lang.org> | 2017-09-10 12:48:55 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-09-10 12:48:55 +0000 |
| commit | d290dec97f8bace2a2585505518b109b1e368f4c (patch) | |
| tree | b3973604ffde6b7dce3897b531a7faaf8c0aeb69 /src/test/compile-fail | |
| parent | 23aaeb573b626a51af9ecc97680663153e4ab2b0 (diff) | |
| parent | 8a7d93bf6f5b1a699bafec6f59964a3962b2e927 (diff) | |
| download | rust-d290dec97f8bace2a2585505518b109b1e368f4c.tar.gz rust-d290dec97f8bace2a2585505518b109b1e368f4c.zip | |
Auto merge of #44474 - GuillaumeGomez:rollup, r=GuillaumeGomez
Rollup of 13 pull requests - Successful merges: #44262, #44329, #44332, #44347, #44372, #44384, #44387, #44396, #44449, #44451, #44457, #44464, #44467 - Failed merges:
Diffstat (limited to 'src/test/compile-fail')
| -rw-r--r-- | src/test/compile-fail/feature-gate-repr128.rs | 17 | ||||
| -rw-r--r-- | src/test/compile-fail/issue-41229-ref-str.rs | 16 | ||||
| -rw-r--r-- | src/test/compile-fail/issue-44021.rs | 16 |
3 files changed, 49 insertions, 0 deletions
diff --git a/src/test/compile-fail/feature-gate-repr128.rs b/src/test/compile-fail/feature-gate-repr128.rs new file mode 100644 index 00000000000..96fffa6cdd0 --- /dev/null +++ b/src/test/compile-fail/feature-gate-repr128.rs @@ -0,0 +1,17 @@ +// Copyright 2016 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 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#[repr(u128)] +enum A { //~ ERROR repr with 128-bit type is unstable + //~| HELP: add #![feature(repr128)] + A(u64) +} + +fn main() {} diff --git a/src/test/compile-fail/issue-41229-ref-str.rs b/src/test/compile-fail/issue-41229-ref-str.rs new file mode 100644 index 00000000000..31bc21c23ba --- /dev/null +++ b/src/test/compile-fail/issue-41229-ref-str.rs @@ -0,0 +1,16 @@ +// 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 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +pub fn example(ref s: str) {} +//~^ ERROR the trait bound `str: std::marker::Sized` is not satisfied +//~| `str` does not have a constant size known at compile-time +//~| the trait `std::marker::Sized` is not implemented for `str` + +fn main() {} diff --git a/src/test/compile-fail/issue-44021.rs b/src/test/compile-fail/issue-44021.rs new file mode 100644 index 00000000000..b6ec21b94c7 --- /dev/null +++ b/src/test/compile-fail/issue-44021.rs @@ -0,0 +1,16 @@ +// Copyright 2014 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 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +struct MyStruct; +impl MyStruct { + fn f() {|x, y} //~ ERROR expected one of `:`, `@`, or `|`, found `}` +} + +fn main() {} |
