Skip to content

Commit be11171

Browse files
committed
Split up tests, reduce coverage
1 parent 8f41b74 commit be11171

File tree

4 files changed

+49
-12
lines changed

4 files changed

+49
-12
lines changed

src/test/compile-fail/typeck-before-dropck-bug.rs renamed to src/test/compile-fail/issue-22897.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,3 @@ fn unconstrained_type() {
1717
[];
1818
//~^ ERROR cannot determine a type for this expression: unconstrained type
1919
}
20-
21-
fn invalid_impl_within_scope() {
22-
{
23-
use std::ops::Deref;
24-
struct Something;
25-
26-
impl Deref for Something {}
27-
//~^ ERROR not all trait items implemented, missing: `Target`, `deref`
28-
29-
*Something
30-
};
31-
}

src/test/compile-fail/issue-23041.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// Copyright 2015 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+
use std::any::Any;
12+
fn main()
13+
{
14+
fn bar(x:i32) ->i32 { 3*x };
15+
let b:Box<Any> = Box::new(bar as fn(_)->_);
16+
b.downcast_ref::<fn(_)->_>();
17+
//~^ ERROR cannot determine a type for this expression: unconstrained type
18+
}

src/test/compile-fail/issue-23966.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Copyright 2015 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+
fn main() {
12+
"".chars().fold(|_, _| (), ());
13+
//~^ ERROR cannot determine a type for this expression: unconstrained type
14+
}

src/test/compile-fail/issue-24013.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Copyright 2015 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+
fn main() {
12+
use std::mem::{transmute, swap};
13+
let a = 1;
14+
let b = 2;
15+
unsafe {swap::<&mut _>(transmute(&a), transmute(&b))};
16+
//~^ ERROR cannot determine a type for this expression: unconstrained type
17+
}

0 commit comments

Comments
 (0)