Skip to content

Instantly share code, notes, and snippets.

@larsbergstrom
Created October 20, 2013 15:54
Show Gist options
  • Save larsbergstrom/7071398 to your computer and use it in GitHub Desktop.
Save larsbergstrom/7071398 to your computer and use it in GitHub Desktop.
fn t() -> int {
4;
}
@larsbergstrom
Copy link
Author

lbergstrom@lbergstrom src]$ rustc --lib ~/tmp/error-msg.rs
/Users/lbergstrom/tmp/error-msg.rs:1:0: 3:1 error: not all control paths return a value
/Users/lbergstrom/tmp/error-msg.rs:1 fn t() -> int {
/Users/lbergstrom/tmp/error-msg.rs:2 4;
/Users/lbergstrom/tmp/error-msg.rs:3 }
error: aborting due to previous error
task '' failed at 'explicit failure', /Users/lbergstrom/rust/src/libsyntax/diagnostic.rs:98
task '' failed at 'explicit failure', /Users/lbergstrom/rust/src/librustc/rustc.rs:391
[lbergstrom@lbergstrom src]$

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment