mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 22:41:50 +00:00
auto merge of #19778 : aochagavia/rust/ice, r=alexcrichton
Fixes #19734
This commit is contained in:
commit
ef0bc464af
@ -1021,16 +1021,17 @@ fn expand_method(m: P<ast::Method>, fld: &mut MacroExpander) -> SmallVector<P<as
|
||||
|meths, mark| meths.move_map(|m| mark_method(m, mark)),
|
||||
fld);
|
||||
|
||||
let new_methods = match maybe_new_methods {
|
||||
Some(methods) => methods,
|
||||
match maybe_new_methods {
|
||||
Some(methods) => {
|
||||
// expand again if necessary
|
||||
let new_methods = methods.into_iter()
|
||||
.flat_map(|m| fld.fold_method(m).into_iter())
|
||||
.collect();
|
||||
fld.cx.bt_pop();
|
||||
new_methods
|
||||
}
|
||||
None => SmallVector::zero()
|
||||
};
|
||||
|
||||
// expand again if necessary
|
||||
let new_methods = new_methods.into_iter()
|
||||
.flat_map(|m| fld.fold_method(m).into_iter()).collect();
|
||||
fld.cx.bt_pop();
|
||||
new_methods
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
15
src/test/compile-fail/issue-19734.rs
Normal file
15
src/test/compile-fail/issue-19734.rs
Normal file
@ -0,0 +1,15 @@
|
||||
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
fn main() {}
|
||||
|
||||
impl Type {
|
||||
undef!() //~ ERROR macro undefined: 'undef!'
|
||||
}
|
Loading…
Reference in New Issue
Block a user