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/late-bound-lifetimes | |
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/late-bound-lifetimes')
7 files changed, 0 insertions, 105 deletions
diff --git a/src/test/ui/late-bound-lifetimes/auxiliary/upstream_alias.rs b/src/test/ui/late-bound-lifetimes/auxiliary/upstream_alias.rs deleted file mode 100644 index 5b9dc0e43..000000000 --- a/src/test/ui/late-bound-lifetimes/auxiliary/upstream_alias.rs +++ /dev/null @@ -1,5 +0,0 @@ -pub trait Trait<'a> { - type Assoc; -} - -pub type Alias<'a, T> = <T as Trait<'a>>::Assoc; diff --git a/src/test/ui/late-bound-lifetimes/cross_crate_alias.rs b/src/test/ui/late-bound-lifetimes/cross_crate_alias.rs deleted file mode 100644 index 4154c2792..000000000 --- a/src/test/ui/late-bound-lifetimes/cross_crate_alias.rs +++ /dev/null @@ -1,10 +0,0 @@ -// aux-build:upstream_alias.rs -// check-pass - -extern crate upstream_alias; - -fn foo<'a, T: for<'b> upstream_alias::Trait<'b>>(_: upstream_alias::Alias<'a, T>) -> &'a () { - todo!() -} - -fn main() {} diff --git a/src/test/ui/late-bound-lifetimes/downgraded_to_early_through_alias.rs b/src/test/ui/late-bound-lifetimes/downgraded_to_early_through_alias.rs deleted file mode 100644 index e56a34218..000000000 --- a/src/test/ui/late-bound-lifetimes/downgraded_to_early_through_alias.rs +++ /dev/null @@ -1,24 +0,0 @@ -// check-pass - -trait Gats<'a> { - type Assoc; - type Assoc2; -} - -trait Trait: for<'a> Gats<'a> { - fn foo<'a>(_: &mut <Self as Gats<'a>>::Assoc) -> <Self as Gats<'a>>::Assoc2; -} - -impl<'a> Gats<'a> for () { - type Assoc = &'a u32; - type Assoc2 = (); -} - -type GatsAssoc<'a, T> = <T as Gats<'a>>::Assoc; -type GatsAssoc2<'a, T> = <T as Gats<'a>>::Assoc2; - -impl Trait for () { - fn foo<'a>(_: &mut GatsAssoc<'a, Self>) -> GatsAssoc2<'a, Self> {} -} - -fn main() {} diff --git a/src/test/ui/late-bound-lifetimes/issue-47511.rs b/src/test/ui/late-bound-lifetimes/issue-47511.rs deleted file mode 100644 index 789443515..000000000 --- a/src/test/ui/late-bound-lifetimes/issue-47511.rs +++ /dev/null @@ -1,21 +0,0 @@ -// check-pass - -fn f(_: X) -> X { - unimplemented!() -} - -fn g<'a>(_: X<'a>) -> X<'a> { - unimplemented!() -} - -type X<'a> = <&'a () as Trait>::Value; - -trait Trait { - type Value; -} - -impl<'a> Trait for &'a () { - type Value = (); -} - -fn main() {} diff --git a/src/test/ui/late-bound-lifetimes/late_bound_through_alias.rs b/src/test/ui/late-bound-lifetimes/late_bound_through_alias.rs deleted file mode 100644 index 91839673c..000000000 --- a/src/test/ui/late-bound-lifetimes/late_bound_through_alias.rs +++ /dev/null @@ -1,16 +0,0 @@ -// check-pass - -fn f(_: X) -> X { - unimplemented!() -} - -fn g<'a>(_: X<'a>) -> X<'a> { - unimplemented!() -} - -type X<'a> = &'a (); - -fn main() { - let _: for<'a> fn(X<'a>) -> X<'a> = g; - let _: for<'a> fn(X<'a>) -> X<'a> = f; -} diff --git a/src/test/ui/late-bound-lifetimes/mismatched_arg_count.rs b/src/test/ui/late-bound-lifetimes/mismatched_arg_count.rs deleted file mode 100644 index 0b331e203..000000000 --- a/src/test/ui/late-bound-lifetimes/mismatched_arg_count.rs +++ /dev/null @@ -1,12 +0,0 @@ -// ensures that we don't ICE when there are too many args supplied to the alias. - -trait Trait<'a> { - type Assoc; -} - -type Alias<'a, T> = <T as Trait<'a>>::Assoc; - -fn bar<'a, T: Trait<'a>>(_: Alias<'a, 'a, T>) {} -//~^ error: this type alias takes 1 lifetime argument but 2 lifetime arguments were supplied - -fn main() {} diff --git a/src/test/ui/late-bound-lifetimes/mismatched_arg_count.stderr b/src/test/ui/late-bound-lifetimes/mismatched_arg_count.stderr deleted file mode 100644 index 3704d9bb9..000000000 --- a/src/test/ui/late-bound-lifetimes/mismatched_arg_count.stderr +++ /dev/null @@ -1,17 +0,0 @@ -error[E0107]: this type alias takes 1 lifetime argument but 2 lifetime arguments were supplied - --> $DIR/mismatched_arg_count.rs:9:29 - | -LL | fn bar<'a, T: Trait<'a>>(_: Alias<'a, 'a, T>) {} - | ^^^^^ -- help: remove this lifetime argument - | | - | expected 1 lifetime argument - | -note: type alias defined here, with 1 lifetime parameter: `'a` - --> $DIR/mismatched_arg_count.rs:7:6 - | -LL | type Alias<'a, T> = <T as Trait<'a>>::Assoc; - | ^^^^^ -- - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0107`. |