Skip to content

Commit 35f5e18

Browse files
committed
Fix fallout in tests
1 parent 20ee53c commit 35f5e18

22 files changed

+7
-31
lines changed

src/test/compile-fail-fulldeps/macro-crate-doesnt-resolve.rs

-1
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,4 @@ extern crate macro_crate_test;
1616
fn main() {
1717
macro_crate_test::foo();
1818
//~^ ERROR failed to resolve. Use of undeclared type or module `macro_crate_test`
19-
//~^^ ERROR unresolved name `macro_crate_test::foo`
2019
}

src/test/compile-fail/bad-module.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// error-pattern: unresolved name
11+
// error-pattern: failed to resolve. Use of undeclared type or module `thing`
1212

1313
fn main() { let foo = thing::len(Vec::new()); }

src/test/compile-fail/bad-type-env-capture.rs

-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,5 @@
1010

1111
fn foo<T>() {
1212
fn bar(b: T) { } //~ ERROR can't use type parameters from outer
13-
//~^ ERROR type name `T` is undefined or not in scope
1413
}
1514
fn main() { }

src/test/compile-fail/export-fully-qualified.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// error-pattern: unresolved name
11+
// error-pattern: failed to resolve. Use of undeclared type or module `foo`
1212

1313
// In this test baz isn't resolved when called as foo.baz even though
1414
// it's called from inside foo. This is somewhat surprising and may

src/test/compile-fail/export2.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// error-pattern: unresolved name
11+
// error-pattern: failed to resolve. Use of undeclared type or module `bar`
1212

1313
mod foo {
1414
pub fn x() { bar::x(); }

src/test/compile-fail/inner-static-type-parameter.rs

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ enum Bar<T> { What } //~ ERROR parameter `T` is never used
1515
fn foo<T>() {
1616
static a: Bar<T> = Bar::What;
1717
//~^ ERROR cannot use an outer type parameter in this context
18-
//~| ERROR type name `T` is undefined or not in scope
1918
}
2019

2120
fn main() {

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

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ trait Trait {
1212
fn outer(&self) {
1313
fn inner(_: &Self) {
1414
//~^ ERROR can't use type parameters from outer function
15-
//~^^ ERROR use of `Self` outside of an impl or trait
1615
}
1716
}
1817
}

src/test/compile-fail/issue-3021-b.rs

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ fn siphash(k0 : u64) {
1717
impl siphash {
1818
pub fn reset(&mut self) {
1919
self.v0 = k0 ^ 0x736f6d6570736575; //~ ERROR can't capture dynamic environment
20-
//~^ ERROR unresolved name `k0`
2120
}
2221
}
2322
}

src/test/compile-fail/issue-3021-c.rs

-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ fn siphash<T>() {
1313
trait t {
1414
fn g(&self, x: T) -> T; //~ ERROR can't use type parameters from outer function; try using
1515
//~^ ERROR can't use type parameters from outer function; try using
16-
//~^^ ERROR type name `T` is undefined or not in scope
17-
//~^^^ ERROR type name `T` is undefined or not in scope
1816
}
1917
}
2018

src/test/compile-fail/issue-3021-d.rs

-2
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ fn siphash(k0 : u64, k1 : u64) {
2929
impl siphash for SipState {
3030
fn reset(&self) {
3131
self.v0 = k0 ^ 0x736f6d6570736575; //~ ERROR can't capture dynamic environment
32-
//~^ ERROR unresolved name `k0`
3332
self.v1 = k1 ^ 0x646f72616e646f6d; //~ ERROR can't capture dynamic environment
34-
//~^ ERROR unresolved name `k1`
3533
}
3634
fn result(&self) -> u64 { return mk_result(self); }
3735
}

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

-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ fn siphash(k0 : u64) {
2020
impl SipHash for SipState {
2121
fn reset(&self) {
2222
self.v0 = k0 ^ 0x736f6d6570736575; //~ ERROR can't capture dynamic environment
23-
//~^ ERROR unresolved name `k0`
2423
}
2524
}
2625
panic!();

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

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
fn foo<T>() {
1212
struct foo {
1313
x: T, //~ ERROR can't use type parameters from outer function;
14-
//~^ ERROR type name `T` is undefined or not in scope
1514
}
1615

1716
impl<T> Drop for foo<T> {

src/test/compile-fail/issue-3521-2.rs

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ fn main() {
1313

1414
static y: isize = foo + 1;
1515
//~^ ERROR attempt to use a non-constant value in a constant
16-
//~| ERROR unresolved name `foo`
1716

1817
println!("{}", y);
1918
}

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

+1-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ fn main() {
1515
enum Stuff {
1616
Bar = foo
1717
//~^ ERROR attempt to use a non-constant value in a constant
18-
//~| ERROR unresolved name `foo`
19-
//~^^^ ERROR constant evaluation error: non-constant path in constant expression
18+
//~^^ ERROR constant evaluation error: non-constant path in constant expression
2019
}
2120

2221
println!("{}", Stuff::Bar);

src/test/compile-fail/issue-3668-2.rs

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
fn f(x:isize) {
1212
static child: isize = x + 1;
1313
//~^ ERROR attempt to use a non-constant value in a constant
14-
//~| ERROR unresolved name `x`
1514
}
1615

1716
fn main() {}

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

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ impl PTrait for P {
1717
fn getChildOption(&self) -> Option<Box<P>> {
1818
static childVal: Box<P> = self.child.get();
1919
//~^ ERROR attempt to use a non-constant value in a constant
20-
//~| ERROR unresolved name `self`
2120
panic!();
2221
}
2322
}

src/test/compile-fail/issue-5997-enum.rs

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
fn f<Z>() -> bool {
1212
enum E { V(Z) }
1313
//~^ ERROR can't use type parameters from outer function
14-
//~^^ ERROR type name `Z` is undefined or not in scope
1514
true
1615
}
1716

src/test/compile-fail/issue-5997-struct.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
// except according to those terms.
1010

1111
fn f<T>() -> bool {
12-
struct S(T); //~ ERROR type name `T` is undefined or not in scope
13-
//~^ ERROR can't use type parameters from outer function; try using
12+
struct S(T); //~ ERROR can't use type parameters from outer function; try using
1413

1514
true
1615
}

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

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ impl A {
1313
fn m(&self) {
1414
fn x() {
1515
self.m() //~ ERROR can't capture dynamic environment in a fn item
16-
//~^ ERROR unresolved name `self`
1716
}
1817
}
1918
}

src/test/compile-fail/macro-inner-attributes.rs

-1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,5 @@ test!(b,
2626
fn main() {
2727
a::bar();
2828
//~^ ERROR failed to resolve. Use of undeclared type or module `a`
29-
//~^^ ERROR unresolved name `a::bar`
3029
b::bar();
3130
}

src/test/compile-fail/no-link.rs

-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,5 @@ extern crate libc;
1414
fn main() {
1515
unsafe {
1616
libc::abs(0); //~ ERROR Use of undeclared type or module `libc`
17-
//~^ ERROR unresolved name `libc::abs`
1817
}
1918
}

src/test/compile-fail/resolve-type-param-in-item-in-trait.rs

+2-6
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ trait TraitA<A> {
1818
//~^ ERROR parameter `B` is never used
1919
Variance(A)
2020
//~^ ERROR can't use type parameters from outer function
21-
//~^^ ERROR type name `A` is undefined or not in scope
2221
}
2322
}
2423
}
@@ -27,25 +26,22 @@ trait TraitB<A> {
2726
fn outer(self) {
2827
struct Foo<B>(A);
2928
//~^ ERROR can't use type parameters from outer function
30-
//~^^ ERROR type name `A` is undefined or not in scope
31-
//~^^^ ERROR parameter `B` is never used
29+
//~^^ ERROR parameter `B` is never used
3230
}
3331
}
3432

3533
trait TraitC<A> {
3634
fn outer(self) {
3735
struct Foo<B> { a: A }
3836
//~^ ERROR can't use type parameters from outer function
39-
//~^^ ERROR type name `A` is undefined or not in scope
40-
//~^^^ ERROR parameter `B` is never used
37+
//~^^ ERROR parameter `B` is never used
4138
}
4239
}
4340

4441
trait TraitD<A> {
4542
fn outer(self) {
4643
fn foo<B>(a: A) { }
4744
//~^ ERROR can't use type parameters from outer function
48-
//~^^ ERROR type name `A` is undefined or not in scope
4945
}
5046
}
5147

0 commit comments

Comments
 (0)