Skip to content

Commit

Permalink
Remove NOTE/HELP annotations from error index tests
Browse files Browse the repository at this point in the history
  • Loading branch information
petrochenkov committed Dec 14, 2017
1 parent 2974104 commit 3a2ad57
Show file tree
Hide file tree
Showing 119 changed files with 22 additions and 216 deletions.
1 change: 0 additions & 1 deletion src/test/compile-fail/E0005.rs
Expand Up @@ -11,5 +11,4 @@
fn main() {
let x = Some(1);
let Some(y) = x; //~ ERROR E0005
//~| NOTE pattern `None` not covered
}
2 changes: 0 additions & 2 deletions src/test/compile-fail/E0007.rs
Expand Up @@ -13,9 +13,7 @@ fn main() {
match x {
op_string @ Some(s) => {},
//~^ ERROR E0007
//~| NOTE binds an already bound by-move value by moving it
//~| ERROR E0303
//~| NOTE not allowed after `@`
None => {},
}
}
1 change: 0 additions & 1 deletion src/test/compile-fail/E0008.rs
Expand Up @@ -12,7 +12,6 @@ fn main() {
match Some("hi".to_string()) {
Some(s) if s.len() == 0 => {},
//~^ ERROR E0008
//~| NOTE moves value into pattern guard
_ => {},
}
}
2 changes: 0 additions & 2 deletions src/test/compile-fail/E0009.rs
Expand Up @@ -14,8 +14,6 @@ fn main() {
match x {
Some((y, ref z)) => {},
//~^ ERROR E0009
//~| NOTE by-move pattern here
//~| NOTE both by-ref and by-move used
None => panic!()
}
}
1 change: 0 additions & 1 deletion src/test/compile-fail/E0010.rs
Expand Up @@ -12,6 +12,5 @@
#![allow(warnings)]

const CON : Box<i32> = box 0; //~ ERROR E0010
//~| NOTE allocation not allowed in

fn main() {}
3 changes: 0 additions & 3 deletions src/test/compile-fail/E0017.rs
Expand Up @@ -12,10 +12,7 @@ static X: i32 = 1;
const C: i32 = 2;

const CR: &'static mut i32 = &mut C; //~ ERROR E0017
//~| NOTE constants require immutable values
static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017
//~| NOTE statics require immutable values
//~| ERROR cannot borrow
static CONST_REF: &'static mut i32 = &mut C; //~ ERROR E0017
//~| NOTE statics require immutable values
fn main() {}
3 changes: 0 additions & 3 deletions src/test/compile-fail/E0023.rs
Expand Up @@ -18,10 +18,7 @@ fn main() {
let x = Fruit::Apple(String::new(), String::new());
match x {
Fruit::Apple(a) => {}, //~ ERROR E0023
//~| NOTE expected 2 fields, found 1
Fruit::Apple(a, b, c) => {}, //~ ERROR E0023
//~| NOTE expected 2 fields, found 3
Fruit::Pear(1, 2) => {}, //~ ERROR E0023
//~| NOTE expected 1 field, found 2
}
}
2 changes: 0 additions & 2 deletions src/test/compile-fail/E0025.rs
Expand Up @@ -17,6 +17,4 @@ fn main() {
let x = Foo { a:1, b:2 };
let Foo { a: x, a: y, b: 0 } = x;
//~^ ERROR field `a` bound multiple times in the pattern
//~| NOTE multiple uses of `a` in pattern
//~| NOTE first use of `a`
}
1 change: 0 additions & 1 deletion src/test/compile-fail/E0026.rs
Expand Up @@ -18,6 +18,5 @@ fn main() {
match thing {
Thing { x, y, z } => {}
//~^ ERROR struct `Thing` does not have a field named `z` [E0026]
//~| NOTE struct `Thing` does not have field `z`
}
}
1 change: 0 additions & 1 deletion src/test/compile-fail/E0027.rs
Expand Up @@ -19,6 +19,5 @@ fn main() {
match d {
Dog { age: x } => {}
//~^ ERROR pattern does not mention field `name`
//~| NOTE missing field `name`
}
}
3 changes: 0 additions & 3 deletions src/test/compile-fail/E0029.rs
Expand Up @@ -14,9 +14,6 @@ fn main() {
match s {
"hello" ... "world" => {}
//~^ ERROR only char and numeric types are allowed in range patterns
//~| NOTE ranges require char or numeric types
//~| NOTE start type: &'static str
//~| NOTE end type: &'static str
//~| ERROR non-reference pattern used to match a reference
_ => {}
}
Expand Down
1 change: 0 additions & 1 deletion src/test/compile-fail/E0030.rs
Expand Up @@ -13,6 +13,5 @@ fn main() {
match 5u32 {
1000 ... 5 => {}
//~^ ERROR lower range bound must be less than or equal to upper
//~| NOTE lower bound larger than upper bound
}
}
3 changes: 0 additions & 3 deletions src/test/compile-fail/E0033.rs
Expand Up @@ -15,12 +15,9 @@ trait SomeTrait {
fn main() {
let trait_obj: &SomeTrait = SomeTrait;
//~^ ERROR expected value, found trait `SomeTrait`
//~| NOTE not a value
//~| ERROR E0038
//~| method `foo` has no receiver
//~| NOTE the trait `SomeTrait` cannot be made into an object

let &invalid = trait_obj;
//~^ ERROR E0033
//~| NOTE type `&SomeTrait` cannot be dereferenced
}
3 changes: 0 additions & 3 deletions src/test/compile-fail/E0034.rs
Expand Up @@ -20,15 +20,12 @@ trait Trait2 {

impl Trait1 for Test {
fn foo() {}
//~^ NOTE candidate #1 is defined in an impl of the trait `Trait1` for the type `Test`
}

impl Trait2 for Test {
fn foo() {}
//~^ NOTE candidate #2 is defined in an impl of the trait `Trait2` for the type `Test`
}

fn main() {
Test::foo() //~ ERROR multiple applicable items in scope
//~| NOTE multiple `foo` found
}
2 changes: 0 additions & 2 deletions src/test/compile-fail/E0038.rs
Expand Up @@ -14,8 +14,6 @@ trait Trait {

fn call_foo(x: Box<Trait>) {
//~^ ERROR E0038
//~| NOTE the trait `Trait` cannot be made into an object
//~| NOTE method `foo` references the `Self` type in its arguments or return type
let y = x.foo();
}

Expand Down
1 change: 0 additions & 1 deletion src/test/compile-fail/E0040.rs
Expand Up @@ -22,5 +22,4 @@ fn main() {
let mut x = Foo { x: -7 };
x.drop();
//~^ ERROR E0040
//~| NOTE explicit destructor calls not allowed
}
1 change: 0 additions & 1 deletion src/test/compile-fail/E0045.rs
Expand Up @@ -9,7 +9,6 @@
// except according to those terms.

extern "Rust" { fn foo(x: u8, ...); } //~ ERROR E0045
//~| NOTE variadics require C or cdecl calling convention

fn main() {
}
3 changes: 1 addition & 2 deletions src/test/compile-fail/E0049.rs
Expand Up @@ -9,14 +9,13 @@
// except according to those terms.

trait Foo {
fn foo<T: Default>(x: T) -> Self; //~ NOTE expected 1 type parameter
fn foo<T: Default>(x: T) -> Self;
}

struct Bar;

impl Foo for Bar {
fn foo(x: bool) -> Self { Bar } //~ ERROR E0049
//~| NOTE found 0 type parameters
}

fn main() {
Expand Down
9 changes: 3 additions & 6 deletions src/test/compile-fail/E0050.rs
Expand Up @@ -9,20 +9,17 @@
// except according to those terms.

trait Foo {
fn foo(&self, x: u8) -> bool; //~ NOTE trait requires 2 parameters
fn bar(&self, x: u8, y: u8, z: u8); //~ NOTE trait requires 4 parameters
fn less(&self); //~ NOTE trait requires 1 parameter
fn foo(&self, x: u8) -> bool;
fn bar(&self, x: u8, y: u8, z: u8);
fn less(&self);
}

struct Bar;

impl Foo for Bar {
fn foo(&self) -> bool { true } //~ ERROR E0050
//~| NOTE expected 2 parameters, found 1
fn bar(&self) { } //~ ERROR E0050
//~| NOTE expected 4 parameters, found 1
fn less(&self, x: u8, y: u8, z: u8) { } //~ ERROR E0050
//~| NOTE expected 1 parameter, found 4
}

fn main() {
Expand Down
1 change: 0 additions & 1 deletion src/test/compile-fail/E0055.rs
Expand Up @@ -20,5 +20,4 @@ fn main() {
let ref_foo = &&Foo;
ref_foo.foo();
//~^ ERROR E0055
//~| NOTE deref recursion limit reached
}
1 change: 0 additions & 1 deletion src/test/compile-fail/E0060.rs
Expand Up @@ -10,7 +10,6 @@

extern "C" {
fn printf(_: *const u8, ...) -> u32;
//~^ NOTE defined here
}

fn main() {
Expand Down
2 changes: 0 additions & 2 deletions src/test/compile-fail/E0061.rs
Expand Up @@ -9,10 +9,8 @@
// except according to those terms.

fn f(a: u16, b: &str) {}
//~^ NOTE defined here

fn f2(a: u16) {}
//~^ NOTE defined here

fn main() {
f(0);
Expand Down
3 changes: 1 addition & 2 deletions src/test/compile-fail/E0062.rs
Expand Up @@ -14,9 +14,8 @@ struct Foo {

fn main() {
let x = Foo {
x: 0, //~ NOTE first use of `x`
x: 0,
x: 0,
//~^ ERROR E0062
//~| NOTE used more than once
};
}
4 changes: 0 additions & 4 deletions src/test/compile-fail/E0063.rs
Expand Up @@ -41,14 +41,10 @@ struct TruncatedPluralFoo {
fn main() {
let w = SingleFoo { };
//~^ ERROR missing field `x` in initializer of `SingleFoo`
//~| NOTE missing `x`
let x = PluralFoo {x: 1};
//~^ ERROR missing fields `y`, `z` in initializer of `PluralFoo`
//~| NOTE missing `y`, `z`
let y = TruncatedFoo{x:1};
//~^ missing fields `a`, `b`, `y` and 1 other field in initializer of `TruncatedFoo`
//~| NOTE `a`, `b`, `y` and 1 other field
let z = TruncatedPluralFoo{x:1};
//~^ ERROR missing fields `a`, `b`, `c` and 2 other fields in initializer of `TruncatedPluralFoo`
//~| NOTE missing `a`, `b`, `c` and 2 other fields
}
2 changes: 0 additions & 2 deletions src/test/compile-fail/E0067.rs
Expand Up @@ -13,6 +13,4 @@ use std::collections::LinkedList;
fn main() {
LinkedList::new() += 1; //~ ERROR E0368
//~^ ERROR E0067
//~^^ NOTE invalid expression for left-hand side
//~| NOTE cannot use `+=` on type `std::collections::LinkedList<_>`
}
1 change: 0 additions & 1 deletion src/test/compile-fail/E0069.rs
Expand Up @@ -11,7 +11,6 @@
fn foo() -> u8 {
return;
//~^ ERROR `return;` in a function whose return type is not `()`
//~| NOTE return type is not ()
}

fn main() {
Expand Down
1 change: 0 additions & 1 deletion src/test/compile-fail/E0071.rs
Expand Up @@ -14,5 +14,4 @@ type FooAlias = Foo;
fn main() {
let u = FooAlias { value: 0 };
//~^ ERROR expected struct, variant or union type, found enum `Foo` [E0071]
//~| NOTE not a struct
}
1 change: 0 additions & 1 deletion src/test/compile-fail/E0076.rs
Expand Up @@ -13,7 +13,6 @@
#[repr(simd)]
struct Bad(u16, u32, u32);
//~^ ERROR E0076
//~| NOTE SIMD elements must have the same type

fn main() {
}
3 changes: 1 addition & 2 deletions src/test/compile-fail/E0081.rs
Expand Up @@ -9,10 +9,9 @@
// except according to those terms.

enum Enum {
P = 3, //~ NOTE first use of `3isize`
P = 3,
X = 3,
//~^ ERROR discriminant value `3isize` already exists
//~| NOTE enum already has `3isize`
Y = 5
}

Expand Down
2 changes: 1 addition & 1 deletion src/test/compile-fail/E0084.rs
Expand Up @@ -9,7 +9,7 @@
// except according to those terms.

#[repr(i32)] //~ ERROR: E0084
enum Foo {} //~ NOTE: zero-variant enum
enum Foo {}

fn main() {
}
2 changes: 0 additions & 2 deletions src/test/compile-fail/E0087.rs
Expand Up @@ -13,8 +13,6 @@ fn bar<T>() {}

fn main() {
foo::<f64>(); //~ ERROR expected at most 0 type parameters, found 1 type parameter [E0087]
//~^ NOTE expected 0 type parameters

bar::<f64, u64>(); //~ ERROR expected at most 1 type parameter, found 2 type parameters [E0087]
//~^ NOTE expected 1 type parameter
}
1 change: 0 additions & 1 deletion src/test/compile-fail/E0089.rs
Expand Up @@ -12,5 +12,4 @@ fn foo<T, U>() {}

fn main() {
foo::<f64>(); //~ ERROR expected 2 type parameters, found 1 type parameter [E0089]
//~| NOTE expected 2 type parameters
}
1 change: 0 additions & 1 deletion src/test/compile-fail/E0090.rs
Expand Up @@ -12,5 +12,4 @@ fn foo<'a: 'b, 'b: 'a>() {}

fn main() {
foo::<'static>(); //~ ERROR expected 2 lifetime parameters, found 1 lifetime parameter [E0090]
//~^ NOTE expected 2 lifetime parameters
}
2 changes: 0 additions & 2 deletions src/test/compile-fail/E0091.rs
Expand Up @@ -9,9 +9,7 @@
// except according to those terms.

type Foo<T> = u32; //~ ERROR E0091
//~| NOTE unused type parameter
type Foo2<A, B> = Box<A>; //~ ERROR E0091
//~| NOTE unused type parameter

fn main() {
}
2 changes: 1 addition & 1 deletion src/test/compile-fail/E0092.rs
Expand Up @@ -11,7 +11,7 @@
#![feature(intrinsics)]
extern "rust-intrinsic" {
fn atomic_foo(); //~ ERROR E0092
} //~| NOTE unrecognized atomic operation
}

fn main() {
}
1 change: 0 additions & 1 deletion src/test/compile-fail/E0093.rs
Expand Up @@ -12,7 +12,6 @@
extern "rust-intrinsic" {
fn foo();
//~^ ERROR E0093
//~| NOTE unrecognized intrinsic
}

fn main() {
Expand Down
1 change: 0 additions & 1 deletion src/test/compile-fail/E0094.rs
Expand Up @@ -11,7 +11,6 @@
#![feature(intrinsics)]
extern "rust-intrinsic" {
fn size_of<T, U>() -> usize; //~ ERROR E0094
//~| NOTE expected 1 type parameter
}

fn main() {
Expand Down
3 changes: 0 additions & 3 deletions src/test/compile-fail/E0106.rs
Expand Up @@ -11,17 +11,14 @@
struct Foo {
x: &bool,
//~^ ERROR E0106
//~| NOTE expected lifetime parameter
}
enum Bar {
A(u8),
B(&bool),
//~^ ERROR E0106
//~| NOTE expected lifetime parameter
}
type MyStr = &str;
//~^ ERROR E0106
//~| NOTE expected lifetime parameter

struct Baz<'a>(&'a str);
struct Buzz<'a, 'b>(&'a str, &'b str);
Expand Down
1 change: 0 additions & 1 deletion src/test/compile-fail/E0109.rs
Expand Up @@ -9,7 +9,6 @@
// except according to those terms.

type X = u32<i32>; //~ ERROR E0109
//~| NOTE type parameter not allowed

fn main() {
}
1 change: 0 additions & 1 deletion src/test/compile-fail/E0110.rs
Expand Up @@ -9,7 +9,6 @@
// except according to those terms.

type X = u32<'static>; //~ ERROR E0110
//~| NOTE lifetime parameter not allowed on this type

fn main() {
}
2 changes: 0 additions & 2 deletions src/test/compile-fail/E0116.rs
Expand Up @@ -10,8 +10,6 @@

impl Vec<u8> {}
//~^ ERROR E0116
//~| NOTE impl for type defined outside of crate.
//~| NOTE define and implement a trait or new type instead

fn main() {
}

0 comments on commit 3a2ad57

Please sign in to comment.