Fix fallout in tests

This commit is contained in:
Jeffrey Seyfried 2016-04-07 03:48:52 +00:00
parent 20ee53c2f1
commit 35f5e18f75
22 changed files with 7 additions and 31 deletions

View File

@ -16,5 +16,4 @@ extern crate macro_crate_test;
fn main() {
macro_crate_test::foo();
//~^ ERROR failed to resolve. Use of undeclared type or module `macro_crate_test`
//~^^ ERROR unresolved name `macro_crate_test::foo`
}

View File

@ -8,6 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// error-pattern: unresolved name
// error-pattern: failed to resolve. Use of undeclared type or module `thing`
fn main() { let foo = thing::len(Vec::new()); }

View File

@ -10,6 +10,5 @@
fn foo<T>() {
fn bar(b: T) { } //~ ERROR can't use type parameters from outer
//~^ ERROR type name `T` is undefined or not in scope
}
fn main() { }

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// error-pattern: unresolved name
// error-pattern: failed to resolve. Use of undeclared type or module `foo`
// In this test baz isn't resolved when called as foo.baz even though
// it's called from inside foo. This is somewhat surprising and may

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// error-pattern: unresolved name
// error-pattern: failed to resolve. Use of undeclared type or module `bar`
mod foo {
pub fn x() { bar::x(); }

View File

@ -15,7 +15,6 @@ enum Bar<T> { What } //~ ERROR parameter `T` is never used
fn foo<T>() {
static a: Bar<T> = Bar::What;
//~^ ERROR cannot use an outer type parameter in this context
//~| ERROR type name `T` is undefined or not in scope
}
fn main() {

View File

@ -12,7 +12,6 @@ trait Trait {
fn outer(&self) {
fn inner(_: &Self) {
//~^ ERROR can't use type parameters from outer function
//~^^ ERROR use of `Self` outside of an impl or trait
}
}
}

View File

@ -17,7 +17,6 @@ fn siphash(k0 : u64) {
impl siphash {
pub fn reset(&mut self) {
self.v0 = k0 ^ 0x736f6d6570736575; //~ ERROR can't capture dynamic environment
//~^ ERROR unresolved name `k0`
}
}
}

View File

@ -13,8 +13,6 @@ fn siphash<T>() {
trait t {
fn g(&self, x: T) -> T; //~ ERROR can't use type parameters from outer function; try using
//~^ ERROR can't use type parameters from outer function; try using
//~^^ ERROR type name `T` is undefined or not in scope
//~^^^ ERROR type name `T` is undefined or not in scope
}
}

View File

@ -29,9 +29,7 @@ fn siphash(k0 : u64, k1 : u64) {
impl siphash for SipState {
fn reset(&self) {
self.v0 = k0 ^ 0x736f6d6570736575; //~ ERROR can't capture dynamic environment
//~^ ERROR unresolved name `k0`
self.v1 = k1 ^ 0x646f72616e646f6d; //~ ERROR can't capture dynamic environment
//~^ ERROR unresolved name `k1`
}
fn result(&self) -> u64 { return mk_result(self); }
}

View File

@ -20,7 +20,6 @@ fn siphash(k0 : u64) {
impl SipHash for SipState {
fn reset(&self) {
self.v0 = k0 ^ 0x736f6d6570736575; //~ ERROR can't capture dynamic environment
//~^ ERROR unresolved name `k0`
}
}
panic!();

View File

@ -11,7 +11,6 @@
fn foo<T>() {
struct foo {
x: T, //~ ERROR can't use type parameters from outer function;
//~^ ERROR type name `T` is undefined or not in scope
}
impl<T> Drop for foo<T> {

View File

@ -13,7 +13,6 @@ fn main() {
static y: isize = foo + 1;
//~^ ERROR attempt to use a non-constant value in a constant
//~| ERROR unresolved name `foo`
println!("{}", y);
}

View File

@ -15,8 +15,7 @@ fn main() {
enum Stuff {
Bar = foo
//~^ ERROR attempt to use a non-constant value in a constant
//~| ERROR unresolved name `foo`
//~^^^ ERROR constant evaluation error: non-constant path in constant expression
//~^^ ERROR constant evaluation error: non-constant path in constant expression
}
println!("{}", Stuff::Bar);

View File

@ -11,7 +11,6 @@
fn f(x:isize) {
static child: isize = x + 1;
//~^ ERROR attempt to use a non-constant value in a constant
//~| ERROR unresolved name `x`
}
fn main() {}

View File

@ -17,7 +17,6 @@ impl PTrait for P {
fn getChildOption(&self) -> Option<Box<P>> {
static childVal: Box<P> = self.child.get();
//~^ ERROR attempt to use a non-constant value in a constant
//~| ERROR unresolved name `self`
panic!();
}
}

View File

@ -11,7 +11,6 @@
fn f<Z>() -> bool {
enum E { V(Z) }
//~^ ERROR can't use type parameters from outer function
//~^^ ERROR type name `Z` is undefined or not in scope
true
}

View File

@ -9,8 +9,7 @@
// except according to those terms.
fn f<T>() -> bool {
struct S(T); //~ ERROR type name `T` is undefined or not in scope
//~^ ERROR can't use type parameters from outer function; try using
struct S(T); //~ ERROR can't use type parameters from outer function; try using
true
}

View File

@ -13,7 +13,6 @@ impl A {
fn m(&self) {
fn x() {
self.m() //~ ERROR can't capture dynamic environment in a fn item
//~^ ERROR unresolved name `self`
}
}
}

View File

@ -26,6 +26,5 @@ test!(b,
fn main() {
a::bar();
//~^ ERROR failed to resolve. Use of undeclared type or module `a`
//~^^ ERROR unresolved name `a::bar`
b::bar();
}

View File

@ -14,6 +14,5 @@ extern crate libc;
fn main() {
unsafe {
libc::abs(0); //~ ERROR Use of undeclared type or module `libc`
//~^ ERROR unresolved name `libc::abs`
}
}

View File

@ -18,7 +18,6 @@ trait TraitA<A> {
//~^ ERROR parameter `B` is never used
Variance(A)
//~^ ERROR can't use type parameters from outer function
//~^^ ERROR type name `A` is undefined or not in scope
}
}
}
@ -27,8 +26,7 @@ trait TraitB<A> {
fn outer(self) {
struct Foo<B>(A);
//~^ ERROR can't use type parameters from outer function
//~^^ ERROR type name `A` is undefined or not in scope
//~^^^ ERROR parameter `B` is never used
//~^^ ERROR parameter `B` is never used
}
}
@ -36,8 +34,7 @@ trait TraitC<A> {
fn outer(self) {
struct Foo<B> { a: A }
//~^ ERROR can't use type parameters from outer function
//~^^ ERROR type name `A` is undefined or not in scope
//~^^^ ERROR parameter `B` is never used
//~^^ ERROR parameter `B` is never used
}
}
@ -45,7 +42,6 @@ trait TraitD<A> {
fn outer(self) {
fn foo<B>(a: A) { }
//~^ ERROR can't use type parameters from outer function
//~^^ ERROR type name `A` is undefined or not in scope
}
}