diff options
| author | David Wood <david@davidtw.co> | 2018-08-08 14:28:26 +0200 |
|---|---|---|
| committer | David Wood <david@davidtw.co> | 2018-08-14 10:38:00 +0200 |
| commit | b16a30677f4e641329e768272cf9d3ecc2fa31c4 (patch) | |
| tree | d3e652eb74da6147d2ae1514977c93c785c733a2 /src/test/compile-fail/derived-errors | |
| parent | fe28bcf1db02afe184e3677ee034b2a5804f2466 (diff) | |
| download | rust-b16a30677f4e641329e768272cf9d3ecc2fa31c4.tar.gz rust-b16a30677f4e641329e768272cf9d3ecc2fa31c4.zip | |
Moved compile-fail tests to ui tests.
Diffstat (limited to 'src/test/compile-fail/derived-errors')
| -rw-r--r-- | src/test/compile-fail/derived-errors/issue-30580.rs | 27 | ||||
| -rw-r--r-- | src/test/compile-fail/derived-errors/issue-31997.rs | 27 |
2 files changed, 0 insertions, 54 deletions
diff --git a/src/test/compile-fail/derived-errors/issue-30580.rs b/src/test/compile-fail/derived-errors/issue-30580.rs deleted file mode 100644 index 553ad0a3341..00000000000 --- a/src/test/compile-fail/derived-errors/issue-30580.rs +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2012 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. - -// Test that we do not see uninformative region-related errors -// when we get some basic type-checking failure. See #30580. - -pub struct Foo { a: u32 } -pub struct Pass<'a, 'tcx: 'a>(&'a mut &'a (), &'a &'tcx ()); - -impl<'a, 'tcx> Pass<'a, 'tcx> -{ - pub fn tcx(&self) -> &'a &'tcx () { self.1 } - fn lol(&mut self, b: &Foo) - { - b.c; //~ ERROR no field `c` on type `&Foo` - self.tcx(); - } -} - -fn main() {} diff --git a/src/test/compile-fail/derived-errors/issue-31997.rs b/src/test/compile-fail/derived-errors/issue-31997.rs deleted file mode 100644 index 2e1d3c55a8f..00000000000 --- a/src/test/compile-fail/derived-errors/issue-31997.rs +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2012 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. - -// Test that the resolve failure does not lead to downstream type errors. -// See issue #31997. - -trait TheTrait { } - -fn closure<F, T>(x: F) -> Result<T, ()> - where F: FnMut() -> T, T: TheTrait, -{ - unimplemented!() -} - -fn foo() -> Result<(), ()> { - try!(closure(|| bar(0 as *mut _))); //~ ERROR cannot find function `bar` in this scope - Ok(()) -} - -fn main() { } |
