11#![feature(prelude_import)]
2- //@ compile-flags: -Zunpretty=expanded
2+ //@ revisions: expanded hir
3+ //@[expanded]compile-flags: -Zunpretty=expanded
4+ //@[expanded]check-pass
5+ //@[hir]compile-flags: -Zunpretty=hir
6+ //@[hir]check-fail
37//@ edition:2024
4- //@ check-pass
8+
9+ // Note: the HIR revision includes a `.stderr` file because there are some
10+ // errors that only occur once we get past the AST.
511
612#![feature(auto_traits)]
713#![feature(box_patterns)]
@@ -211,7 +217,10 @@ mod expressions {
211217 }
212218
213219 /// ExprKind::Await
214- fn expr_await() { let fut; fut.await; }
220+ fn expr_await() {
221+ let fut;
222+ fut.await;
223+ }
215224
216225 /// ExprKind::TryBlock
217226 fn expr_try_block() { try {} try { return; } }
@@ -242,7 +251,9 @@ mod expressions {
242251 }
243252
244253 /// ExprKind::Underscore
245- fn expr_underscore() { _; }
254+ fn expr_underscore() {
255+ _;
256+ }
246257
247258 /// ExprKind::Path
248259 fn expr_path() {
@@ -275,16 +286,8 @@ mod expressions {
275286 /// ExprKind::Ret
276287 fn expr_ret() { return; return true; }
277288
278- /// ExprKind::InlineAsm
279- fn expr_inline_asm() {
280- let x;
281- asm!("mov {1}, {0}\nshl {1}, 1\nshl {0}, 2\nadd {0}, {1}",
282- inout(reg)
283- x,
284- out(reg)
285- _);
286- }
287289
290+ /// ExprKind::InlineAsm: see exhaustive-asm.rs
288291 /// ExprKind::OffsetOf
289292 fn expr_offset_of() {
290293
@@ -300,65 +303,12 @@ mod expressions {
300303
301304
302305
303-
304-
305-
306-
307-
308-
309306 // ...
310307
311308
312309
313310
314311
315-
316-
317-
318-
319-
320-
321-
322-
323-
324-
325-
326-
327-
328-
329-
330-
331-
332-
333-
334-
335-
336-
337-
338-
339-
340-
341-
342-
343-
344-
345-
346-
347-
348-
349-
350-
351-
352-
353-
354-
355-
356-
357-
358-
359-
360-
361-
362312 // concat_idents is deprecated
363313
364314
@@ -450,10 +400,7 @@ mod items {
450400 unsafe extern "C++" {}
451401 unsafe extern "C" {}
452402 }
453- /// ItemKind::GlobalAsm
454- mod item_global_asm {
455- global_asm! (".globl my_asm_func");
456- }
403+ /// ItemKind::GlobalAsm: see exhaustive-asm.rs
457404 /// ItemKind::TyAlias
458405 mod item_ty_alias {
459406 pub type Type<'a> where T: 'a = T;
0 commit comments