about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-08-25 16:56:06 -0400
committerMichael Goulet <michael@errs.io>2024-09-05 06:37:38 -0400
commit67804c57e7a53b96d79b49bf6e356e3ade4d943d (patch)
tree9169083bb1e04a5164234c40f87457c5a8730d84
parente8472e84e3e1ef614b97896d42e0a6976fb02855 (diff)
downloadrust-67804c57e7a53b96d79b49bf6e356e3ade4d943d.tar.gz
rust-67804c57e7a53b96d79b49bf6e356e3ade4d943d.zip
Adjust tests
-rw-r--r--tests/ui/implied-bounds/implied-bounds-on-nested-references-plus-variance-2.rs13
-rw-r--r--tests/ui/implied-bounds/implied-bounds-on-nested-references-plus-variance-early-bound.rs2
-rw-r--r--tests/ui/implied-bounds/implied-bounds-on-nested-references-plus-variance-early-bound.stderr2
-rw-r--r--tests/ui/implied-bounds/implied-bounds-on-nested-references-plus-variance-unnormalized.rs2
-rw-r--r--tests/ui/implied-bounds/implied-bounds-on-nested-references-plus-variance-unnormalized.stderr2
-rw-r--r--tests/ui/implied-bounds/implied-bounds-on-nested-references-plus-variance.rs2
-rw-r--r--tests/ui/implied-bounds/implied-bounds-on-nested-references-plus-variance.stderr2
7 files changed, 22 insertions, 3 deletions
diff --git a/tests/ui/implied-bounds/implied-bounds-on-nested-references-plus-variance-2.rs b/tests/ui/implied-bounds/implied-bounds-on-nested-references-plus-variance-2.rs
new file mode 100644
index 00000000000..ca8b8b7e4d9
--- /dev/null
+++ b/tests/ui/implied-bounds/implied-bounds-on-nested-references-plus-variance-2.rs
@@ -0,0 +1,13 @@
+//@ check-pass
+//@ known-bug: #25860
+
+static UNIT: &'static &'static () = &&();
+
+fn foo<'a, 'b, T>(_: &'a &'b (), v: &'b T, _: &()) -> &'a T { v }
+
+fn bad<'a, T>(x: &'a T) -> &'static T {
+    let f: fn(_, &'a T, &()) -> &'static T = foo;
+    f(UNIT, x, &())
+}
+
+fn main() {}
diff --git a/tests/ui/implied-bounds/implied-bounds-on-nested-references-plus-variance-early-bound.rs b/tests/ui/implied-bounds/implied-bounds-on-nested-references-plus-variance-early-bound.rs
index 16095f66da7..226a6fa3016 100644
--- a/tests/ui/implied-bounds/implied-bounds-on-nested-references-plus-variance-early-bound.rs
+++ b/tests/ui/implied-bounds/implied-bounds-on-nested-references-plus-variance-early-bound.rs
@@ -1,3 +1,5 @@
+// Regression test for #129021.
+
 static UNIT: &'static &'static () = &&();
 
 fn foo<'a: 'a, 'b: 'b, T>(_: &'a &'b (), v: &'b T) -> &'a T { v }
diff --git a/tests/ui/implied-bounds/implied-bounds-on-nested-references-plus-variance-early-bound.stderr b/tests/ui/implied-bounds/implied-bounds-on-nested-references-plus-variance-early-bound.stderr
index 4925576e5a0..84d2a6d2b6a 100644
--- a/tests/ui/implied-bounds/implied-bounds-on-nested-references-plus-variance-early-bound.stderr
+++ b/tests/ui/implied-bounds/implied-bounds-on-nested-references-plus-variance-early-bound.stderr
@@ -1,5 +1,5 @@
 error: lifetime may not live long enough
-  --> $DIR/implied-bounds-on-nested-references-plus-variance-early-bound.rs:6:12
+  --> $DIR/implied-bounds-on-nested-references-plus-variance-early-bound.rs:8:12
    |
 LL | fn bad<'a, T>(x: &'a T) -> &'static T {
    |        -- lifetime `'a` defined here
diff --git a/tests/ui/implied-bounds/implied-bounds-on-nested-references-plus-variance-unnormalized.rs b/tests/ui/implied-bounds/implied-bounds-on-nested-references-plus-variance-unnormalized.rs
index b842b21224d..f3068990189 100644
--- a/tests/ui/implied-bounds/implied-bounds-on-nested-references-plus-variance-unnormalized.rs
+++ b/tests/ui/implied-bounds/implied-bounds-on-nested-references-plus-variance-unnormalized.rs
@@ -1,3 +1,5 @@
+// Regression test for #129021.
+
 trait ToArg<T> {
     type Arg;
 }
diff --git a/tests/ui/implied-bounds/implied-bounds-on-nested-references-plus-variance-unnormalized.stderr b/tests/ui/implied-bounds/implied-bounds-on-nested-references-plus-variance-unnormalized.stderr
index a2ac0d897b6..4cdb959786a 100644
--- a/tests/ui/implied-bounds/implied-bounds-on-nested-references-plus-variance-unnormalized.stderr
+++ b/tests/ui/implied-bounds/implied-bounds-on-nested-references-plus-variance-unnormalized.stderr
@@ -1,5 +1,5 @@
 error: lifetime may not live long enough
-  --> $DIR/implied-bounds-on-nested-references-plus-variance-unnormalized.rs:10:5
+  --> $DIR/implied-bounds-on-nested-references-plus-variance-unnormalized.rs:12:5
    |
 LL | fn extend<'a, 'b>(x: &'a str) -> &'b str {
    |           --  -- lifetime `'b` defined here
diff --git a/tests/ui/implied-bounds/implied-bounds-on-nested-references-plus-variance.rs b/tests/ui/implied-bounds/implied-bounds-on-nested-references-plus-variance.rs
index d40418a4e90..6de81cba728 100644
--- a/tests/ui/implied-bounds/implied-bounds-on-nested-references-plus-variance.rs
+++ b/tests/ui/implied-bounds/implied-bounds-on-nested-references-plus-variance.rs
@@ -1,3 +1,5 @@
+// Regression test for #129021.
+
 static UNIT: &'static &'static () = &&();
 
 fn foo<'a, 'b, T>(_: &'a &'b (), v: &'b T) -> &'a T { v }
diff --git a/tests/ui/implied-bounds/implied-bounds-on-nested-references-plus-variance.stderr b/tests/ui/implied-bounds/implied-bounds-on-nested-references-plus-variance.stderr
index 1ad9ba31f37..c96fa92937b 100644
--- a/tests/ui/implied-bounds/implied-bounds-on-nested-references-plus-variance.stderr
+++ b/tests/ui/implied-bounds/implied-bounds-on-nested-references-plus-variance.stderr
@@ -1,5 +1,5 @@
 error: lifetime may not live long enough
-  --> $DIR/implied-bounds-on-nested-references-plus-variance.rs:6:12
+  --> $DIR/implied-bounds-on-nested-references-plus-variance.rs:8:12
    |
 LL | fn bad<'a, T>(x: &'a T) -> &'static T {
    |        -- lifetime `'a` defined here