Skip to content

Resolve the prelude import in build_reduced_graph #145322

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

LorrensP-2158466
Copy link
Contributor

@LorrensP-2158466 LorrensP-2158466 commented Aug 12, 2025

This pr tries to resolve the prelude import at the build_reduced_graph stage.
Part of batched import resolution in #145108 (cherry picked commit) and maybe needed for #139493.

r? petrochenkov

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Aug 12, 2025
@petrochenkov
Copy link
Contributor

Could you also add this case to tests?

//@ check-pass

#![feature(custom_inner_attributes)]

#![rustfmt::skip]

fn main() {
    let _ = todo!();
}

@petrochenkov petrochenkov added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 12, 2025
@LorrensP-2158466
Copy link
Contributor Author

LorrensP-2158466 commented Aug 12, 2025

I am currently unable to implement any of your suggestions; it is the prelude import that can not be resolved during build_reduced_graph. Which makes me think that this change doesn't actually do anything useful? At least the prelude import in stdlib keeps failing with every change.

@petrochenkov
Copy link
Contributor

@Voultapher
This change should fix your issues with #139493 and custom inner attributes.
Could you check it when it's ready?

@LorrensP-2158466
Copy link
Contributor Author

Suggestions worked, however, we can't emit an error when the prelude is already set, I just used a panic for ease of use, and it was triggered when compiling stdlib:

prelude already set: [Segment { ident: prelude#0, id: Some(NodeId(479)), has_generic_args: false, has_lifetime_args: false, args_span: no-location (#0) }, Segment { ident: rust_2021#0, id: Some(NodeId(480)), has_generic_args: false, has_lifetime_args: false, args_span: no-location (#0) }]

I also can't avoid to only resolve the prelude path when the prelude is not set. Errors like these get emitted:

error[E0433]: failed to resolve: use of undeclared type `String`
   --> library/std/src/panicking.rs:642:29
    |
642 |                 let mut s = String::new();
    |                             ^^^^^^ use of undeclared type `String`
    |
help: consider importing one of these structs
    |
 12 + use crate::prelude::rust_future::String;
    |
 12 + use alloc::string::String;
    |

error[E0433]: failed to resolve: use of undeclared type `Box`
   --> library/std/src/panicking.rs:656:13
    |
656 |             Box::into_raw(Box::new(contents))
    |             ^^^ use of undeclared type `Box`
    |
help: consider importing one of these structs
    |
 12 + use crate::prelude::rust_future::Box;
    |
 12 + use alloc::boxed::Box;

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 13, 2025
@petrochenkov
Copy link
Contributor

Okay, I see, in std and in some tests we first apply the prelude import injected implicitly, and then the prelude import written explicitly.
Let's keep it as is then.

@@ -421,6 +421,9 @@
//
#![default_lib_allocator]

// The Rust prelude
pub mod prelude;

// Explicitly import the prelude. The compiler uses this same unstable attribute
// to import the prelude implicitly when building crates that depend on std.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a comment saying that this import should currently go after mod prelude to work?
And same comment in libcore.

@@ -421,6 +421,9 @@
//
#![default_lib_allocator]

// The Rust prelude
pub mod prelude;

// Explicitly import the prelude. The compiler uses this same unstable attribute
// to import the prelude implicitly when building crates that depend on std.
#[prelude_import]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is #[allow(unused)] still needed on prelude imports?
If not, could you remove them in libcore and libstd?

@@ -0,0 +1,9 @@
//@ check-pass
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a comment saying that the test checks that macro names resolved from libstd prelude still work if there's a crate level custom inner attribute?
And rename the test to something less generic.

if !ast::attr::contains_name(&item.attrs, sym::prelude_import) {
let kind = ImportKind::Glob { max_vis: Cell::new(None), id };
self.add_import(prefix, kind, use_tree.span, item, root_span, item.id, vis);
return;
Copy link
Contributor

@petrochenkov petrochenkov Aug 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I see return I have to look at the whole function to check if anything is skipped in the bottom due to that return.
Just use if-else or if guard (with a positive condition first).

};

self.add_import(prefix, kind, use_tree.span, item, root_span, item.id, vis);
if !ast::attr::contains_name(&item.attrs, sym::prelude_import) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if !ast::attr::contains_name(&item.attrs, sym::prelude_import) {
if !attr::contains_name(&item.attrs, sym::prelude_import) {

self.r.prelude = Some(module);
} else {
// Same as in `imports::resolve_glob_import`
self.r.dcx().emit_err(CannotGlobImportAllCrates { span: use_tree.span });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, using an entirely unrelated error is too much.
You can use a string, dcx.span_err(span, "cannot resolve a prelude import").emit(), without introducing a new "translatable" error type.

@petrochenkov petrochenkov added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 13, 2025
@rust-log-analyzer
Copy link
Collaborator

The job aarch64-gnu-llvm-19-1 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
3 error: `#[panic_handler]` function required, but not found
4 
5 error: unwinding panics are not supported without std

7    = help: using nightly cargo, use -Zbuild-std with panic="abort" to avoid unwinding
8    = note: since the core library is usually precompiled with panic="unwind", rebuilding your crate with panic="abort" may not be enough to fix the problem
9 
- error: aborting due to 3 previous errors
+ error: aborting due to 4 previous errors
11 
12 
---
To only update this specific test, also pass `--test-args extern-flag/empty-extern-arg.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/extern-flag/empty-extern-arg.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/extern-flag/empty-extern-arg" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "--extern" "std="
stdout: none
--- stderr -------------------------------
error: extern location for std does not exist: 

error: cannot glob-import all possible crates

error: `#[panic_handler]` function required, but not found

error: unwinding panics are not supported without std
   |
   = help: using nightly cargo, use -Zbuild-std with panic="abort" to avoid unwinding
   = note: since the core library is usually precompiled with panic="unwind", rebuilding your crate with panic="abort" may not be enough to fix the problem

error: aborting due to 4 previous errors
------------------------------------------


---- [ui] tests/ui/unpretty/exhaustive.rs#expanded stdout ----

error in revision `expanded`: test compilation failed although it shouldn't!
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/unpretty/exhaustive.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--cfg" "expanded" "--check-cfg" "cfg(test,FALSE,expanded,hir)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/unpretty/exhaustive.expanded" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "--edition=2024" "-Zunpretty=expanded"
--- stdout -------------------------------
#![feature(prelude_import)]
//@ revisions: expanded hir
//@[expanded]compile-flags: -Zunpretty=expanded
//@[expanded]check-pass
//@[hir]compile-flags: -Zunpretty=hir
//@[hir]check-fail
//@ edition:2024

// Note: the HIR revision includes a `.stderr` file because there are some
// errors that only occur once we get past the AST.

#![feature(auto_traits)]
#![feature(box_patterns)]
#![feature(builtin_syntax)]
#![feature(const_trait_impl)]
---
        const CONST: ();
    }
}

mod attributes {
    //! inner single-line doc comment
    /*!
     * inner multi-line doc comment
     */
    #![doc = "inner doc attribute"]
    #![allow(dead_code, unused_variables)]
    #![no_std]

    /// outer single-line doc comment
    /**
     * outer multi-line doc comment
     */
    #[doc = "outer doc attribute"]
    #[doc = "macro"]
    #[allow()]
    #[repr(C)]
    struct Struct;
}

mod expressions {
    /// ExprKind::Array
    fn expr_array() {
        [];
        [true];
        [true];
        [true, true];
        ["long........................................................................"];
        ["long............................................................",
                true];
    }

    /// ExprKind::ConstBlock
    fn expr_const_block() {
---
            };
    }

    /// ExprKind::Call
    fn expr_call() {
        let f;
        f();
        f::<u8>();
        f::<1>();
        f::<'static, u8, 1>();
        f(true);
        f(true);
        ()();
    }

    /// ExprKind::MethodCall
    fn expr_method_call() {
        let x;
        x.f();
        x.f::<u8>();
        x.collect::<Vec<_>>();
    }

    /// ExprKind::Tup
    fn expr_tup() { (); (true,); (true, false); (true, false); }

    /// ExprKind::Binary
    fn expr_binary() {
        let (a, b, c, d, x, y);
        true || false;
        true || false && false;
        a < 1 && 2 < b && c > 3 && 4 > d;
        a & b & !c;
        a + b * c - d + -1 * -2 - -3;
        x = !y;
    }

    /// ExprKind::Unary
    fn expr_unary() { let expr; *expr; !expr; -expr; }

    /// ExprKind::Lit
    fn expr_lit() { 'x'; 1_000_i8; 1.00000000000000000000001; }

    /// ExprKind::Cast
    fn expr_cast() { let expr; expr as T; expr as T<u8>; }

    /// ExprKind::Type
    fn expr_type() { let expr; builtin # type_ascribe(expr, T); }

    /// ExprKind::Let
    fn expr_let() {
        let b;
        if let Some(a) = b {}
        if let _ = true && false {}
        if let _ = (true && false) {}
    }

    /// ExprKind::If
    fn expr_if() {
        if true {}
        if !true {}
        if let true = true {} else {}
        if true {} else if false {}
        if true {} else if false {} else {}
        if true { return; } else if false { 0 } else { 0 }
    }

    /// ExprKind::While
    fn expr_while() {
        while false {}
        'a: while false {}
        while let true = true {}
    }

    /// ExprKind::ForLoop
    fn expr_for_loop() { let x; for _ in x {} 'a: for _ in x {} }

    /// ExprKind::Loop
    fn expr_loop() { loop {} 'a: loop {} }

    /// ExprKind::Match
    fn expr_match() {
        let value;
        match value {}
        match value { ok => 1, }
        match value { ok => 1, err => 0, }
    }

    /// ExprKind::Closure
    fn expr_closure() {
        let value;
        || {};
        |x| {};
        |x: u8| {};
        || ();
        move || value;
        async || value;
        async move || value;
        static || value; //[hir]~ ERROR closures cannot be static
        static move || value; //[hir]~ ERROR closures cannot be static
        (static async || value);
        (static async move || value);
        || -> u8 { value };
        1 + || {};
    }

    /// ExprKind::Block
    fn expr_block() {
        {}
        unsafe {}
        'a: {}

        #[allow()]
        {}
        {
            #![allow()]
---
        async gen {};
        async gen move {};
    }

    /// ExprKind::Await
    fn expr_await() {
        let fut;
        fut.await; //[hir]~ ERROR `await` is only allowed
    }

    /// ExprKind::TryBlock
    fn expr_try_block() { try {} try { return; } }

    /// ExprKind::Assign
    fn expr_assign() { let expr; expr = true; }

    /// ExprKind::AssignOp
    fn expr_assign_op() { let expr; expr += true; }

    /// ExprKind::Field
    fn expr_field() { let expr; expr.field; expr.0; }

    /// ExprKind::Index
    fn expr_index() { let expr; expr[true]; }

    /// ExprKind::Range
    fn expr_range() {
        let (lo, hi);
        ..;
        ..hi;
        lo..;
        lo..hi;
        lo..hi;
        ..=hi;
        lo..=hi;
        -2..=-1;
    }

    /// ExprKind::Underscore
    fn expr_underscore() {
        _; //[hir]~ ERROR in expressions, `_` can only
    }

    /// ExprKind::Path
    fn expr_path() {
        let x;
        crate::expressions::expr_path;
        crate::expressions::expr_path::<'static>;
        <T as Default>::default;
        <T as ::core::default::Default>::default::<>;
        x::(); //[hir]~ ERROR parenthesized type parameters
        x::(T, T) -> T; //[hir]~ ERROR parenthesized type parameters
        crate::() -> ()::expressions::() -> ()::expr_path;
        //[hir]~^ ERROR parenthesized type parameters
        //[hir]~| ERROR parenthesized type parameters
        core::()::marker::()::PhantomData;
        //[hir]~^ ERROR parenthesized type parameters
        //[hir]~| ERROR parenthesized type parameters
    }

    /// ExprKind::AddrOf
    fn expr_addr_of() {
        let expr;
        &expr;
        &mut expr;
        &raw const expr;
        &raw mut expr;
    }

    /// ExprKind::Break
    fn expr_break() { 'a: { break; break 'a; break true; break 'a true; } }

    /// ExprKind::Continue
    fn expr_continue() { 'a: { continue; continue 'a; } }

    /// ExprKind::Ret
    fn expr_ret() { return; return true; }


---




        //[hir]~ ERROR `yield` can only be used





---


        // ...

        //[hir]~ ERROR invalid ABI





---




        //[hir]~ ERROR `..` patterns are not allowed here





---




        //[hir]~ ERROR parenthesized type parameters


        //[hir]~ ERROR `impl Trait` is not allowed
        //[hir]~ ERROR `impl Trait` is not allowed
        //[hir]~ ERROR `impl Trait` is not allowed
        //[hir]~ ERROR `impl Trait` is not allowed
        //[hir]~ ERROR `impl Trait` is not allowed
        //[hir]~ ERROR `impl Trait` is not allowed









        { builtin # offset_of(T, field) };
    }
    /// ExprKind::MacCall
    fn expr_mac_call() { "..."; "..."; "..."; }
    /// ExprKind::Struct
    fn expr_struct() {
        struct Struct {}
        let (x, base);
        Struct {};
        <Struct as ToOwned>::Owned {};
        Struct { .. };
        Struct { ..base };
        Struct { x };
        Struct { x, ..base };
        Struct { x: true };
        Struct { x: true, .. };
        Struct { x: true, ..base };
        Struct { 0: true, ..base };
    }
    /// ExprKind::Repeat
    fn expr_repeat() { [(); 0]; }
    /// ExprKind::Paren
    fn expr_paren() { let expr; (expr); }
    /// ExprKind::Try
    fn expr_try() { let expr; expr?; }
    /// ExprKind::Yield
    fn expr_yield() { yield; yield true; }
    /// ExprKind::Yeet
    fn expr_yeet() { do yeet; do yeet 0; }
    /// ExprKind::Become
    fn expr_become() { become true; }
    /// ExprKind::IncludedBytes
    fn expr_include_bytes() {
        b"data for include_bytes in ../expanded-exhaustive.rs\n";
    }
    /// ExprKind::FormatArgs
    fn expr_format_args() {
        let expr;
        format_args!("");
---
            const B: ();
            const C: () = {};
        }
    }
    /// ItemKind::Fn
    mod item_fn {
        pub const unsafe extern "C" fn f() {}
        pub async unsafe extern "C" fn g() {}
        fn h<'a, T>() where T: 'a {}
        trait TraitItems {
            unsafe extern "C" fn f();
        }
        impl TraitItems for _ {
            default unsafe extern "C" fn f() {}
        }
    }
    /// ItemKind::Mod
    mod item_mod { }
    /// ItemKind::ForeignMod
    mod item_foreign_mod {
        unsafe extern "C++" {}
        unsafe extern "C" {}
    }
    /// ItemKind::GlobalAsm: see exhaustive-asm.rs
    /// ItemKind::TyAlias
    mod item_ty_alias {
        pub type Type<'a> where T: 'a = T;
    }
    /// ItemKind::Enum
    mod item_enum {
        pub enum Void {}
        enum Empty { Unit, Tuple(), Struct {}, }
        enum Generic<'a, T> where T: 'a {
            Tuple(T),
            Struct {
                t: T,
            },
        }
    }
    /// ItemKind::Struct
    mod item_struct {
        pub struct Unit;
        struct Tuple();
        struct Newtype(Unit);
        struct Struct {}
        struct Generic<'a, T> where T: 'a {
            t: T,
        }
    }
    /// ItemKind::Union
    mod item_union {
        union Generic<'a, T> where T: 'a {
            t: T,
        }
    }
    /// ItemKind::Trait
    mod item_trait {
        pub unsafe auto trait Send {}
---
        impl<T> () {}
        impl Default for () {}
        impl<T> const Default for () {}
    }
    /// ItemKind::MacCall
    mod item_mac_call { }
    /// ItemKind::MacroDef
    mod item_macro_def {
        macro_rules! mac { () => {...}; }
        pub macro stringify { () => {} }
    }
    /// ItemKind::Delegation
    mod item_delegation {
        /*! FIXME: todo */
    }
    /// ItemKind::DelegationMac
    mod item_delegation_mac {
        /*! FIXME: todo */
    }
}
mod patterns {
    /// PatKind::Missing
    fn pat_missing() { let _: fn(u32, T, &str); }
    /// PatKind::Wild
    fn pat_wild() { let _; }
    /// PatKind::Ident
    fn pat_ident() {
        let x;
        let ref x;
        let mut x;
        let ref mut x;
        let ref mut x @ _;
    }
    /// PatKind::Struct
    fn pat_struct() {
        let T {};
        let T::<T> {};
        let T::<'static> {};
        let T { x };
        let T { x: _x };
        let T { .. };
        let T { x, .. };
        let T { x: _x, .. };
        let T { 0: _x, .. };
        let <T as ToOwned>::Owned {};
    }
    /// PatKind::TupleStruct
    fn pat_tuple_struct() {
        struct Tuple();
        let Tuple();
        let Tuple::<T>();
        let Tuple::<'static>();
        let Tuple(x);
        let Tuple(..);
        let Tuple(x, ..);
    }
    /// PatKind::Or
    fn pat_or() { let (true | false); let (true); let (true | false); }
    /// PatKind::Path
    fn pat_path() {
        let core::marker::PhantomData;
        let core::marker::PhantomData::<T>;
        let core::marker::PhantomData::<'static>;
        let <T as Trait>::CONST;
    }
    /// PatKind::Tuple
    fn pat_tuple() { let (); let (true,); let (true, false); }
    /// PatKind::Box
    fn pat_box() { let box pat; }
    /// PatKind::Deref
    fn pat_deref() { let deref!(pat); }
    /// PatKind::Ref
    fn pat_ref() { let &pat; let &mut pat; }
    /// PatKind::Expr
    fn pat_expr() { let 1_000_i8; let -""; }
    /// PatKind::Range
    fn pat_range() { let ..1; let 0..; let 0..1; let 0..=1; let -2..=-1; }
    /// PatKind::Slice
    fn pat_slice() { let []; let [true]; let [true]; let [true, false]; }
    /// PatKind::Rest
    fn pat_rest() { let ..; }
    /// PatKind::Never
    fn pat_never() { let !; let Some(!); }
    /// PatKind::Paren
    fn pat_paren() { let (pat); }
    /// PatKind::MacCall
    fn pat_mac_call() { let ""; let ""; let ""; }
}
mod statements {
    /// StmtKind::Let
    fn stmt_let() {
        let _;
        let _ = true;
        let _: T = true;
        let _ = true else { return; };
    }
    /// StmtKind::Item
    fn stmt_item() {
        struct Struct {}
        struct Unit;
    }
    /// StmtKind::Expr
    fn stmt_expr() { () }
    /// StmtKind::Semi
    fn stmt_semi() { 1 + 1; }
    /// StmtKind::Empty
    fn stmt_empty() { ; }
    /// StmtKind::MacCall
    fn stmt_mac_call() { "..."; "..."; "..."; }
}
mod types {
    /// TyKind::Slice
    fn ty_slice() { let _: [T]; }
    /// TyKind::Array
    fn ty_array() { let _: [T; 0]; }
    /// TyKind::Ptr
    fn ty_ptr() { let _: *const T; let _: *mut T; }
    /// TyKind::Ref
    fn ty_ref() {
        let _: &T;
        let _: &mut T;
        let _: &'static T;
        let _: &'static mut [T];
        let _: &T<T<T<T<T>>>>;
        let _: &T<T<T<T<T>>>>;
    }
    /// TyKind::BareFn
    fn ty_bare_fn() {
        let _: fn();
        let _: fn() -> ();
        let _: fn(T);
        let _: fn(t: T);
        let _: fn();
        let _: for<'a> fn();
    }
    /// TyKind::Never
    fn ty_never() { let _: !; }
    /// TyKind::Tup
    fn ty_tup() { let _: (); let _: (T,); let _: (T, T); }
    /// TyKind::Path
    fn ty_path() {
        let _: T;
        let _: T<'static>;
        let _: T<T>;
        let _: T<T>;
        let _: T() -> !;
        let _: <T as ToOwned>::Owned;
    }
    /// TyKind::TraitObject
    fn ty_trait_object() {
        let _: dyn Send;
        let _: dyn Send + 'static;
        let _: dyn 'static + Send;
        let _: dyn for<'a> Send;
    }
    /// TyKind::ImplTrait
    const fn ty_impl_trait() {
        let _: impl Send;
        let _: impl Send + 'static;
        let _: impl 'static + Send;
        let _: impl ?Sized;
        let _: impl [const] Clone;
        let _: impl for<'a> Send;
    }
    /// TyKind::Paren
    fn ty_paren() { let _: (T); }
    /// TyKind::Typeof
    fn ty_typeof() {
        /*! unused for now */
    }
    /// TyKind::Infer
    fn ty_infer() { let _: _; }
    /// TyKind::ImplicitSelf
    fn ty_implicit_self() {
        /*! there is no syntax for this */
    }
    /// TyKind::MacCall
    fn ty_mac_call() {
        macro_rules! ty { ($ty:ty) => { $ty } }
        let _: T;
        let _: T;
        let _: T;
    }
    /// TyKind::CVarArgs
    fn ty_c_var_args() {
        /*! FIXME: todo */
    }
    /// TyKind::Pat
    fn ty_pat() { let _: u32 is const 1..; }
}
mod visibilities {
    /// VisibilityKind::Public
    mod visibility_public {
        pub struct Pub;
    }
    /// VisibilityKind::Restricted
    mod visibility_restricted {
        pub(crate) struct PubCrate;
        pub(self) struct PubSelf;
        pub(super) struct PubSuper;
        pub(in crate) struct PubInCrate;
        pub(in self) struct PubInSelf;
        pub(in super) struct PubInSuper;
        pub(in crate::visibilities) struct PubInCrateVisibilities;
        pub(in self::super) struct PubInSelfSuper;
        pub(in super::visibility_restricted) struct PubInSuperMod;
    }
}
------------------------------------------
--- stderr -------------------------------
error: cannot glob-import all possible crates
---

error[E0412]: cannot find type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:141:17
   |
LL |         expr as T<u8>;
   |                 ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
   |

error[E0412]: cannot find type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:147:38
   |
LL |         builtin # type_ascribe(expr, T);
   |                                      ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
---

error[E0412]: cannot find type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:299:13
   |
LL |         x::(T, T) -> T;   //[hir]~ ERROR parenthesized type parameters
   |             ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
   |

error[E0412]: cannot find type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:299:16
   |
LL |         x::(T, T) -> T;   //[hir]~ ERROR parenthesized type parameters
   |                ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
   |

error[E0412]: cannot find type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:299:22
   |
LL |         x::(T, T) -> T;   //[hir]~ ERROR parenthesized type parameters
   |                      ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
---

error[E0412]: cannot find type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:478:33
   |
LL |         pub type Type<'a> where T: 'a, = T;
   |                                 ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +         use crate::prelude::T;
   |

error[E0412]: cannot find type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:478:42
   |
LL |         pub type Type<'a> where T: 'a, = T;
   |                                          ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +         use crate::prelude::T;
   |

error[E0412]: cannot find type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:572:24
   |
LL |         let _: fn(u32, T, &str);
   |                        ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
---

error[E0422]: cannot find struct, variant or union type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:593:13
   |
LL |         let T::<'static> {};
   |             ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
   |

error[E0422]: cannot find struct, variant or union type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:594:13
   |
LL |         let T { x };
   |             ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
   |

error[E0422]: cannot find struct, variant or union type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:595:13
   |
LL |         let T { x: _x };
   |             ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
---

error[E0422]: cannot find struct, variant or union type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:597:13
   |
LL |         let T { x, .. };
   |             ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
   |

error[E0422]: cannot find struct, variant or union type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:598:13
   |
LL |         let T { x: _x, .. };
   |             ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
   |

error[E0422]: cannot find struct, variant or union type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:599:13
   |
LL |         let T { 0: _x, .. };
   |             ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
   |

error[E0412]: cannot find type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:600:14
   |
LL |         let <T as ToOwned>::Owned {};
   |              ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
---

error[E0412]: cannot find type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:760:17
   |
LL |         let _: &T<T<T<T<T>>>>;
   |                 ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
   |

error[E0412]: cannot find type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:760:19
   |
LL |         let _: &T<T<T<T<T>>>>;
   |                   ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
   |

error[E0412]: cannot find type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:760:21
   |
LL |         let _: &T<T<T<T<T>>>>;
   |                     ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
   |

error[E0412]: cannot find type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:760:23
   |
LL |         let _: &T<T<T<T<T>>>>;
   |                       ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
   |

error[E0412]: cannot find type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:760:25
   |
LL |         let _: &T<T<T<T<T>>>>;
   |                         ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
   |

error[E0412]: cannot find type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:761:17
   |
LL |         let _: &T<T<T<T<T> > > >;
   |                 ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
   |

error[E0412]: cannot find type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:761:19
   |
LL |         let _: &T<T<T<T<T> > > >;
   |                   ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
   |

error[E0412]: cannot find type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:761:21
   |
LL |         let _: &T<T<T<T<T> > > >;
   |                     ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
   |

error[E0412]: cannot find type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:761:23
   |
LL |         let _: &T<T<T<T<T> > > >;
   |                       ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
   |

error[E0412]: cannot find type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:761:25
   |
LL |         let _: &T<T<T<T<T> > > >;
   |                         ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
   |

error[E0412]: cannot find type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:768:19
   |
LL |         let _: fn(T);
   |                   ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
   |

error[E0412]: cannot find type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:769:22
   |
LL |         let _: fn(t: T);
   |                      ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
---

error[E0412]: cannot find type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:789:16
   |
LL |         let _: T<'static>;
   |                ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
---

error[E0412]: cannot find type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:792:16
   |
LL |         let _: T() -> !;    //[hir]~ ERROR parenthesized type parameters
   |                ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
   |

error[E0412]: cannot find type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:793:17
   |
LL |         let _: <T as ToOwned>::Owned;
   |                 ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
---

error[E0412]: cannot find type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:839:20
   |
LL |         let _: ty!(T);
   |                    ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
   |

error[E0412]: cannot find type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:840:20
   |
LL |         let _: ty![T];
   |                    ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
   |

error[E0412]: cannot find type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:841:22
   |
LL |         let _: ty! { T };
   |                      ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
---
------------------------------------------


---- [ui] tests/ui/unpretty/exhaustive.rs#hir stdout ----
Saved the actual stdout to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/unpretty/exhaustive.hir/exhaustive.hir.stdout`
diff of stdout:

651         let _: T<'static>;
652         let _: T<T>;
653         let _: T<T>;
-         let _: T;
+         let _: T() -> !;
655         let _: <T as ToOwned>::Owned;
656     }
657     /// TyKind::TraitObject


The actual stdout differed from the expected stdout
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/unpretty/exhaustive.hir/exhaustive.hir.stderr`
diff of stderr:

+ error: cannot glob-import all possible crates
+   --> $DIR/exhaustive.rs:33:5
+    |
---
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:141:17
+    |
+ LL |         expr as T<u8>;
+    |                 ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:147:38
+    |
+ LL |         builtin # type_ascribe(expr, T);
+    |                                      ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
---
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:299:13
+    |
+ LL |         x::(T, T) -> T;
+    |             ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:299:16
+    |
+ LL |         x::(T, T) -> T;
+    |                ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:299:22
+    |
+ LL |         x::(T, T) -> T;
+    |                      ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
---
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:478:33
+    |
+ LL |         pub type Type<'a> where T: 'a, = T;
+    |                                 ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +         use crate::prelude::T;
+    |
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:478:42
+    |
+ LL |         pub type Type<'a> where T: 'a, = T;
+    |                                          ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +         use crate::prelude::T;
+    |
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:572:24
+    |
+ LL |         let _: fn(u32, T, &str);
+    |                        ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
---
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:592:17
+    |
+ LL |         let T::<T> {};
+    |                 ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0422]: cannot find struct, variant or union type `T` in this scope
+   --> $DIR/exhaustive.rs:592:13
+    |
+ LL |         let T::<T> {};
+    |             ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0422]: cannot find struct, variant or union type `T` in this scope
+   --> $DIR/exhaustive.rs:593:13
+    |
+ LL |         let T::<'static> {};
+    |             ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0422]: cannot find struct, variant or union type `T` in this scope
+   --> $DIR/exhaustive.rs:594:13
+    |
+ LL |         let T { x };
+    |             ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0422]: cannot find struct, variant or union type `T` in this scope
+   --> $DIR/exhaustive.rs:595:13
+    |
+ LL |         let T { x: _x };
+    |             ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
---
+ 
+ error[E0422]: cannot find struct, variant or union type `T` in this scope
+   --> $DIR/exhaustive.rs:597:13
+    |
+ LL |         let T { x, .. };
+    |             ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0422]: cannot find struct, variant or union type `T` in this scope
+   --> $DIR/exhaustive.rs:598:13
+    |
+ LL |         let T { x: _x, .. };
+    |             ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0422]: cannot find struct, variant or union type `T` in this scope
+   --> $DIR/exhaustive.rs:599:13
+    |
+ LL |         let T { 0: _x, .. };
+    |             ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:600:14
+    |
+ LL |         let <T as ToOwned>::Owned {};
+    |              ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
---
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:745:17
+    |
+ LL |         let _: [T; 0];
+    |                 ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
---
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:760:17
+    |
+ LL |         let _: &T<T<T<T<T>>>>;
+    |                 ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:760:19
+    |
+ LL |         let _: &T<T<T<T<T>>>>;
+    |                   ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:760:21
+    |
+ LL |         let _: &T<T<T<T<T>>>>;
+    |                     ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:760:23
+    |
+ LL |         let _: &T<T<T<T<T>>>>;
+    |                       ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:760:25
+    |
+ LL |         let _: &T<T<T<T<T>>>>;
+    |                         ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:761:17
+    |
+ LL |         let _: &T<T<T<T<T> > > >;
+    |                 ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:761:19
+    |
+ LL |         let _: &T<T<T<T<T> > > >;
+    |                   ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:761:21
+    |
+ LL |         let _: &T<T<T<T<T> > > >;
+    |                     ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:761:23
+    |
+ LL |         let _: &T<T<T<T<T> > > >;
+    |                       ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:761:25
+    |
+ LL |         let _: &T<T<T<T<T> > > >;
+    |                         ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:768:19
+    |
+ LL |         let _: fn(T);
+    |                   ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:769:22
+    |
+ LL |         let _: fn(t: T);
+    |                      ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:782:17
+    |
+ LL |         let _: (T,);
+    |                 ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
---
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:789:16
+    |
+ LL |         let _: T<'static>;
+    |                ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:790:16
+    |
+ LL |         let _: T<T>;
+    |                ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:790:18
+    |
+ LL |         let _: T<T>;
+    |                  ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:791:16
+    |
+ LL |         let _: T::<T>;
+    |                ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:791:20
+    |
+ LL |         let _: T::<T>;
+    |                    ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:792:16
+    |
+ LL |         let _: T() -> !;
+    |                ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:793:17
+    |
+ LL |         let _: <T as ToOwned>::Owned;
+    |                 ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
---
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:839:20
+    |
+ LL |         let _: ty!(T);
+    |                    ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:840:20
+    |
+ LL |         let _: ty![T];
+    |                    ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:841:22
+    |
+ LL |         let _: ty! { T };
+    |                      ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
---
96 
- error[E0214]: parenthesized type parameters may only be used with a `Fn` trait
-   --> $DIR/exhaustive.rs:792:16
-    |
- LL |         let _: T() -> !;
-    |                ^^^^^^^^ only `Fn` traits may use parentheses
- 
103 error[E0562]: `impl Trait` is not allowed in the type of variable bindings
104   --> $DIR/exhaustive.rs:806:16
105    |

166    = help: add `#![feature(impl_trait_in_bindings)]` to the crate attributes to enable
167    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
168 
- error: aborting due to 20 previous errors
+ error: aborting due to 83 previous errors
170 
- Some errors have detailed explanations: E0214, E0562, E0697, E0703, E0728.
---
-   --> /checkout/tests/ui/unpretty/exhaustive.rs:147:38
-   --> /checkout/tests/ui/unpretty/exhaustive.rs:296:10
-   --> /checkout/tests/ui/unpretty/exhaustive.rs:297:10
-   --> /checkout/tests/ui/unpretty/exhaustive.rs:299:13
- LL |         x::(T, T) -> T;   //[hir]~ ERROR parenthesized type parameters
-   --> /checkout/tests/ui/unpretty/exhaustive.rs:299:16
- LL |         x::(T, T) -> T;   //[hir]~ ERROR parenthesized type parameters
-   --> /checkout/tests/ui/unpretty/exhaustive.rs:299:22
- LL |         x::(T, T) -> T;   //[hir]~ ERROR parenthesized type parameters
-   --> /checkout/tests/ui/unpretty/exhaustive.rs:345:31
-   --> /checkout/tests/ui/unpretty/exhaustive.rs:478:33
-   --> /checkout/tests/ui/unpretty/exhaustive.rs:478:42
-   --> /checkout/tests/ui/unpretty/exhaustive.rs:572:24
-   --> /checkout/tests/ui/unpretty/exhaustive.rs:591:13
---
-   --> /checkout/tests/ui/unpretty/exhaustive.rs:790:18
-   --> /checkout/tests/ui/unpretty/exhaustive.rs:791:16
-   --> /checkout/tests/ui/unpretty/exhaustive.rs:791:20
-   --> /checkout/tests/ui/unpretty/exhaustive.rs:792:16
- LL |         let _: T() -> !;    //[hir]~ ERROR parenthesized type parameters
-   --> /checkout/tests/ui/unpretty/exhaustive.rs:793:17
-   --> /checkout/tests/ui/unpretty/exhaustive.rs:816:17
-   --> /checkout/tests/ui/unpretty/exhaustive.rs:839:20
-   --> /checkout/tests/ui/unpretty/exhaustive.rs:840:20
-   --> /checkout/tests/ui/unpretty/exhaustive.rs:841:22
---
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:141:17
+    |
+ LL |         expr as T<u8>;
+    |                 ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:147:38
+    |
+ LL |         builtin # type_ascribe(expr, T);
+    |                                      ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
---
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:299:13
+    |
+ LL |         x::(T, T) -> T;
+    |             ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:299:16
+    |
+ LL |         x::(T, T) -> T;
+    |                ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:299:22
+    |
+ LL |         x::(T, T) -> T;
+    |                      ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
---
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:478:33
+    |
+ LL |         pub type Type<'a> where T: 'a, = T;
+    |                                 ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +         use crate::prelude::T;
+    |
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:478:42
+    |
+ LL |         pub type Type<'a> where T: 'a, = T;
+    |                                          ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +         use crate::prelude::T;
+    |
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:572:24
+    |
+ LL |         let _: fn(u32, T, &str);
+    |                        ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
---
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:592:17
+    |
+ LL |         let T::<T> {};
+    |                 ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0422]: cannot find struct, variant or union type `T` in this scope
+   --> $DIR/exhaustive.rs:592:13
+    |
+ LL |         let T::<T> {};
+    |             ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0422]: cannot find struct, variant or union type `T` in this scope
+   --> $DIR/exhaustive.rs:593:13
+    |
+ LL |         let T::<'static> {};
+    |             ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0422]: cannot find struct, variant or union type `T` in this scope
+   --> $DIR/exhaustive.rs:594:13
+    |
+ LL |         let T { x };
+    |             ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0422]: cannot find struct, variant or union type `T` in this scope
+   --> $DIR/exhaustive.rs:595:13
+    |
+ LL |         let T { x: _x };
+    |             ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
---
+ 
+ error[E0422]: cannot find struct, variant or union type `T` in this scope
+   --> $DIR/exhaustive.rs:597:13
+    |
+ LL |         let T { x, .. };
+    |             ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0422]: cannot find struct, variant or union type `T` in this scope
+   --> $DIR/exhaustive.rs:598:13
+    |
+ LL |         let T { x: _x, .. };
+    |             ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0422]: cannot find struct, variant or union type `T` in this scope
+   --> $DIR/exhaustive.rs:599:13
+    |
+ LL |         let T { 0: _x, .. };
+    |             ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:600:14
+    |
+ LL |         let <T as ToOwned>::Owned {};
+    |              ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
---
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:745:17
+    |
+ LL |         let _: [T; 0];
+    |                 ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
---
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:760:17
+    |
+ LL |         let _: &T<T<T<T<T>>>>;
+    |                 ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:760:19
+    |
+ LL |         let _: &T<T<T<T<T>>>>;
+    |                   ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:760:21
+    |
+ LL |         let _: &T<T<T<T<T>>>>;
+    |                     ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:760:23
+    |
+ LL |         let _: &T<T<T<T<T>>>>;
+    |                       ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:760:25
+    |
+ LL |         let _: &T<T<T<T<T>>>>;
+    |                         ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:761:17
+    |
+ LL |         let _: &T<T<T<T<T> > > >;
+    |                 ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:761:19
+    |
+ LL |         let _: &T<T<T<T<T> > > >;
+    |                   ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:761:21
+    |
+ LL |         let _: &T<T<T<T<T> > > >;
+    |                     ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:761:23
+    |
+ LL |         let _: &T<T<T<T<T> > > >;
+    |                       ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:761:25
+    |
+ LL |         let _: &T<T<T<T<T> > > >;
+    |                         ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:768:19
+    |
+ LL |         let _: fn(T);
+    |                   ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:769:22
+    |
+ LL |         let _: fn(t: T);
+    |                      ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:782:17
+    |
+ LL |         let _: (T,);
+    |                 ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
---
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:789:16
+    |
+ LL |         let _: T<'static>;
+    |                ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:790:16
+    |
+ LL |         let _: T<T>;
+    |                ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:790:18
+    |
+ LL |         let _: T<T>;
+    |                  ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:791:16
+    |
+ LL |         let _: T::<T>;
+    |                ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:791:20
+    |
+ LL |         let _: T::<T>;
+    |                    ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:792:16
+    |
+ LL |         let _: T() -> !;
+    |                ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:793:17
+    |
+ LL |         let _: <T as ToOwned>::Owned;
+    |                 ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
---
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:839:20
+    |
+ LL |         let _: ty!(T);
+    |                    ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:840:20
+    |
+ LL |         let _: ty![T];
+    |                    ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
+    |
+ 
+ error[E0412]: cannot find type `T` in this scope
+   --> $DIR/exhaustive.rs:841:22
+    |
+ LL |         let _: ty! { T };
+    |                      ^ not found in this scope
+    |
+ help: consider importing this type alias
+    |
+ LL +     use crate::prelude::T;
---
To only update this specific test, also pass `--test-args unpretty/exhaustive.rs`

error in revision `hir`: 2 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/unpretty/exhaustive.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--cfg" "hir" "--check-cfg" "cfg(test,FALSE,expanded,hir)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/unpretty/exhaustive.hir" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "--edition=2024" "-Zunpretty=hir"
--- stdout -------------------------------
//@ revisions: expanded hir
//@[expanded]compile-flags: -Zunpretty=expanded
//@[expanded]check-pass
//@[hir]compile-flags: -Zunpretty=hir
//@[hir]check-fail
//@ edition:2024

// Note: the HIR revision includes a `.stderr` file because there are some
// errors that only occur once we get past the AST.

#![feature(auto_traits)]
#![feature(box_patterns)]
#![feature(builtin_syntax)]
#![feature(const_trait_impl)]
---
#![feature(trace_macros)]
#![feature(trait_alias)]
#![feature(try_blocks)]
#![feature(yeet_expr)]
#![allow(incomplete_features)]
#[attr = MacroUse {arguments: UseAll}]
extern crate std;
#[prelude_import]
use std::prelude::rust_2024::*;

#[prelude_import]
use self::prelude::*;

---

    /// outer single-line doc comment
    /**
     * outer multi-line doc comment
     */
    #[doc = "outer doc attribute"]
    #[doc = "macro"]
    #[allow()]
    #[attr = Repr {reprs: [ReprC]}]
    struct Struct;
}

mod expressions {
    /// ExprKind::Array
    fn expr_array() {
        [];
        [true];
        [true];
        [true, true];
        ["long........................................................................"];
        ["long............................................................",
                true];
    }

    /// ExprKind::ConstBlock
    fn expr_const_block() {
---
                };
    }

    /// ExprKind::Call
    fn expr_call() {
        let f;
        f();
        f::<u8>();
        f::<1>();
        f::<'static, u8, 1>();
        f(true);
        f(true);
        ()();
    }

    /// ExprKind::MethodCall
    fn expr_method_call() {
        let x;
        x.f();
        x.f::<u8>();
        x.collect::<Vec<_>>();
    }

    /// ExprKind::Tup
    fn expr_tup() { (); (true,); (true, false); (true, false); }

    /// ExprKind::Binary
    fn expr_binary() {
        let (a, b, c, d, x, y);
        true || false;
        true || false && false;
        a < 1 && 2 < b && c > 3 && 4 > d;
        a & b & !c;
        a + b * c - d + -1 * -2 - -3;
        x = !y;
    }

    /// ExprKind::Unary
    fn expr_unary() { let expr; *expr; !expr; -expr; }

    /// ExprKind::Lit
    fn expr_lit() { 'x'; 1000i8; 1.00000000000000000000001; }

    /// ExprKind::Cast
    fn expr_cast() { let expr; expr as T; expr as T<u8>; }

    /// ExprKind::Type
    fn expr_type() { let expr; type_ascribe!(expr, T); }

    /// ExprKind::Let
    fn expr_let() {
        let b;
        if let Some(a) = b { }
        if let _ = true && false { }
        if let _ = (true && false) { }
    }

    /// ExprKind::If
    fn expr_if() {
        if true { }
        if !true { }
        if let true = true { } else { }
        if true { } else if false { }
        if true { } else if false { } else { }
        if true { return; } else if false { 0 } else { 0 }
    }

    /// ExprKind::While
    fn expr_while() {
        loop { if false { } else { break; } }
        'a: loop { if false { } else { break; } }
        loop { if let true = true { } else { break; } }
    }

    /// ExprKind::ForLoop
    fn expr_for_loop() {
        let x;
        {
            let _t =
                match #[lang = "into_iter"](x) {
                    mut iter =>
                        loop {
                            match #[lang = "next"](&mut iter) {
                                #[lang = "None"] {} => break,
                                #[lang = "Some"] {  0: _ } => { }
                            }
                        },
                };
            _t
        };
        {
            let _t =
                match #[lang = "into_iter"](x) {
                    mut iter =>
                        'a: loop {
                            match #[lang = "next"](&mut iter) {
                                #[lang = "None"] {} => break,
                                #[lang = "Some"] {  0: _ } => { }
                            }
                        },
                };
            _t
        }
    }

    /// ExprKind::Loop
    fn expr_loop() { loop { } 'a: loop { } }

    /// ExprKind::Match
    fn expr_match() {
        let value;
        match value { }
        match value { ok => 1, }
        match value { ok => 1, err => 0, }
    }

    /// ExprKind::Closure
    fn expr_closure() {
        let value;
        || { };
        |x| { };
        |x: u8| { };
        || ();
        move || value;
        || |mut _task_context: ResumeTy| { { let _t = value; _t } };
        move || |mut _task_context: ResumeTy| { { let _t = value; _t } };
        || value; //[hir]~ ERROR closures cannot be static
        move || value; //[hir]~ ERROR closures cannot be static
        || |mut _task_context: ResumeTy| { { let _t = value; _t } };
        move || |mut _task_context: ResumeTy| { { let _t = value; _t } };
        || -> u8 { value };
        1 + (|| { });
    }

    /// ExprKind::Block
    fn expr_block() {
        { }
        unsafe { }
        'a: { }
        #[allow()]
        { }
        #[allow()]
        { }
    }

    /// ExprKind::Gen
    fn expr_gen() {
        |mut _task_context: ResumeTy| { };
        move |mut _task_context: ResumeTy| { };
        || { };
        move || { };
        |mut _task_context: ResumeTy| { };
        move |mut _task_context: ResumeTy| { };
    }

    /// ExprKind::Await
    fn expr_await() {
        let fut;
        {
            fut; //[hir]~ ERROR `await` is only allowed
            (/*ERROR*/)
        };
    }

    /// ExprKind::TryBlock
    fn expr_try_block() {
        { #[lang = "from_output"](()) }
        { return; #[lang = "from_output"](()) }
    }

    /// ExprKind::Assign
    fn expr_assign() { let expr; expr = true; }

    /// ExprKind::AssignOp
    fn expr_assign_op() { let expr; expr += true; }

    /// ExprKind::Field
    fn expr_field() { let expr; expr.field; expr.0; }

    /// ExprKind::Index
    fn expr_index() { let expr; expr[true]; }

    /// ExprKind::Range
    fn expr_range() {
        let (lo, hi);
        #[lang = "RangeFull"] {  };
        #[lang = "RangeTo"] { end: hi };
        #[lang = "RangeFrom"] { start: lo };
        #[lang = "Range"] { start: lo, end: hi };
        #[lang = "Range"] { start: lo, end: hi };
        #[lang = "RangeToInclusive"] { end: hi };
        #[lang = "range_inclusive_new"](lo, hi);
        #[lang = "range_inclusive_new"](-2, -1);
    }

    /// ExprKind::Underscore
    fn expr_underscore() {
        (/*ERROR*/); //[hir]~ ERROR in expressions, `_` can only
    }

    /// ExprKind::Path
    fn expr_path() {
        let x;
        crate::expressions::expr_path;
        crate::expressions::expr_path::<'static>;
        <T as Default>::default;
        <T as ::core::default::Default>::default;
        x; //[hir]~ ERROR parenthesized type parameters
        x::<T, T>; //[hir]~ ERROR parenthesized type parameters
        crate::expressions::expr_path;
        //[hir]~^ ERROR parenthesized type parameters
        //[hir]~| ERROR parenthesized type parameters
        core::marker::PhantomData;
        //[hir]~^ ERROR parenthesized type parameters
        //[hir]~| ERROR parenthesized type parameters
    }

    /// ExprKind::AddrOf
    fn expr_addr_of() {
        let expr;
        &expr;
        &mut expr;
        &raw const expr;
        &raw mut expr;
    }

    /// ExprKind::Break
    fn expr_break() { 'a: { break; break 'a; break true; break 'a true; } }

    /// ExprKind::Continue
    fn expr_continue() { 'a: { continue; continue 'a; } }

    /// ExprKind::Ret
    fn expr_ret() { return; return true; }


---




        //[hir]~ ERROR `yield` can only be used





---


        // ...

        //[hir]~ ERROR invalid ABI





---




        //[hir]~ ERROR `..` patterns are not allowed here





---




        //[hir]~ ERROR parenthesized type parameters


        //[hir]~ ERROR `impl Trait` is not allowed
        //[hir]~ ERROR `impl Trait` is not allowed
        //[hir]~ ERROR `impl Trait` is not allowed
        //[hir]~ ERROR `impl Trait` is not allowed
        //[hir]~ ERROR `impl Trait` is not allowed
        //[hir]~ ERROR `impl Trait` is not allowed









        { offset_of!(T, field) };
    }
    /// ExprKind::MacCall
    fn expr_mac_call() { "..."; "..."; "..."; }
    /// ExprKind::Struct
    fn expr_struct() {
        struct Struct {
        }
        let (x, base);
        Struct {  };
        <Struct as ToOwned>::Owned {  };
        Struct { .. };
        Struct { ..base };
        Struct { x };
        Struct { x, ..base };
        Struct { x: true };
        Struct { x: true, .. };
        Struct { x: true, ..base };
        Struct { 0: true, ..base };
    }
    /// ExprKind::Repeat
    fn expr_repeat() { [(); 0]; }
    /// ExprKind::Paren
    fn expr_paren() { let expr; expr; }
    /// ExprKind::Try
    fn expr_try() {
        let expr;
        match #[lang = "branch"](expr) {
            #[lang = "Break"] {  0: residual } => #[allow(unreachable_code)]
                return #[lang = "from_residual"](residual),
            #[lang = "Continue"] {  0: val } => #[allow(unreachable_code)]
                val,
        };
    }
    /// ExprKind::Yield
    fn expr_yield() { yield (); yield true; }
    /// ExprKind::Yeet
    fn expr_yeet() {
        return #[lang = "from_yeet"](());
        return #[lang = "from_yeet"](0);
    }
    /// ExprKind::Become
    fn expr_become() { become true; }
    /// ExprKind::IncludedBytes
    fn expr_include_bytes() {
        b"data for include_bytes in ../expanded-exhaustive.rs\n";
    }
    /// ExprKind::FormatArgs
    fn expr_format_args() {
        let expr;
        format_arguments::new_const(&[]);
        {
            super let args = [format_argument::new_display(&expr)];
            format_arguments::new_v1(&[""], &args)
        };
    }
}
mod items {
    /// ItemKind::ExternCrate
    mod item_extern_crate {
        extern crate core;
        extern crate self as unpretty;
        extern crate core as _;
    }
    /// ItemKind::Use
    mod item_use {
        use ::{};
        use crate::expressions;
        use crate::items::item_use;
        use core::*;
    }
    /// ItemKind::Static
    mod item_static {
        static A: () = { };
        static mut B: () = { };
    }
    /// ItemKind::Const
    mod item_const {
        const A: () = { };
        trait TraitItems {
            const
            B:
            ();
            const
            C:
---
    mod item_fn {
        const unsafe extern "C" fn f() { }
        async unsafe extern "C" fn g()
            ->
                /*impl Trait*/ |mut _task_context: ResumeTy|
            { { let _t = { }; _t } }
        fn h<'a, T>() where T: 'a { }
        trait TraitItems {
            unsafe extern "C" fn f();
        }
        impl TraitItems for _ {
            unsafe extern "C" fn f() { }
        }
    }
    /// ItemKind::Mod
    mod item_mod { }
    /// ItemKind::ForeignMod
    mod item_foreign_mod {
        extern "Rust" { }
        extern "C" { }
    }
    /// ItemKind::GlobalAsm: see exhaustive-asm.rs
    /// ItemKind::TyAlias
    mod item_ty_alias {
        type Type<'a> where T: 'a = T;
    }
    /// ItemKind::Enum
    mod item_enum {
        enum Void { }
        enum Empty {
            Unit,
            Tuple(),
            Struct {
                },
        }
        enum Generic<'a, T> where T: 'a {
            Tuple(T),
            Struct {
                    t: T,
                },
        }
    }
    /// ItemKind::Struct
    mod item_struct {
        struct Unit;
        struct Tuple();
        struct Newtype(Unit);
        struct Struct {
        }
        struct Generic<'a, T> where T: 'a {
            t: T,
        }
    }
    /// ItemKind::Union
    mod item_union {
        union Generic<'a, T> where T: 'a {
            t: T,
        }
    }
    /// ItemKind::Trait
    mod item_trait {
        auto unsafe trait Send { }
        trait Trait<'a>: Sized where Self: 'a { }
    }
    /// ItemKind::TraitAlias
    mod item_trait_alias {
        trait Trait<T> = Sized where for<'a> T: 'a;
    }
    /// ItemKind::Impl
    mod item_impl {
        impl () { }
        impl <T> () { }
        impl Default for () { }
        impl <T> const Default for () { }
    }
    /// ItemKind::MacCall
    mod item_mac_call { }
    /// ItemKind::MacroDef
    mod item_macro_def {
        macro_rules! mac { () => {...}; }
        macro stringify { () => {} }
    }
    /// ItemKind::Delegation
    /** FIXME: todo */
    mod item_delegation { }
    /// ItemKind::DelegationMac
    /** FIXME: todo */
    mod item_delegation_mac { }
}
mod patterns {
    /// PatKind::Missing
    fn pat_missing() { let _: for fn(u32, T, &'_ str); }
    /// PatKind::Wild
    fn pat_wild() { let _; }
    /// PatKind::Ident
    fn pat_ident() {
        let x;
        let ref x;
        let mut x;
        let ref mut x;
        let ref mut x@_;
    }
    /// PatKind::Struct
    fn pat_struct() {
        let T {};
        let T::<T> {};
        let T::<'static> {};
        let T {  x };
        let T {  x: _x };
        let T { .. };
        let T {  x, .. };
        let T {  x: _x, .. };
        let T {  0: _x, .. };
        let <T as ToOwned>::Owned {};
    }
    /// PatKind::TupleStruct
    fn pat_tuple_struct() {
        struct Tuple();
        let Tuple();
        let Tuple::<T>();
        let Tuple::<'static>();
        let Tuple(x);
        let Tuple(..);
        let Tuple(x, ..);
    }
    /// PatKind::Or
    fn pat_or() { let true | false; let true; let true | false; }
    /// PatKind::Path
    fn pat_path() {
        let core::marker::PhantomData;
        let core::marker::PhantomData::<T>;
        let core::marker::PhantomData::<'static>;
        let <T as Trait>::CONST;
    }
    /// PatKind::Tuple
    fn pat_tuple() { let (); let (true,); let (true, false); }
    /// PatKind::Box
    fn pat_box() { let box pat; }
    /// PatKind::Deref
    fn pat_deref() { let deref!(pat); }
    /// PatKind::Ref
    fn pat_ref() { let &pat; let &mut pat; }
    /// PatKind::Expr
    fn pat_expr() { let 1000i8; let -""; }
    /// PatKind::Range
    fn pat_range() { let ..1; let 0...; let 0..1; let 0...1; let -2...-1; }
    /// PatKind::Slice
    fn pat_slice() { let []; let [true]; let [true]; let [true, false]; }
    /// PatKind::Rest
    fn pat_rest() { let _; }
    /// PatKind::Never
    fn pat_never() { let !; let Some(!); }
    /// PatKind::Paren
    fn pat_paren() { let pat; }
    /// PatKind::MacCall
    fn pat_mac_call() { let ""; let ""; let ""; }
}
mod statements {
    /// StmtKind::Let
    fn stmt_let() {
        let _;
        let _ = true;
        let _: T = true;
        let _ = true else { return; };
    }
    /// StmtKind::Item
    fn stmt_item() {
        struct Struct {
        }
        struct Unit;
    }
    /// StmtKind::Expr
    fn stmt_expr() { () }
    /// StmtKind::Semi
    fn stmt_semi() { 1 + 1; }
    /// StmtKind::Empty
    fn stmt_empty() { }
    /// StmtKind::MacCall
    fn stmt_mac_call() { "..."; "..."; "..."; }
}
mod types {
    /// TyKind::Slice
    fn ty_slice() { let _: [T]; }
    /// TyKind::Array
    fn ty_array() { let _: [T; 0]; }
    /// TyKind::Ptr
    fn ty_ptr() { let _: *const T; let _: *mut T; }
    /// TyKind::Ref
    fn ty_ref() {
        let _: &T;
        let _: &mut T;
        let _: &'static T;
        let _: &'static mut [T];
        let _: &T<T<T<T<T>>>>;
        let _: &T<T<T<T<T>>>>;
    }
    /// TyKind::BareFn
    fn ty_bare_fn() {
        let _: fn();
        let _: fn() -> ();
        let _: fn(T);
        let _: fn(t: T);
        let _: fn();
        let _: for<'a> fn();
    }
    /// TyKind::Never
    fn ty_never() { let _: !; }
    /// TyKind::Tup
    fn ty_tup() { let _: (); let _: (T,); let _: (T, T); }
    /// TyKind::Path
    fn ty_path() {
        let _: T;
        let _: T<'static>;
        let _: T<T>;
        let _: T<T>;
        let _: T() -> !;
        let _: <T as ToOwned>::Owned;
    }
    /// TyKind::TraitObject
    fn ty_trait_object() {
        let _: dyn Send;
        let _: dyn Send + 'static;
        let _: dyn Send + 'static;
        let _: dyn for<'a> Send;
    }
    /// TyKind::ImplTrait
    const fn ty_impl_trait() {
        let _: (/*ERROR*/);
        let _: (/*ERROR*/);
        let _: (/*ERROR*/);
        let _: (/*ERROR*/);
        let _: (/*ERROR*/);
        let _: (/*ERROR*/);
    }
    /// TyKind::Paren
    fn ty_paren() { let _: T; }
    /// TyKind::Typeof
    /** unused for now */
    fn ty_typeof() { }
    /// TyKind::Infer
    fn ty_infer() { let _: _; }
    /// TyKind::ImplicitSelf
    /** there is no syntax for this */
    fn ty_implicit_self() { }
    /// TyKind::MacCall
    fn ty_mac_call() {
        macro_rules! ty { ($ty:ty) => { $ty } }
        let _: T;
        let _: T;
        let _: T;
    }
    /// TyKind::CVarArgs
    /** FIXME: todo */
    fn ty_c_var_args() { }
    /// TyKind::Pat
    fn ty_pat() { let _: u32 is 1..=RangeMax; }
}
mod visibilities {
    /// VisibilityKind::Public
    mod visibility_public {
        struct Pub;
    }
    /// VisibilityKind::Restricted
    mod visibility_restricted {
        struct PubCrate;
        struct PubSelf;
        struct PubSuper;
        struct PubInCrate;
        struct PubInSelf;
        struct PubInSuper;
        struct PubInCrateVisibilities;
        struct PubInSelfSuper;
        struct PubInSuperMod;
    }
}
------------------------------------------
--- stderr -------------------------------
error: cannot glob-import all possible crates
---

error[E0412]: cannot find type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:141:17
   |
LL |         expr as T<u8>;
   |                 ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
   |

error[E0412]: cannot find type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:147:38
   |
LL |         builtin # type_ascribe(expr, T);
   |                                      ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
---

error[E0412]: cannot find type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:299:13
   |
LL |         x::(T, T) -> T;   //[hir]~ ERROR parenthesized type parameters
   |             ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
   |

error[E0412]: cannot find type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:299:16
   |
LL |         x::(T, T) -> T;   //[hir]~ ERROR parenthesized type parameters
   |                ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
   |

error[E0412]: cannot find type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:299:22
   |
LL |         x::(T, T) -> T;   //[hir]~ ERROR parenthesized type parameters
   |                      ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
---

error[E0412]: cannot find type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:478:33
   |
LL |         pub type Type<'a> where T: 'a, = T;
   |                                 ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +         use crate::prelude::T;
   |

error[E0412]: cannot find type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:478:42
   |
LL |         pub type Type<'a> where T: 'a, = T;
   |                                          ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +         use crate::prelude::T;
   |

error[E0412]: cannot find type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:572:24
   |
LL |         let _: fn(u32, T, &str);
   |                        ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
---

error[E0422]: cannot find struct, variant or union type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:593:13
   |
LL |         let T::<'static> {};
   |             ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
   |

error[E0422]: cannot find struct, variant or union type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:594:13
   |
LL |         let T { x };
   |             ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
   |

error[E0422]: cannot find struct, variant or union type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:595:13
   |
LL |         let T { x: _x };
   |             ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
---

error[E0422]: cannot find struct, variant or union type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:597:13
   |
LL |         let T { x, .. };
   |             ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
   |

error[E0422]: cannot find struct, variant or union type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:598:13
   |
LL |         let T { x: _x, .. };
   |             ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
   |

error[E0422]: cannot find struct, variant or union type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:599:13
   |
LL |         let T { 0: _x, .. };
   |             ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
   |

error[E0412]: cannot find type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:600:14
   |
LL |         let <T as ToOwned>::Owned {};
   |              ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
---

error[E0412]: cannot find type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:760:17
   |
LL |         let _: &T<T<T<T<T>>>>;
   |                 ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
   |

error[E0412]: cannot find type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:760:19
   |
LL |         let _: &T<T<T<T<T>>>>;
   |                   ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
   |

error[E0412]: cannot find type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:760:21
   |
LL |         let _: &T<T<T<T<T>>>>;
   |                     ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
   |

error[E0412]: cannot find type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:760:23
   |
LL |         let _: &T<T<T<T<T>>>>;
   |                       ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
   |

error[E0412]: cannot find type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:760:25
   |
LL |         let _: &T<T<T<T<T>>>>;
   |                         ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
   |

error[E0412]: cannot find type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:761:17
   |
LL |         let _: &T<T<T<T<T> > > >;
   |                 ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
   |

error[E0412]: cannot find type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:761:19
   |
LL |         let _: &T<T<T<T<T> > > >;
   |                   ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
   |

error[E0412]: cannot find type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:761:21
   |
LL |         let _: &T<T<T<T<T> > > >;
   |                     ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
   |

error[E0412]: cannot find type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:761:23
   |
LL |         let _: &T<T<T<T<T> > > >;
   |                       ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
   |

error[E0412]: cannot find type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:761:25
   |
LL |         let _: &T<T<T<T<T> > > >;
   |                         ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
   |

error[E0412]: cannot find type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:768:19
   |
LL |         let _: fn(T);
   |                   ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
   |

error[E0412]: cannot find type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:769:22
   |
LL |         let _: fn(t: T);
   |                      ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
---

error[E0412]: cannot find type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:789:16
   |
LL |         let _: T<'static>;
   |                ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
---

error[E0412]: cannot find type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:792:16
   |
LL |         let _: T() -> !;    //[hir]~ ERROR parenthesized type parameters
   |                ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
   |

error[E0412]: cannot find type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:793:17
   |
LL |         let _: <T as ToOwned>::Owned;
   |                 ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
---

error[E0412]: cannot find type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:839:20
   |
LL |         let _: ty!(T);
   |                    ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
   |

error[E0412]: cannot find type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:840:20
   |
LL |         let _: ty![T];
   |                    ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
   |

error[E0412]: cannot find type `T` in this scope
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:841:22
   |
LL |         let _: ty! { T };
   |                      ^ not found in this scope
   |
help: consider importing this type alias
   |
LL +     use crate::prelude::T;
   |

error[E0697]: closures cannot be static
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:209:9
   |
LL |         static || value;            //[hir]~ ERROR closures cannot be static
   |         ^^^^^^^^^

error[E0697]: closures cannot be static
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:210:9
   |
LL |         static move || value;       //[hir]~ ERROR closures cannot be static
   |         ^^^^^^^^^^^^^^

error[E0728]: `await` is only allowed inside `async` functions and blocks
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:239:13
   |
LL |     fn expr_await() {
   |     --------------- this is not `async`
LL |         let fut;
LL |         fut.await;  //[hir]~ ERROR `await` is only allowed
   |             ^^^^^ only allowed inside `async` functions and blocks

error: in expressions, `_` can only be used on the left-hand side of an assignment
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:288:9
   |
LL |         _;      //[hir]~ ERROR in expressions, `_` can only
   |         ^ `_` not allowed here

error[E0214]: parenthesized type parameters may only be used with a `Fn` trait
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:298:9
   |
LL |         x::();            //[hir]~ ERROR parenthesized type parameters
   |         ^^^^^ only `Fn` traits may use parentheses

error[E0214]: parenthesized type parameters may only be used with a `Fn` trait
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:299:9
   |
LL |         x::(T, T) -> T;   //[hir]~ ERROR parenthesized type parameters
   |         ^^^^^^^^^^^^^^ only `Fn` traits may use parentheses
   |
help: use angle brackets instead
   |
LL -         x::(T, T) -> T;   //[hir]~ ERROR parenthesized type parameters
LL +         x::<T, T> -> T;   //[hir]~ ERROR parenthesized type parameters
   |

error[E0214]: parenthesized type parameters may only be used with a `Fn` trait
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:300:9
   |
LL |         crate::() -> ()::expressions::() -> ()::expr_path;
   |         ^^^^^^^^^^^^^^^ only `Fn` traits may use parentheses

error[E0214]: parenthesized type parameters may only be used with a `Fn` trait
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:300:26
   |
LL |         crate::() -> ()::expressions::() -> ()::expr_path;
   |                          ^^^^^^^^^^^^^^^^^^^^^ only `Fn` traits may use parentheses

error[E0214]: parenthesized type parameters may only be used with a `Fn` trait
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:303:9
   |
LL |         core::()::marker::()::PhantomData;
   |         ^^^^^^^^ only `Fn` traits may use parentheses

error[E0214]: parenthesized type parameters may only be used with a `Fn` trait
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:303:19
   |
LL |         core::()::marker::()::PhantomData;
   |                   ^^^^^^^^^^ only `Fn` traits may use parentheses

error: `yield` can only be used in `#[coroutine]` closures, or `gen` blocks
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:390:9
   |
LL |         yield;          //[hir]~ ERROR `yield` can only be used
   |         ^^^^^
   |
help: use `#[coroutine]` to make this closure a coroutine
   |
LL |     #[coroutine] fn expr_yield() {
   |     ++++++++++++

error[E0703]: invalid ABI: found `C++`
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:470:23
   |
LL |         unsafe extern "C++" {}  //[hir]~ ERROR invalid ABI
   |                       ^^^^^ invalid ABI
   |
   = note: invoke `rustc --print=calling-conventions` for a full list of supported calling conventions

error: `..` patterns are not allowed here
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:677:13
   |
LL |         let ..;     //[hir]~ ERROR `..` patterns are not allowed here
   |             ^^
   |
   = note: only allowed in tuple, tuple struct, and slice patterns

error[E0562]: `impl Trait` is not allowed in the type of variable bindings
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:806:16
   |
LL |         let _: impl Send;               //[hir]~ ERROR `impl Trait` is not allowed
   |                ^^^^^^^^^
   |
   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
   = note: see issue #63065 <https://github.com/rust-lang/rust/issues/63065> for more information
   = help: add `#![feature(impl_trait_in_bindings)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0562]: `impl Trait` is not allowed in the type of variable bindings
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:807:16
   |
LL |         let _: impl Send + 'static;     //[hir]~ ERROR `impl Trait` is not allowed
   |                ^^^^^^^^^^^^^^^^^^^
   |
   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
   = note: see issue #63065 <https://github.com/rust-lang/rust/issues/63065> for more information
   = help: add `#![feature(impl_trait_in_bindings)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0562]: `impl Trait` is not allowed in the type of variable bindings
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:808:16
   |
LL |         let _: impl 'static + Send;     //[hir]~ ERROR `impl Trait` is not allowed
   |                ^^^^^^^^^^^^^^^^^^^
   |
   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
   = note: see issue #63065 <https://github.com/rust-lang/rust/issues/63065> for more information
   = help: add `#![feature(impl_trait_in_bindings)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0562]: `impl Trait` is not allowed in the type of variable bindings
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:809:16
   |
LL |         let _: impl ?Sized;             //[hir]~ ERROR `impl Trait` is not allowed
   |                ^^^^^^^^^^^
   |
   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
   = note: see issue #63065 <https://github.com/rust-lang/rust/issues/63065> for more information
   = help: add `#![feature(impl_trait_in_bindings)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0562]: `impl Trait` is not allowed in the type of variable bindings
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:810:16
   |
LL |         let _: impl [const] Clone;       //[hir]~ ERROR `impl Trait` is not allowed
   |                ^^^^^^^^^^^^^^^^^^
   |
   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
   = note: see issue #63065 <https://github.com/rust-lang/rust/issues/63065> for more information
   = help: add `#![feature(impl_trait_in_bindings)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0562]: `impl Trait` is not allowed in the type of variable bindings
##[error]  --> /checkout/tests/ui/unpretty/exhaustive.rs:811:16
   |
LL |         let _: impl for<'a> Send;       //[hir]~ ERROR `impl Trait` is not allowed
   |                ^^^^^^^^^^^^^^^^^
   |
   = note: `impl Trait` is only allowed in arguments and return types of functions and methods
   = note: see issue #63065 <https://github.com/rust-lang/rust/issues/63065> for more information
   = help: add `#![feature(impl_trait_in_bindings)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error: aborting due to 83 previous errors

Some errors have detailed explanations: E0214, E0405, E0412, E0422, E0562, E0697, E0703, E0728.
For more information about an error, try `rustc --explain E0214`.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants