diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:13 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:13 +0000 |
commit | 218caa410aa38c29984be31a5229b9fa717560ee (patch) | |
tree | c54bd55eeb6e4c508940a30e94c0032fbd45d677 /src/test/ui/associated-type-bounds/fn-where.rs | |
parent | Releasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip |
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/associated-type-bounds/fn-where.rs')
-rw-r--r-- | src/test/ui/associated-type-bounds/fn-where.rs | 79 |
1 files changed, 0 insertions, 79 deletions
diff --git a/src/test/ui/associated-type-bounds/fn-where.rs b/src/test/ui/associated-type-bounds/fn-where.rs deleted file mode 100644 index 9c4f82ac9..000000000 --- a/src/test/ui/associated-type-bounds/fn-where.rs +++ /dev/null @@ -1,79 +0,0 @@ -// run-pass -// aux-build:fn-aux.rs - -#![allow(unused)] -#![feature(associated_type_bounds)] - -extern crate fn_aux; - -use fn_aux::*; - -// ATB, Type parameters, Where-clauses: - -fn where_bound<B>(beta: B) -> usize -where - B: Beta<Gamma: Alpha> -{ - desugared_bound(beta) -} - -fn where_bound_region<B>(beta: B) -> usize -where - B: Beta<Gamma: 'static> -{ - desugared_bound_region(beta) -} - -fn where_bound_multi<B>(beta: B) -> usize -where - B: Copy + Beta<Gamma: Alpha + 'static + Delta>, -{ - desugared_bound_multi(beta) -} - -fn where_bound_region_specific<'a, B>(gamma: &'a B::Gamma) -> usize -where - B: Beta<Gamma: 'a + Epsilon<'a>>, -{ - desugared_bound_region_specific::<B>(gamma) -} - -fn where_bound_region_forall<B>(beta: B) -> usize -where - B: Beta<Gamma: Copy + for<'a> Epsilon<'a>>, -{ - desugared_bound_region_forall(beta) -} - -fn where_bound_region_forall2<B>(beta: B) -> usize -where - B: Beta<Gamma: Copy + for<'a> Epsilon<'a, Zeta: Eta>>, -{ - desugared_bound_region_forall2(beta) -} - -fn where_contraint_region_forall<B>(beta: B) -> usize -where - for<'a> &'a B: Beta<Gamma: Alpha>, -{ - desugared_contraint_region_forall(beta) -} - -fn where_bound_nested<B>(beta: B) -> usize -where - B: Beta<Gamma: Copy + Alpha + Beta<Gamma: Delta>>, -{ - desugared_bound_nested(beta) -} - -fn main() { - let beta = BetaType; - let gamma = beta.gamma(); - - assert_eq!(42, where_bound(beta)); - assert_eq!(24, where_bound_region(beta)); - assert_eq!(42 + 24 + 1337, where_bound_multi(beta)); - assert_eq!(7331, where_bound_region_specific::<BetaType>(&gamma)); - assert_eq!(7331 * 2, where_bound_region_forall::<BetaType>(beta)); - assert_eq!(42 + 1337, where_bound_nested::<BetaType>(beta)); -} |