Closed
Description
I setup Travis to run on both beta and nightly. This is recommended by the Travis docs because it helps catch regressions.
For some reason, my build works on stable, but fails on beta and nightly. Is this a regression?
Here's the code that doesn't work:
scope.declare_builtin_function(
type_name.clone().concat(Identifier::from("writeln")),
ItemType::Function {
args: vec![
FuncArgType::Arg(stdout_type),
FuncArgType::Variadic(None),
],
return_type: unit_type,
},
move |scope, args, _| {
let mut ops = expression::call(scope, Expression::Identifier(write_method_name.clone()), args)?;
// Write a newline using a temporary cell
//TODO: ops.extend(...);
unimplemented!();
Ok(ops)
}
);
This is in stdio.rs.
For some reason on beta and nightly the compiler can no longer infer that type:
error[E0282]: type annotations needed
--> src/core/io/stdio.rs:82:13
|
82 | Ok(ops)
| ^^ cannot infer type for `E`
error: aborting due to previous error
I think it should be able to figure it out based on the call to scope.declare_builtin_function()
.
Metadata
Metadata
Assignees
Labels
No labels