Ignore platforms that can't point to std

This commit is contained in:
Esteban Küber 2020-01-07 12:59:24 -08:00
parent 6d97718886
commit 38a3506c45
18 changed files with 125 additions and 69 deletions

View File

@ -1,3 +1,7 @@
// FIXME: missing sysroot spans (#53081)
// ignore-i586-unknown-linux-gnu
// ignore-i586-unknown-linux-musl
// ignore-i686-unknown-linux-musl
#[derive(Eqr)]
//~^ ERROR cannot find derive macro `Eqr` in this scope
//~| ERROR cannot find derive macro `Eqr` in this scope

View File

@ -1,19 +1,24 @@
error: cannot find derive macro `Eqr` in this scope
--> $DIR/deriving-meta-unknown-trait.rs:1:10
--> $DIR/deriving-meta-unknown-trait.rs:5:10
|
LL | #[derive(Eqr)]
| ^^^ help: a derive macro with a similar name exists: `Eq`
|
::: $SRC_DIR/libcore/cmp.rs:LL:COL
|
LL | pub macro Eq($item:item) { /* compiler built-in */ }
LL | pub macro Eq($item:item) {
| ------------------------ similarly named derive macro `Eq` defined here
error: cannot find derive macro `Eqr` in this scope
--> $DIR/deriving-meta-unknown-trait.rs:1:10
--> $DIR/deriving-meta-unknown-trait.rs:5:10
|
LL | #[derive(Eqr)]
| ^^^ help: a derive macro with a similar name exists: `Eq`
|
::: $SRC_DIR/libcore/cmp.rs:LL:COL
|
LL | pub macro Eq($item:item) {
| ------------------------ similarly named derive macro `Eq` defined here
error: aborting due to 2 previous errors

View File

@ -1,3 +1,7 @@
// FIXME: missing sysroot spans (#53081)
// ignore-i586-unknown-linux-gnu
// ignore-i586-unknown-linux-musl
// ignore-i686-unknown-linux-musl
use foo::MyEnum::Result;
use foo::NoResult; // Through a re-export

View File

@ -1,5 +1,5 @@
error[E0573]: expected type, found variant `NoResult`
--> $DIR/issue-17546.rs:12:17
--> $DIR/issue-17546.rs:16:17
|
LL | fn new() -> NoResult<MyEnum, String> {
| ^^^^^^^^^^^^^^^^^^^^^^^^
@ -19,7 +19,7 @@ LL | fn new() -> Result<MyEnum, String> {
| ^^^^^^
error[E0573]: expected type, found variant `Result`
--> $DIR/issue-17546.rs:22:17
--> $DIR/issue-17546.rs:26:17
|
LL | fn new() -> Result<foo::MyEnum, String> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not a type
@ -37,7 +37,7 @@ LL | use std::result::Result;
and 1 other candidate
error[E0573]: expected type, found variant `Result`
--> $DIR/issue-17546.rs:28:13
--> $DIR/issue-17546.rs:32:13
|
LL | fn new() -> Result<foo::MyEnum, String> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not a type
@ -55,7 +55,7 @@ LL | use std::result::Result;
and 1 other candidate
error[E0573]: expected type, found variant `NoResult`
--> $DIR/issue-17546.rs:33:15
--> $DIR/issue-17546.rs:37:15
|
LL | fn newer() -> NoResult<foo::MyEnum, String> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View File

@ -1,3 +1,7 @@
// FIXME: missing sysroot spans (#53081)
// ignore-i586-unknown-linux-gnu
// ignore-i586-unknown-linux-musl
// ignore-i686-unknown-linux-musl
struct Foo {
x: isize
}

View File

@ -1,13 +1,13 @@
error[E0412]: cannot find type `Fo` in this scope
--> $DIR/issue-7607-1.rs:5:6
--> $DIR/issue-7607-1.rs:9:6
|
LL | impl Fo {
| ^^ help: a trait with a similar name exists: `Fn`
|
::: $SRC_DIR/libcore/ops/function.rs:LL:COL
|
LL | pub trait Fn<Args> : FnMut<Args> {
| -------------------------------- similarly named trait `Fn` defined here
LL | pub trait Fn<Args>: FnMut<Args> {
| ------------------------------- similarly named trait `Fn` defined here
error: aborting due to previous error

View File

@ -1,3 +1,7 @@
// FIXME: missing sysroot spans (#53081)
// ignore-i586-unknown-linux-gnu
// ignore-i586-unknown-linux-musl
// ignore-i686-unknown-linux-musl
fn main() {
printlx!("oh noes!"); //~ ERROR cannot find
}

View File

@ -1,5 +1,5 @@
error: cannot find macro `printlx` in this scope
--> $DIR/macro-name-typo.rs:2:5
--> $DIR/macro-name-typo.rs:6:5
|
LL | printlx!("oh noes!");
| ^^^^^^^ help: a macro with a similar name exists: `println`

View File

@ -1,3 +1,7 @@
// FIXME: missing sysroot spans (#53081)
// ignore-i586-unknown-linux-gnu
// ignore-i586-unknown-linux-musl
// ignore-i686-unknown-linux-musl
fn main() {
inline!(); //~ ERROR cannot find macro `inline` in this scope
}

View File

@ -1,12 +1,12 @@
error: cannot find macro `inline` in this scope
--> $DIR/macro-path-prelude-fail-3.rs:2:5
--> $DIR/macro-path-prelude-fail-3.rs:6:5
|
LL | inline!();
| ^^^^^^ help: a macro with a similar name exists: `line`
|
::: $SRC_DIR/libcore/macros.rs:LL:COL
::: $SRC_DIR/libcore/macros/mod.rs:LL:COL
|
LL | macro_rules! line { () => { /* compiler built-in */ } }
LL | macro_rules! line {
| ----------------- similarly named macro `line` defined here
error: aborting due to previous error

View File

@ -1,3 +1,7 @@
// FIXME: missing sysroot spans (#53081)
// ignore-i586-unknown-linux-gnu
// ignore-i586-unknown-linux-musl
// ignore-i686-unknown-linux-musl
// aux-build:parent-source-spans.rs
#![feature(decl_macro, proc_macro_hygiene)]

View File

@ -1,5 +1,5 @@
error: first final: "hello"
--> $DIR/parent-source-spans.rs:15:12
--> $DIR/parent-source-spans.rs:19:12
|
LL | three!($a, $b);
| ^^
@ -8,7 +8,7 @@ LL | one!("hello", "world");
| ----------------------- in this macro invocation
error: second final: "world"
--> $DIR/parent-source-spans.rs:15:16
--> $DIR/parent-source-spans.rs:19:16
|
LL | three!($a, $b);
| ^^
@ -17,7 +17,7 @@ LL | one!("hello", "world");
| ----------------------- in this macro invocation
error: first parent: "hello"
--> $DIR/parent-source-spans.rs:9:5
--> $DIR/parent-source-spans.rs:13:5
|
LL | two!($a, $b);
| ^^^^^^^^^^^^^
@ -26,7 +26,7 @@ LL | one!("hello", "world");
| ----------------------- in this macro invocation
error: second parent: "world"
--> $DIR/parent-source-spans.rs:9:5
--> $DIR/parent-source-spans.rs:13:5
|
LL | two!($a, $b);
| ^^^^^^^^^^^^^
@ -35,31 +35,31 @@ LL | one!("hello", "world");
| ----------------------- in this macro invocation
error: first grandparent: "hello"
--> $DIR/parent-source-spans.rs:35:5
--> $DIR/parent-source-spans.rs:39:5
|
LL | one!("hello", "world");
| ^^^^^^^^^^^^^^^^^^^^^^^
error: second grandparent: "world"
--> $DIR/parent-source-spans.rs:35:5
--> $DIR/parent-source-spans.rs:39:5
|
LL | one!("hello", "world");
| ^^^^^^^^^^^^^^^^^^^^^^^
error: first source: "hello"
--> $DIR/parent-source-spans.rs:35:5
--> $DIR/parent-source-spans.rs:39:5
|
LL | one!("hello", "world");
| ^^^^^^^^^^^^^^^^^^^^^^^
error: second source: "world"
--> $DIR/parent-source-spans.rs:35:5
--> $DIR/parent-source-spans.rs:39:5
|
LL | one!("hello", "world");
| ^^^^^^^^^^^^^^^^^^^^^^^
error: first final: "yay"
--> $DIR/parent-source-spans.rs:15:12
--> $DIR/parent-source-spans.rs:19:12
|
LL | three!($a, $b);
| ^^
@ -68,7 +68,7 @@ LL | two!("yay", "rust");
| -------------------- in this macro invocation
error: second final: "rust"
--> $DIR/parent-source-spans.rs:15:16
--> $DIR/parent-source-spans.rs:19:16
|
LL | three!($a, $b);
| ^^
@ -77,55 +77,55 @@ LL | two!("yay", "rust");
| -------------------- in this macro invocation
error: first parent: "yay"
--> $DIR/parent-source-spans.rs:41:5
--> $DIR/parent-source-spans.rs:45:5
|
LL | two!("yay", "rust");
| ^^^^^^^^^^^^^^^^^^^^
error: second parent: "rust"
--> $DIR/parent-source-spans.rs:41:5
--> $DIR/parent-source-spans.rs:45:5
|
LL | two!("yay", "rust");
| ^^^^^^^^^^^^^^^^^^^^
error: first source: "yay"
--> $DIR/parent-source-spans.rs:41:5
--> $DIR/parent-source-spans.rs:45:5
|
LL | two!("yay", "rust");
| ^^^^^^^^^^^^^^^^^^^^
error: second source: "rust"
--> $DIR/parent-source-spans.rs:41:5
--> $DIR/parent-source-spans.rs:45:5
|
LL | two!("yay", "rust");
| ^^^^^^^^^^^^^^^^^^^^
error: first final: "hip"
--> $DIR/parent-source-spans.rs:47:12
--> $DIR/parent-source-spans.rs:51:12
|
LL | three!("hip", "hop");
| ^^^^^
error: second final: "hop"
--> $DIR/parent-source-spans.rs:47:19
--> $DIR/parent-source-spans.rs:51:19
|
LL | three!("hip", "hop");
| ^^^^^
error: first source: "hip"
--> $DIR/parent-source-spans.rs:47:12
--> $DIR/parent-source-spans.rs:51:12
|
LL | three!("hip", "hop");
| ^^^^^
error: second source: "hop"
--> $DIR/parent-source-spans.rs:47:19
--> $DIR/parent-source-spans.rs:51:19
|
LL | three!("hip", "hop");
| ^^^^^
error[E0425]: cannot find value `ok` in this scope
--> $DIR/parent-source-spans.rs:28:5
--> $DIR/parent-source-spans.rs:32:5
|
LL | parent_source_spans!($($tokens)*);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a tuple variant with a similar name exists: `Ok`
@ -139,7 +139,7 @@ LL | Ok(#[stable(feature = "rust1", since = "1.0.0")] T),
| --------------------------------------------------- similarly named tuple variant `Ok` defined here
error[E0425]: cannot find value `ok` in this scope
--> $DIR/parent-source-spans.rs:28:5
--> $DIR/parent-source-spans.rs:32:5
|
LL | parent_source_spans!($($tokens)*);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a tuple variant with a similar name exists: `Ok`
@ -153,7 +153,7 @@ LL | Ok(#[stable(feature = "rust1", since = "1.0.0")] T),
| --------------------------------------------------- similarly named tuple variant `Ok` defined here
error[E0425]: cannot find value `ok` in this scope
--> $DIR/parent-source-spans.rs:28:5
--> $DIR/parent-source-spans.rs:32:5
|
LL | parent_source_spans!($($tokens)*);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a tuple variant with a similar name exists: `Ok`

View File

@ -1,3 +1,7 @@
// FIXME: missing sysroot spans (#53081)
// ignore-i586-unknown-linux-gnu
// ignore-i586-unknown-linux-musl
// ignore-i686-unknown-linux-musl
// aux-build:derive-foo.rs
// aux-build:derive-clona.rs
// aux-build:test-macros.rs

View File

@ -1,5 +1,5 @@
error: cannot find macro `bang_proc_macrp` in this scope
--> $DIR/resolve-error.rs:60:5
--> $DIR/resolve-error.rs:64:5
|
LL | bang_proc_macrp!();
| ^^^^^^^^^^^^^^^ help: a macro with a similar name exists: `bang_proc_macro`
@ -10,13 +10,13 @@ LL | pub fn empty(_: TokenStream) -> TokenStream {
| ------------------------------------------- similarly named macro `bang_proc_macro` defined here
error: cannot find macro `Dlona` in this scope
--> $DIR/resolve-error.rs:57:5
--> $DIR/resolve-error.rs:61:5
|
LL | Dlona!();
| ^^^^^
error: cannot find macro `attr_proc_macra` in this scope
--> $DIR/resolve-error.rs:54:5
--> $DIR/resolve-error.rs:58:5
|
LL | / macro_rules! attr_proc_mac {
LL | | () => {}
@ -27,7 +27,7 @@ LL | attr_proc_macra!();
| ^^^^^^^^^^^^^^^ help: a macro with a similar name exists: `attr_proc_mac`
error: cannot find macro `FooWithLongNama` in this scope
--> $DIR/resolve-error.rs:51:5
--> $DIR/resolve-error.rs:55:5
|
LL | / macro_rules! FooWithLongNam {
LL | | () => {}
@ -38,25 +38,30 @@ LL | FooWithLongNama!();
| ^^^^^^^^^^^^^^^ help: a macro with a similar name exists: `FooWithLongNam`
error: cannot find derive macro `attr_proc_macra` in this scope
--> $DIR/resolve-error.rs:45:10
--> $DIR/resolve-error.rs:49:10
|
LL | #[derive(attr_proc_macra)]
| ^^^^^^^^^^^^^^^
error: cannot find derive macro `attr_proc_macra` in this scope
--> $DIR/resolve-error.rs:45:10
--> $DIR/resolve-error.rs:49:10
|
LL | #[derive(attr_proc_macra)]
| ^^^^^^^^^^^^^^^
error: cannot find derive macro `Dlona` in this scope
--> $DIR/resolve-error.rs:40:10
--> $DIR/resolve-error.rs:44:10
|
LL | #[derive(Dlona)]
| ^^^^^ help: a derive macro with a similar name exists: `Clona`
|
::: $DIR/auxiliary/derive-clona.rs:11:1
|
LL | pub fn derive_clonea(input: TokenStream) -> TokenStream {
| ------------------------------------------------------- similarly named derive macro `Clona` defined here
error: cannot find derive macro `Dlona` in this scope
--> $DIR/resolve-error.rs:40:10
--> $DIR/resolve-error.rs:44:10
|
LL | #[derive(Dlona)]
| ^^^^^ help: a derive macro with a similar name exists: `Clona`
@ -67,30 +72,35 @@ LL | pub fn derive_clonea(input: TokenStream) -> TokenStream {
| ------------------------------------------------------- similarly named derive macro `Clona` defined here
error: cannot find derive macro `Dlone` in this scope
--> $DIR/resolve-error.rs:35:10
|
LL | #[derive(Dlone)]
| ^^^^^ help: a derive macro with a similar name exists: `Clone`
error: cannot find derive macro `Dlone` in this scope
--> $DIR/resolve-error.rs:35:10
--> $DIR/resolve-error.rs:39:10
|
LL | #[derive(Dlone)]
| ^^^^^ help: a derive macro with a similar name exists: `Clone`
|
::: $SRC_DIR/libcore/clone.rs:LL:COL
|
LL | pub macro Clone($item:item) { /* compiler built-in */ }
LL | pub macro Clone($item:item) {
| --------------------------- similarly named derive macro `Clone` defined here
error: cannot find derive macro `Dlone` in this scope
--> $DIR/resolve-error.rs:39:10
|
LL | #[derive(Dlone)]
| ^^^^^ help: a derive macro with a similar name exists: `Clone`
|
::: $SRC_DIR/libcore/clone.rs:LL:COL
|
LL | pub macro Clone($item:item) {
| --------------------------- similarly named derive macro `Clone` defined here
error: cannot find attribute `FooWithLongNan` in this scope
--> $DIR/resolve-error.rs:32:3
--> $DIR/resolve-error.rs:36:3
|
LL | #[FooWithLongNan]
| ^^^^^^^^^^^^^^
error: cannot find attribute `attr_proc_macra` in this scope
--> $DIR/resolve-error.rs:28:3
--> $DIR/resolve-error.rs:32:3
|
LL | #[attr_proc_macra]
| ^^^^^^^^^^^^^^^ help: an attribute macro with a similar name exists: `attr_proc_macro`
@ -101,7 +111,7 @@ LL | pub fn empty_attr(_: TokenStream, _: TokenStream) -> TokenStream {
| ---------------------------------------------------------------- similarly named attribute macro `attr_proc_macro` defined here
error: cannot find derive macro `FooWithLongNan` in this scope
--> $DIR/resolve-error.rs:22:10
--> $DIR/resolve-error.rs:26:10
|
LL | #[derive(FooWithLongNan)]
| ^^^^^^^^^^^^^^ help: a derive macro with a similar name exists: `FooWithLongName`
@ -112,10 +122,15 @@ LL | pub fn derive_foo(input: TokenStream) -> TokenStream {
| ---------------------------------------------------- similarly named derive macro `FooWithLongName` defined here
error: cannot find derive macro `FooWithLongNan` in this scope
--> $DIR/resolve-error.rs:22:10
--> $DIR/resolve-error.rs:26:10
|
LL | #[derive(FooWithLongNan)]
| ^^^^^^^^^^^^^^ help: a derive macro with a similar name exists: `FooWithLongName`
|
::: $DIR/auxiliary/derive-foo.rs:11:1
|
LL | pub fn derive_foo(input: TokenStream) -> TokenStream {
| ---------------------------------------------------- similarly named derive macro `FooWithLongName` defined here
error: aborting due to 14 previous errors

View File

@ -1,3 +1,7 @@
// FIXME: missing sysroot spans (#53081)
// ignore-i586-unknown-linux-gnu
// ignore-i586-unknown-linux-musl
// ignore-i686-unknown-linux-musl
const MAX_ITEM: usize = 10;
fn foo_bar() {}

View File

@ -1,11 +1,11 @@
error[E0412]: cannot find type `esize` in this scope
--> $DIR/levenshtein.rs:5:11
--> $DIR/levenshtein.rs:9:11
|
LL | fn foo(c: esize) {} // Misspelled primitive type name.
| ^^^^^ help: a builtin type with a similar name exists: `isize`
error[E0412]: cannot find type `Baz` in this scope
--> $DIR/levenshtein.rs:10:10
--> $DIR/levenshtein.rs:14:10
|
LL | enum Bar { }
| ------------ similarly named enum `Bar` defined here
@ -14,7 +14,7 @@ LL | type A = Baz; // Misspelled type name.
| ^^^ help: an enum with a similar name exists: `Bar`
error[E0412]: cannot find type `Opiton` in this scope
--> $DIR/levenshtein.rs:12:10
--> $DIR/levenshtein.rs:16:10
|
LL | type B = Opiton<u8>; // Misspelled type name from the prelude.
| ^^^^^^ help: an enum with a similar name exists: `Option`
@ -25,13 +25,13 @@ LL | pub enum Option<T> {
| ------------------ similarly named enum `Option` defined here
error[E0412]: cannot find type `Baz` in this scope
--> $DIR/levenshtein.rs:16:14
--> $DIR/levenshtein.rs:20:14
|
LL | type A = Baz; // No suggestion here, Bar is not visible
| ^^^ not found in this scope
error[E0425]: cannot find value `MAXITEM` in this scope
--> $DIR/levenshtein.rs:24:20
--> $DIR/levenshtein.rs:28:20
|
LL | const MAX_ITEM: usize = 10;
| --------------------------- similarly named constant `MAX_ITEM` defined here
@ -40,7 +40,7 @@ LL | let v = [0u32; MAXITEM]; // Misspelled constant name.
| ^^^^^^^ help: a constant with a similar name exists: `MAX_ITEM`
error[E0425]: cannot find function `foobar` in this scope
--> $DIR/levenshtein.rs:26:5
--> $DIR/levenshtein.rs:30:5
|
LL | fn foo_bar() {}
| --------------- similarly named function `foo_bar` defined here
@ -49,7 +49,7 @@ LL | foobar(); // Misspelled function name.
| ^^^^^^ help: a function with a similar name exists: `foo_bar`
error[E0412]: cannot find type `first` in module `m`
--> $DIR/levenshtein.rs:28:15
--> $DIR/levenshtein.rs:32:15
|
LL | pub struct First;
| ----------------- similarly named struct `First` defined here
@ -58,7 +58,7 @@ LL | let b: m::first = m::second; // Misspelled item in module.
| ^^^^^ help: a struct with a similar name exists (notice the capitalization): `First`
error[E0425]: cannot find value `second` in module `m`
--> $DIR/levenshtein.rs:28:26
--> $DIR/levenshtein.rs:32:26
|
LL | pub struct Second;
| ------------------ similarly named unit struct `Second` defined here

View File

@ -1,3 +1,7 @@
// FIXME: missing sysroot spans (#53081)
// ignore-i586-unknown-linux-gnu
// ignore-i586-unknown-linux-musl
// ignore-i686-unknown-linux-musl
#[deprcated] //~ ERROR cannot find attribute `deprcated` in this scope
fn foo() {}

View File

@ -1,5 +1,5 @@
error[E0658]: attributes starting with `rustc` are reserved for use by the `rustc` compiler
--> $DIR/attribute-typos.rs:7:3
--> $DIR/attribute-typos.rs:11:3
|
LL | #[rustc_err]
| ^^^^^^^^^
@ -8,24 +8,24 @@ LL | #[rustc_err]
= help: add `#![feature(rustc_attrs)]` to the crate attributes to enable
error: cannot find attribute `rustc_err` in this scope
--> $DIR/attribute-typos.rs:7:3
--> $DIR/attribute-typos.rs:11:3
|
LL | #[rustc_err]
| ^^^^^^^^^ help: a built-in attribute with a similar name exists: `rustc_error`
error: cannot find attribute `tests` in this scope
--> $DIR/attribute-typos.rs:4:3
--> $DIR/attribute-typos.rs:8:3
|
LL | #[tests]
| ^^^^^ help: an attribute macro with a similar name exists: `test`
|
::: $SRC_DIR/libcore/macros.rs:LL:COL
::: $SRC_DIR/libcore/macros/mod.rs:LL:COL
|
LL | pub macro test($item:item) { /* compiler built-in */ }
LL | pub macro test($item:item) {
| -------------------------- similarly named attribute macro `test` defined here
error: cannot find attribute `deprcated` in this scope
--> $DIR/attribute-typos.rs:1:3
--> $DIR/attribute-typos.rs:5:3
|
LL | #[deprcated]
| ^^^^^^^^^ help: a built-in attribute with a similar name exists: `deprecated`