2023-06-09 08:30:08 -05:00
|
|
|
#![crate_name = "user"]
|
|
|
|
//@ aux-crate:default_generic_args=default-generic-args.rs
|
|
|
|
//@ edition:2021
|
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has user/type.BoxedStr.html
|
|
|
|
//@ has - '//*[@class="rust item-decl"]//code' "Box<str>"
|
2023-06-09 08:30:08 -05:00
|
|
|
pub use default_generic_args::BoxedStr;
|
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has user/type.IntMap.html
|
|
|
|
//@ has - '//*[@class="rust item-decl"]//code' "HashMap<i64, u64>"
|
2023-06-09 08:30:08 -05:00
|
|
|
pub use default_generic_args::IntMap;
|
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has user/type.T0.html
|
|
|
|
//@ has - '//*[@class="rust item-decl"]//code' "TyPair<i32>"
|
2023-06-09 08:30:08 -05:00
|
|
|
pub use default_generic_args::T0;
|
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has user/type.T1.html
|
|
|
|
//@ has - '//*[@class="rust item-decl"]//code' "TyPair<i32, u32>"
|
2023-06-09 08:30:08 -05:00
|
|
|
pub use default_generic_args::T1;
|
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has user/type.T2.html
|
|
|
|
//@ has - '//*[@class="rust item-decl"]//code' "TyPair<i32, K>"
|
2023-06-09 08:30:08 -05:00
|
|
|
pub use default_generic_args::T2;
|
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has user/type.T3.html
|
|
|
|
//@ has - '//*[@class="rust item-decl"]//code' "TyPair<Q>"
|
2023-06-09 08:30:08 -05:00
|
|
|
pub use default_generic_args::T3;
|
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has user/type.C0.html
|
|
|
|
//@ has - '//*[@class="rust item-decl"]//code' "CtPair<43>"
|
2023-06-09 08:30:08 -05:00
|
|
|
pub use default_generic_args::C0;
|
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has user/type.C1.html
|
|
|
|
//@ has - '//*[@class="rust item-decl"]//code' "CtPair<0, 1>"
|
2023-06-09 08:30:08 -05:00
|
|
|
pub use default_generic_args::C1;
|
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has user/type.C2.html
|
|
|
|
//@ has - '//*[@class="rust item-decl"]//code' "CtPair<default_generic_args::::C2::{constant#0}, 3>"
|
2023-06-09 08:30:08 -05:00
|
|
|
pub use default_generic_args::C2;
|
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has user/type.R0.html
|
|
|
|
//@ has - '//*[@class="rust item-decl"]//code' "Re<'q>"
|
2023-06-09 08:30:08 -05:00
|
|
|
pub use default_generic_args::R0;
|
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has user/type.R1.html
|
|
|
|
//@ has - '//*[@class="rust item-decl"]//code' "Re<'q>"
|
2023-06-09 08:30:08 -05:00
|
|
|
pub use default_generic_args::R1;
|
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has user/type.R2.html
|
2023-06-09 08:30:08 -05:00
|
|
|
// Check that we consider regions:
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has - '//*[@class="rust item-decl"]//code' "Re<'q, &'static ()>"
|
2023-06-09 08:30:08 -05:00
|
|
|
pub use default_generic_args::R2;
|
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has user/type.H0.html
|
2023-06-09 08:30:08 -05:00
|
|
|
// Check that we handle higher-ranked regions correctly:
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has - '//*[@class="rust item-decl"]//code' "fn(_: for<'a> fn(_: Re<'a>))"
|
2023-06-09 08:30:08 -05:00
|
|
|
pub use default_generic_args::H0;
|
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has user/type.H1.html
|
2023-06-09 08:30:08 -05:00
|
|
|
// Check that we don't conflate distinct universially quantified regions (#1):
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has - '//*[@class="rust item-decl"]//code' "for<'b> fn(_: for<'a> fn(_: Re<'a, &'b ()>))"
|
2023-06-09 08:30:08 -05:00
|
|
|
pub use default_generic_args::H1;
|
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has user/type.H2.html
|
2023-06-09 08:30:08 -05:00
|
|
|
// Check that we don't conflate distinct universially quantified regions (#2):
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has - '//*[@class="rust item-decl"]//code' "for<'a> fn(_: for<'b> fn(_: Re<'a, &'b ()>))"
|
2023-06-09 08:30:08 -05:00
|
|
|
pub use default_generic_args::H2;
|
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has user/type.P0.html
|
|
|
|
//@ has - '//*[@class="rust item-decl"]//code' "Proj<()>"
|
2023-06-09 08:30:08 -05:00
|
|
|
pub use default_generic_args::P0;
|
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has user/type.P1.html
|
|
|
|
//@ has - '//*[@class="rust item-decl"]//code' "Proj<(), bool>"
|
2023-06-09 08:30:08 -05:00
|
|
|
pub use default_generic_args::P1;
|
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has user/type.P2.html
|
|
|
|
//@ has - '//*[@class="rust item-decl"]//code' "Proj<(), ()>"
|
2023-06-09 08:30:08 -05:00
|
|
|
pub use default_generic_args::P2;
|
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has user/type.A0.html
|
|
|
|
//@ has - '//*[@class="rust item-decl"]//code' "Alpha;"
|
2023-06-09 08:30:08 -05:00
|
|
|
pub use default_generic_args::A0;
|
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has user/type.A1.html
|
2024-01-08 15:31:50 -06:00
|
|
|
// Demonstrates that we currently don't elide generic arguments that are alpha-equivalent to their
|
|
|
|
// respective generic parameter (after instantiation) for perf reasons (it would require us to
|
|
|
|
// create an inference context).
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has - '//*[@class="rust item-decl"]//code' "Alpha<for<'arbitrary> fn(_: &'arbitrary ())>"
|
2023-06-09 08:30:08 -05:00
|
|
|
pub use default_generic_args::A1;
|
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has user/type.M0.html
|
2023-06-09 08:30:08 -05:00
|
|
|
// Test that we don't elide `u64` even if it coincides with `A`'s default precisely because
|
|
|
|
// `()` is not the default of `B`. Mindlessly eliding `u64` would lead to `M<()>` which is a
|
|
|
|
// different type (`M<(), u64>` versus `M<u64, ()>`).
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has - '//*[@class="rust item-decl"]//code' "Multi<u64, ()>"
|
2023-06-09 08:30:08 -05:00
|
|
|
pub use default_generic_args::M0;
|
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has user/type.D0.html
|
|
|
|
//@ has - '//*[@class="rust item-decl"]//code' "dyn for<'a> Trait0<'a>"
|
2024-01-08 15:31:50 -06:00
|
|
|
pub use default_generic_args::D0;
|
|
|
|
|
|
|
|
// Regression test for issue #119529.
|
|
|
|
// Check that we correctly elide def ty&const args inside trait object types.
|
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has user/type.D1.html
|
|
|
|
//@ has - '//*[@class="rust item-decl"]//code' "dyn Trait1<T>"
|
2024-01-08 15:31:50 -06:00
|
|
|
pub use default_generic_args::D1;
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has user/type.D2.html
|
|
|
|
//@ has - '//*[@class="rust item-decl"]//code' "dyn Trait1<(), K>"
|
2024-01-08 15:31:50 -06:00
|
|
|
pub use default_generic_args::D2;
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has user/type.D3.html
|
|
|
|
//@ has - '//*[@class="rust item-decl"]//code' "dyn Trait1;"
|
2024-01-08 15:31:50 -06:00
|
|
|
pub use default_generic_args::D3;
|