Skip to content

Commit ed1dd88

Browse files
committed
bless batch
1 parent 3f32f51 commit ed1dd88

16 files changed

Lines changed: 42 additions & 13 deletions
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1+
//! Regression test for <https://github.com/rust-lang/rust/issues/23354>.
2+
//! Check expr in [expr; N] is always being evaluated.
3+
//!
4+
//! This used to trigger an LLVM assertion during compilation
15
//@ run-fail
26
//@ error-pattern:panic evaluated
37
//@ needs-subprocess
48

59
#[allow(unused_variables)]
610
fn main() {
7-
// This used to trigger an LLVM assertion during compilation
811
let x = [panic!("panic evaluated"); 2];
912
}

tests/ui/array-slice-vec/eval-empty-array-expr.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! Regression test for <https://github.com/rust-lang/rust/issues/23354>.
2+
//! Check expr in [expr; N] is always being evaluated.
13
//@ run-fail
24
//@ error-pattern:panic evaluated
35
//@ needs-subprocess

tests/ui/associated-types/associated-type-unconstrained-lifetime.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
1-
// Regression test for #22886.
1+
//! Regression test for <https://github.com/rust-lang/rust/issues/22886>.
2+
//! Test that associated type's inner state cannot be observed past
3+
//! borrow end via saved reference.
4+
//!
5+
//! This was possible as trait implementation with unconstrained lifetime
6+
//! allowed to use any lifetime for associated type, which introduced
7+
//! soundness holes.
8+
//!
9+
//! Fixed by prohibiting use of unconstrained lifetimes on associated types
10+
//! in <https://github.com/rust-lang/rust/pull/24461>.
11+
//!
12+
//! Related <https://github.com/rust-lang/rust/issues/22077>.
213
314
fn crash_please() {
415
let mut iter = Newtype(Some(Box::new(0)));

tests/ui/associated-types/associated-type-unconstrained-lifetime.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
2-
--> $DIR/issue-22886.rs:13:6
2+
--> $DIR/associated-type-unconstrained-lifetime.rs:24:6
33
|
44
LL | impl<'a> Iterator for Newtype {
55
| ^^ unconstrained lifetime parameter

tests/ui/cast/dyn-any-to-fn-with-missing-generics.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//! Regression test for <https://github.com/rust-lang/rust/issues/23024>.
12
use std::any::Any;
23

34
fn main()

tests/ui/cast/dyn-any-to-fn-with-missing-generics.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0658]: the precise format of `Fn`-family traits' type parameters is subject to change
2-
--> $DIR/issue-23024.rs:8:39
2+
--> $DIR/dyn-any-to-fn-with-missing-generics.rs:9:39
33
|
44
LL | println!("{:?}",(vfnfer[0] as dyn Fn)(3));
55
| ^^ help: use parenthetical notation instead: `Fn() -> ()`
@@ -9,7 +9,7 @@ LL | println!("{:?}",(vfnfer[0] as dyn Fn)(3));
99
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
1010

1111
error[E0107]: missing generics for trait `Fn`
12-
--> $DIR/issue-23024.rs:8:39
12+
--> $DIR/dyn-any-to-fn-with-missing-generics.rs:9:39
1313
|
1414
LL | println!("{:?}",(vfnfer[0] as dyn Fn)(3));
1515
| ^^ expected 1 generic argument

tests/ui/dst/match-dst-struct.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
//! Regression test for <https://github.com/rust-lang/rust/issues/23261>.
2+
//! Matching on a DST struct should not trigger an LLVM assertion.
13
//@ run-pass
2-
// Matching on a DST struct should not trigger an LLVM assertion.
34

45
struct Foo<T: ?Sized> {
56
a: i32,

tests/ui/higher-ranked/leak-check/trait-object-assoc-type-bound-unsatisfied.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! Regression test for <https://github.com/rust-lang/rust/issues/22872>.
2+
13
trait Wrap<'b> {
24
fn foo(&'b mut self);
35
}

tests/ui/higher-ranked/leak-check/trait-object-assoc-type-bound-unsatisfied.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
error[E0277]: `<P as Process<'_>>::Item` is not an iterator
2-
--> $DIR/issue-22872.rs:20:40
2+
--> $DIR/trait-object-assoc-type-bound-unsatisfied.rs:22:40
33
|
44
LL | let _: Box<dyn for<'b> Wrap<'b>> = Box::new(Wrapper(process));
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ `<P as Process<'_>>::Item` is not an iterator
66
|
77
= help: the trait `Iterator` is not implemented for `<P as Process<'_>>::Item`
88
note: required for `Wrapper<P>` to implement `for<'b> Wrap<'b>`
9-
--> $DIR/issue-22872.rs:7:13
9+
--> $DIR/trait-object-assoc-type-bound-unsatisfied.rs:9:13
1010
|
1111
LL | impl<'b, P> Wrap<'b> for Wrapper<P>
1212
| ^^^^^^^^ ^^^^^^^^^^

tests/ui/inference/downcast-fn-ptr-placeholder.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
//! Regression test for <https://github.com/rust-lang/rust/issues/23041>.
2+
//! Previously ICEd with cat_expr error, fixed by delaying bug.
3+
14
use std::any::Any;
25
fn main()
36
{

0 commit comments

Comments
 (0)