fix various error messages
This commit is contained in:
parent
47d3b801ef
commit
2c9dfafa57
7 changed files with 6 additions and 7 deletions
|
@ -29,7 +29,6 @@ fn main() {
|
|||
|
||||
let mut map = HashMap::new();
|
||||
//~^ ERROR E0433
|
||||
//~| ERROR E0425
|
||||
|
||||
for line in input.lines() {
|
||||
let line = line.unwrap();
|
||||
|
|
|
@ -35,7 +35,7 @@ impl Node for Stuff {
|
|||
|
||||
fn iterate<N: Node, G: Graph<N>>(graph: &G) {
|
||||
for node in graph.iter() { //~ ERROR no method named `iter` found
|
||||
node.zomg(); //~ error: the type of this value must be known in this context
|
||||
node.zomg();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ struct Homura;
|
|||
|
||||
fn akemi(homura: Homura) {
|
||||
let Some(ref madoka) = Some(homura.kaname()); //~ ERROR no method named `kaname` found
|
||||
madoka.clone(); //~ ERROR the type of this value must be known
|
||||
madoka.clone();
|
||||
}
|
||||
|
||||
fn main() { }
|
||||
|
|
|
@ -11,6 +11,5 @@
|
|||
fn main() {
|
||||
for (ref i,) in [].iter() { //~ ERROR mismatched types
|
||||
i.clone();
|
||||
//~^ ERROR: the type of this value must be known in this context
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ macro_rules! write {
|
|||
}
|
||||
|
||||
macro_rules! cast {
|
||||
($x:expr) => ($x as ())
|
||||
($x:expr) => ($x as ()) //~ ERROR non-scalar cast
|
||||
}
|
||||
|
||||
fn main() {
|
||||
|
@ -39,4 +39,5 @@ fn main() {
|
|||
//~^ NOTE in this expansion of write!
|
||||
|
||||
cast!(2);
|
||||
//~^ NOTE in this expansion of cast!
|
||||
}
|
||||
|
|
|
@ -31,5 +31,5 @@ impl ToString_ for Point {
|
|||
fn main() {
|
||||
let p = Point::new(0.0, 0.0);
|
||||
//~^ ERROR no associated item named `new` found for type `Point` in the current scope
|
||||
println!("{}", p.to_string()); //~ ERROR type of this value must be known
|
||||
println!("{}", p.to_string());
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ fn foo(x: Whatever) {
|
|||
//~| found `std::option::Option<_>`
|
||||
//~| expected enum `Whatever`
|
||||
//~| found enum `std::option::Option`
|
||||
field.access(), //~ ERROR the type of this value must be known in this context
|
||||
field.access(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue