blob: 95d33ed94dd715fecdde2fcab4bb1139cdadc150 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
fn method(a: Option<&()>) {} //~NOTE function defined here
fn main() {
let a = Some(&mut ());
method(a);
//~^ ERROR mismatched types
//~| NOTE arguments to this function are incorrect
//~| NOTE types differ in mutability
//~| NOTE expected enum `Option<&()>`
//~| NOTE found enum `Option<&mut ()>`
}
|