auto merge of #12351 : kud1ing/rust/backticks, r=alexcrichton
This commit is contained in:
commit
8391b71122
@ -687,8 +687,8 @@ pub fn check_pointer_pat(pcx: &pat_ctxt,
|
||||
e, actual)})},
|
||||
Some(expected),
|
||||
format!("{} pattern", match pointer_kind {
|
||||
Send => "a ~-box",
|
||||
Borrowed => "an &-pointer"
|
||||
Send => "a `~`-box",
|
||||
Borrowed => "an `&`-pointer"
|
||||
}),
|
||||
None);
|
||||
fcx.write_error(pat_id);
|
||||
|
@ -16,7 +16,7 @@ pub enum TraitWrapper {
|
||||
|
||||
fn get_tw_map<'lt>(tw: &'lt TraitWrapper) -> &'lt MyTrait {
|
||||
match *tw {
|
||||
A(~ref map) => map, //~ ERROR found a ~-box pattern
|
||||
A(~ref map) => map, //~ ERROR found a `~`-box pattern
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -24,12 +24,12 @@ fn main() {
|
||||
|
||||
match (true, false) {
|
||||
~(true, false) => ()
|
||||
//~^ ERROR mismatched types: expected `(bool,bool)` but found a ~-box pattern
|
||||
//~^ ERROR mismatched types: expected `(bool,bool)` but found a `~`-box pattern
|
||||
}
|
||||
|
||||
match (true, false) {
|
||||
&(true, false) => ()
|
||||
//~^ ERROR mismatched types: expected `(bool,bool)` but found an &-pointer pattern
|
||||
//~^ ERROR mismatched types: expected `(bool,bool)` but found an `&`-pointer pattern
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user