rust/src/test/compile-fail/issue-511.rs
Gareth Daniel Smith 6d86969260 change the test suite //! kind syntax to //~ kind in order to avoid a
conflict with the new single-line-sugared-inner-doc-comment (`//! ...`).
2012-06-30 12:23:59 +01:00

13 lines
329 B
Rust

use std;
import option;
fn f<T>(&o: option<T>) {
assert o == option::none;
}
fn main() {
f::<int>(option::none);
//~^ ERROR taking mut reference to static item
//~^^ ERROR illegal borrow unless pure: creating mutable alias to aliasable, immutable memory
//~^^^ NOTE impure due to access to impure function
}