|
104 | 104 | //! } |
105 | 105 | //! |
106 | 106 | //! #[custom_mir(dialect = "runtime", phase = "optimized")] |
| 107 | +#![cfg_attr(bootstrap, doc = "#[cfg(any())]")] // disable the following function in doctests when `bootstrap` is set |
107 | 108 | //! fn push_and_pop<T>(v: &mut Vec<T>, value: T) { |
108 | 109 | //! mir!( |
109 | | -//! let unused; |
| 110 | +//! let _unused; |
110 | 111 | //! let popped; |
111 | 112 | //! |
112 | 113 | //! { |
113 | | -//! Call(unused, pop, Vec::push(v, value)) |
| 114 | +//! Call(_unused = Vec::push(v, value), pop) |
114 | 115 | //! } |
115 | 116 | //! |
116 | 117 | //! pop = { |
117 | | -//! Call(popped, drop, Vec::pop(v)) |
| 118 | +//! Call(popped = Vec::pop(v), drop) |
118 | 119 | //! } |
119 | 120 | //! |
120 | 121 | //! drop = { |
@@ -275,7 +276,7 @@ define!("mir_return", fn Return() -> BasicBlock); |
275 | 276 | define!("mir_goto", fn Goto(destination: BasicBlock) -> BasicBlock); |
276 | 277 | define!("mir_unreachable", fn Unreachable() -> BasicBlock); |
277 | 278 | define!("mir_drop", fn Drop<T>(place: T, goto: BasicBlock)); |
278 | | -define!("mir_call", fn Call<T>(place: T, goto: BasicBlock, call: T)); |
| 279 | +define!("mir_call", fn Call(call: (), goto: BasicBlock)); |
279 | 280 | define!("mir_storage_live", fn StorageLive<T>(local: T)); |
280 | 281 | define!("mir_storage_dead", fn StorageDead<T>(local: T)); |
281 | 282 | define!("mir_deinit", fn Deinit<T>(place: T)); |
|
0 commit comments