Rollup merge of #70011 - petrochenkov:asyncice, r=Centril
def_collector: Fully visit async functions We forgot to visit attributes previously, it caused ICEs. Special treatment of async functions is also moved from `visit_item` to `visit_fn` to reuse more of the default visitor. Fixes https://github.com/rust-lang/rust/issues/67778.
This commit is contained in:
commit
d74c5cd07c
2 changed files with 35 additions and 61 deletions
13
src/test/ui/async-await/expansion-in-attrs.rs
Normal file
13
src/test/ui/async-await/expansion-in-attrs.rs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
// check-pass
|
||||
// edition:2018
|
||||
|
||||
macro_rules! with_doc {
|
||||
($doc: expr) => {
|
||||
#[doc = $doc]
|
||||
async fn f() {}
|
||||
};
|
||||
}
|
||||
|
||||
with_doc!(concat!(""));
|
||||
|
||||
fn main() {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue