summaryrefslogtreecommitdiffstats
path: root/src/test/ui/associated-types/bound-lifetime-in-binding-only.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
commit218caa410aa38c29984be31a5229b9fa717560ee (patch)
treec54bd55eeb6e4c508940a30e94c0032fbd45d677 /src/test/ui/associated-types/bound-lifetime-in-binding-only.rs
parentReleasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-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-types/bound-lifetime-in-binding-only.rs')
-rw-r--r--src/test/ui/associated-types/bound-lifetime-in-binding-only.rs71
1 files changed, 0 insertions, 71 deletions
diff --git a/src/test/ui/associated-types/bound-lifetime-in-binding-only.rs b/src/test/ui/associated-types/bound-lifetime-in-binding-only.rs
deleted file mode 100644
index e714457ef..000000000
--- a/src/test/ui/associated-types/bound-lifetime-in-binding-only.rs
+++ /dev/null
@@ -1,71 +0,0 @@
-// revisions: angle paren ok elision
-
-#![allow(dead_code)]
-#![feature(rustc_attrs)]
-#![feature(unboxed_closures)]
-
-trait Foo {
- type Item;
-}
-
-#[cfg(angle)]
-fn angle<T: for<'a> Foo<Item=&'a i32>>() {
- //[angle]~^ ERROR binding for associated type `Item` references lifetime `'a`
-}
-
-#[cfg(angle)]
-fn angle1<T>() where T: for<'a> Foo<Item=&'a i32> {
- //[angle]~^ ERROR binding for associated type `Item` references lifetime `'a`
-}
-
-#[cfg(angle)]
-fn angle2<T>() where for<'a> T: Foo<Item=&'a i32> {
- //[angle]~^ ERROR binding for associated type `Item` references lifetime `'a`
-}
-
-#[cfg(angle)]
-fn angle3(_: &dyn for<'a> Foo<Item=&'a i32>) {
- //[angle]~^ ERROR binding for associated type `Item` references lifetime `'a`
-}
-
-#[cfg(paren)]
-fn paren<T: for<'a> Fn() -> &'a i32>() {
- //[paren]~^ ERROR binding for associated type `Output` references lifetime `'a`
-}
-
-#[cfg(paren)]
-fn paren1<T>() where T: for<'a> Fn() -> &'a i32 {
- //[paren]~^ ERROR binding for associated type `Output` references lifetime `'a`
-}
-
-#[cfg(paren)]
-fn paren2<T>() where for<'a> T: Fn() -> &'a i32 {
- //[paren]~^ ERROR binding for associated type `Output` references lifetime `'a`
-}
-
-#[cfg(paren)]
-fn paren3(_: &dyn for<'a> Fn() -> &'a i32) {
- //[paren]~^ ERROR binding for associated type `Output` references lifetime `'a`
-}
-
-#[cfg(elision)]
-fn elision<T: Fn() -> &i32>() {
- //[elision]~^ ERROR E0106
-}
-
-struct Parameterized<'a> { x: &'a str }
-
-#[cfg(ok)]
-fn ok1<T: for<'a> Fn(&Parameterized<'a>) -> &'a i32>() {
-}
-
-#[cfg(ok)]
-fn ok2<T: for<'a,'b> Fn<(&'b Parameterized<'a>,), Output=&'a i32>>() {
-}
-
-#[cfg(ok)]
-fn ok3<T>() where for<'a> Parameterized<'a>: Foo<Item=&'a i32> {
-}
-
-#[rustc_error]
-fn main() { } //[ok]~ ERROR fatal error triggered by #[rustc_error]