rustc: reduce redundant resolve errors.
This commit is contained in:
parent
207bfee214
commit
3791a85087
18 changed files with 181 additions and 188 deletions
|
|
@ -19,7 +19,6 @@ extern crate macro_crate_test;
|
|||
|
||||
fn main() {
|
||||
macro_crate_test::foo();
|
||||
//~^ ERROR unresolved name
|
||||
//~^^ ERROR use of undeclared module `macro_crate_test`
|
||||
//~^^^ ERROR unresolved name `macro_crate_test::foo`.
|
||||
//~^ ERROR failed to resolve. Use of undeclared module `macro_crate_test`
|
||||
//~^^ ERROR unresolved name `macro_crate_test::foo`.
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
|
||||
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
|
|
@ -8,8 +8,8 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// error-pattern:failed to resolve import
|
||||
use spam::{ham, eggs};
|
||||
//~^ ERROR unresolved import `spam::eggs`. There is no `eggs` in `spam`
|
||||
|
||||
mod spam {
|
||||
pub fn ham() { }
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
|
||||
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
|
|
@ -8,9 +8,9 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// error-pattern:failed to resolve import
|
||||
use zed::bar;
|
||||
use zed::baz;
|
||||
//~^ ERROR unresolved import `zed::baz`. There is no `baz` in `zed`
|
||||
|
||||
|
||||
mod zed {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
|
||||
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
|
|
@ -8,8 +8,8 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
use baz::zed::bar; //~ ERROR unresolved import
|
||||
//~^ ERROR failed to resolve import
|
||||
use baz::zed::bar;
|
||||
//~^ ERROR unresolved import `baz::zed::bar`. Could not find `zed` in `baz`.
|
||||
|
||||
|
||||
mod baz {}
|
||||
|
|
|
|||
|
|
@ -16,8 +16,7 @@ use foo::bar;
|
|||
|
||||
mod test {
|
||||
use bar::foo;
|
||||
//~^ ERROR: unresolved import
|
||||
//~^^ ERROR: failed to resolve import
|
||||
//~^ ERROR unresolved import `bar::foo`. Maybe a missing `extern crate bar`?
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
|
|
|||
|
|
@ -10,8 +10,7 @@
|
|||
|
||||
use a::f;
|
||||
use b::f;
|
||||
//~^ ERROR: unresolved import
|
||||
//~^^ ERROR: failed to resolve import
|
||||
//~^ ERROR: unresolved import `b::f`. There is no `f` in `b`
|
||||
|
||||
mod a { pub fn f() {} }
|
||||
mod b { }
|
||||
|
|
|
|||
|
|
@ -12,8 +12,6 @@
|
|||
|
||||
#![feature(globs)]
|
||||
|
||||
use unresolved::*; //~ ERROR unresolved import. Maybe a missing
|
||||
//~^ ERROR failed to resolve import
|
||||
use unresolved::*; //~ ERROR unresolved import `unresolved::*`. Maybe a missing `extern crate unres
|
||||
|
||||
fn main() {
|
||||
}
|
||||
fn main() {}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
|
||||
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
|
|
@ -8,11 +8,8 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
use x = m::f; //~ ERROR failed to resolve import
|
||||
//~^ unresolved import: there is no `f` in `m`
|
||||
use x = m::f; //~ ERROR unresolved import `m::f`. There is no `f` in `m`
|
||||
|
||||
mod m {
|
||||
}
|
||||
mod m {}
|
||||
|
||||
fn main() {
|
||||
}
|
||||
fn main() {}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
|
||||
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
|
|
@ -8,11 +8,8 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
use x = m::f; //~ ERROR failed to resolve import
|
||||
//~^ ERROR unresolved import: there is no `f` in `m`
|
||||
use x = m::f; //~ ERROR unresolved import `m::f`. There is no `f` in `m`
|
||||
|
||||
mod m {
|
||||
}
|
||||
mod m {}
|
||||
|
||||
fn main() {
|
||||
}
|
||||
fn main() {}
|
||||
|
|
|
|||
|
|
@ -25,9 +25,8 @@ test!(b,
|
|||
#[qux]
|
||||
fn main() {
|
||||
a::bar();
|
||||
//~^ ERROR use of undeclared module `a`
|
||||
//~^^ ERROR unresolved name
|
||||
//~^^^ ERROR unresolved name `a::bar`
|
||||
//~^ ERROR failed to resolve. Use of undeclared module `a`
|
||||
//~^^ ERROR unresolved name `a::bar`
|
||||
b::bar();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
|
||||
// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
|
|
@ -24,14 +24,13 @@ mod bar {
|
|||
pub fn foo() {}
|
||||
|
||||
fn test1() {
|
||||
use bar::foo; //~ ERROR: unresolved import
|
||||
//~^ ERROR: failed to resolve
|
||||
use bar::foo;
|
||||
//~^ ERROR unresolved import `bar::foo`. There is no `foo` in `bar`
|
||||
}
|
||||
|
||||
fn test2() {
|
||||
use bar::glob::foo;
|
||||
//~^ ERROR: there is no
|
||||
//~^^ ERROR: failed to resolve
|
||||
//~^ ERROR unresolved import `bar::glob::foo`. There is no `foo` in `bar::glob`
|
||||
}
|
||||
|
||||
#[start] fn main(_: int, _: **u8) -> int { 3 }
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
|
||||
// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
|
|
@ -25,8 +25,8 @@ mod bar {
|
|||
pub fn foo() {}
|
||||
|
||||
fn test1() {
|
||||
use bar::gpriv; //~ ERROR: unresolved import
|
||||
//~^ ERROR: failed to resolve
|
||||
use bar::gpriv;
|
||||
//~^ ERROR unresolved import `bar::gpriv`. There is no `gpriv` in `bar`
|
||||
gpriv();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,21 +11,16 @@
|
|||
mod a {
|
||||
extern crate collections;
|
||||
use collections::HashMap;
|
||||
//~^ ERROR unresolved import. Did you mean `self::collections`?
|
||||
//~^^ ERROR failed to resolve import `collections::HashMap`
|
||||
|
||||
//~^ ERROR unresolved import `collections::HashMap`. Did you mean `self::collections`?
|
||||
mod b {
|
||||
use collections::HashMap;
|
||||
//~^ ERROR unresolved import. Did you mean `a::collections`?
|
||||
//~^^ ERROR failed to resolve import `collections::HashMap`
|
||||
//~^ ERROR unresolved import `collections::HashMap`. Did you mean `a::collections`?
|
||||
mod c {
|
||||
use collections::HashMap;
|
||||
//~^ ERROR unresolved import. Did you mean `a::collections`?
|
||||
//~^^ ERROR failed to resolve import `collections::HashMap`
|
||||
//~^ ERROR unresolved import `collections::HashMap`. Did you mean `a::collections`?
|
||||
mod d {
|
||||
use collections::HashMap;
|
||||
//~^ ERROR unresolved import. Did you mean `a::collections`
|
||||
//~^^ ERROR failed to resolve import `collections::HashMap`
|
||||
//~^ ERROR unresolved import `collections::HashMap`. Did you mean `a::collections`?
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
use super::f; //~ ERROR failed to resolve import
|
||||
use super::f; //~ ERROR unresolved import `super::f`
|
||||
|
||||
fn main() {
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,10 +8,9 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
use foo::bar; //~ ERROR unresolved import. Maybe a missing `extern crate foo`?
|
||||
//~^ ERROR failed to resolve import `foo::bar`
|
||||
use x = bar::baz; //~ ERROR unresolved import: there is no `baz` in `bar`
|
||||
//~^ ERROR failed to resolve import `bar::baz`
|
||||
use foo::bar; //~ ERROR unresolved import `foo::bar`. Maybe a missing `extern crate foo`?
|
||||
|
||||
use x = bar::baz; //~ ERROR unresolved import `bar::baz`. There is no `baz` in `bar`
|
||||
|
||||
mod bar {
|
||||
struct bar;
|
||||
|
|
|
|||
|
|
@ -12,10 +12,10 @@
|
|||
|
||||
extern crate use_from_trait_xc;
|
||||
|
||||
use use_from_trait_xc::Trait::foo; //~ ERROR cannot import from a trait or type implementation
|
||||
//~^ ERROR failed to resolve import
|
||||
use use_from_trait_xc::Foo::new; //~ ERROR cannot import from a trait or type implementation
|
||||
//~^ ERROR failed to resolve import
|
||||
use use_from_trait_xc::Trait::foo;
|
||||
//~^ ERROR unresolved import `use_from_trait_xc::Trait::foo`. Cannot import from a trait or type imp
|
||||
|
||||
fn main() {
|
||||
}
|
||||
use use_from_trait_xc::Foo::new;
|
||||
//~^ ERROR unresolved import `use_from_trait_xc::Foo::new`. Cannot import from a trait or type imple
|
||||
|
||||
fn main() {}
|
||||
|
|
|
|||
|
|
@ -8,10 +8,10 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
use Trait::foo; //~ ERROR cannot import from a trait or type implementation
|
||||
//~^ ERROR failed to resolve import
|
||||
use Foo::new; //~ ERROR cannot import from a trait or type implementation
|
||||
//~^ ERROR failed to resolve import
|
||||
use Trait::foo;
|
||||
//~^ ERROR unresolved import `Trait::foo`. Cannot import from a trait or type implementation
|
||||
use Foo::new;
|
||||
//~^ ERROR unresolved import `Foo::new`. Cannot import from a trait or type implementation
|
||||
|
||||
pub trait Trait {
|
||||
fn foo();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue