Skip to content

Commit 2c9dfaf

Browse files
committed
fix various error messages
1 parent 47d3b80 commit 2c9dfaf

File tree

7 files changed

+6
-7
lines changed

7 files changed

+6
-7
lines changed

src/test/compile-fail/derived-errors/issue-31997-1.rs

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

3030
let mut map = HashMap::new();
3131
//~^ ERROR E0433
32-
//~| ERROR E0425
3332

3433
for line in input.lines() {
3534
let line = line.unwrap();

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ impl Node for Stuff {
3535

3636
fn iterate<N: Node, G: Graph<N>>(graph: &G) {
3737
for node in graph.iter() { //~ ERROR no method named `iter` found
38-
node.zomg(); //~ error: the type of this value must be known in this context
38+
node.zomg();
3939
}
4040
}
4141

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ struct Homura;
1212

1313
fn akemi(homura: Homura) {
1414
let Some(ref madoka) = Some(homura.kaname()); //~ ERROR no method named `kaname` found
15-
madoka.clone(); //~ ERROR the type of this value must be known
15+
madoka.clone();
1616
}
1717

1818
fn main() { }

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

-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,5 @@
1111
fn main() {
1212
for (ref i,) in [].iter() { //~ ERROR mismatched types
1313
i.clone();
14-
//~^ ERROR: the type of this value must be known in this context
1514
}
1615
}

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ macro_rules! write {
3030
}
3131

3232
macro_rules! cast {
33-
($x:expr) => ($x as ())
33+
($x:expr) => ($x as ()) //~ ERROR non-scalar cast
3434
}
3535

3636
fn main() {
@@ -39,4 +39,5 @@ fn main() {
3939
//~^ NOTE in this expansion of write!
4040

4141
cast!(2);
42+
//~^ NOTE in this expansion of cast!
4243
}

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ impl ToString_ for Point {
3131
fn main() {
3232
let p = Point::new(0.0, 0.0);
3333
//~^ ERROR no associated item named `new` found for type `Point` in the current scope
34-
println!("{}", p.to_string()); //~ ERROR type of this value must be known
34+
println!("{}", p.to_string());
3535
}

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ fn foo(x: Whatever) {
1919
//~| found `std::option::Option<_>`
2020
//~| expected enum `Whatever`
2121
//~| found enum `std::option::Option`
22-
field.access(), //~ ERROR the type of this value must be known in this context
22+
field.access(),
2323
}
2424
}
2525

0 commit comments

Comments
 (0)