Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
//! Regression test for <https://github.com/rust-lang/rust/issues/26997>.
//@ build-pass

#![allow(dead_code)]
pub struct Foo {
x: isize,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
//! Regression test for <https://github.com/rust-lang/rust/issues/27054>.
//@ run-pass

fn main() {
let x = &mut 1;
assert_eq!(*x + { *x=2; 1 }, 2);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
//! Regression test for <https://github.com/rust-lang/rust/issues/27105>.
//@ check-pass

use std::cell::RefCell;
use std::rc::Rc;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
//! Regression test for <https://github.com/rust-lang/rust/issues/26709>.
//! Test value is still getting dropped after unsized coerce.
//!
//! Fat pointer was passed in two immediate args, but the drop invocation
//! used to accept one, which led to ICE.
//@ run-pass

struct Wrapper<'a, T: ?Sized>(&'a mut i32, #[allow(dead_code)] T);

impl<'a, T: ?Sized> Drop for Wrapper<'a, T> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
//! Regression test for <https://github.com/rust-lang/rust/issues/26655>.
//! Check that the destructors of simple enums are run on unwinding.
//@ run-pass
//@ needs-unwind
//@ needs-threads
//@ ignore-backends: gcc

// Check that the destructors of simple enums are run on unwinding

use std::sync::atomic::{Ordering, AtomicUsize};
use std::thread;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Regression test for <https://github.com/rust-lang/rust/issues/26948>.

fn main() {
enum Foo { A { x: u32 } }
let orig = Foo::A { x: 5 };
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0436]: functional record update syntax requires a struct
--> $DIR/issue-26948.rs:4:22
--> $DIR/fru-on-enum-variant.rs:6:22
|
LL | Foo::A { x: 6, ..orig };
| ^^^^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Regression test for #27042. Test that a loop's label is included in its span.
//! Regression test for <https://github.com/rust-lang/rust/issues/27042>.
//! Test that a loop's label is included in its span.

fn main() {
let _: i32 =
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
warning: denote infinite loops with `loop { ... }`
--> $DIR/issue-27042.rs:8:9
--> $DIR/loop-label-included-in-span.rs:9:9
|
LL | / 'b:
LL | |
Expand All @@ -9,7 +9,7 @@ LL | | while true { break }; // but here we cite the whole loop
= note: `#[warn(while_true)]` on by default

error[E0308]: mismatched types
--> $DIR/issue-27042.rs:6:16
--> $DIR/loop-label-included-in-span.rs:7:16
|
LL | let _: i32 =
| - expected because of this assignment
Expand All @@ -25,7 +25,7 @@ LL | loop { break 42 };
| ++

error[E0308]: mismatched types
--> $DIR/issue-27042.rs:8:9
--> $DIR/loop-label-included-in-span.rs:9:9
|
LL | let _: i32 =
| --- expected due to this
Expand All @@ -35,7 +35,7 @@ LL | | while true { break }; // but here we cite the whole loop
| |____________________________^ expected `i32`, found `()`

error[E0308]: mismatched types
--> $DIR/issue-27042.rs:12:9
--> $DIR/loop-label-included-in-span.rs:13:9
|
LL | / 'c:
LL | | for _ in None { break }; // but here we cite the whole loop
Expand All @@ -44,7 +44,7 @@ LL | | for _ in None { break }; // but here we cite the whole loop
= note: `for` loops evaluate to unit type `()`

error[E0308]: mismatched types
--> $DIR/issue-27042.rs:15:9
--> $DIR/loop-label-included-in-span.rs:16:9
|
LL | let _: i32 =
| --- expected due to this
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
//! Regression test for <https://github.com/rust-lang/rust/issues/26802>.
//@ run-pass

trait Foo<'a> {
fn bar<'b>(&self, x: &'b u8) -> u8 where 'a: 'b { *x+7 }
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
//! Regression test for <https://github.com/rust-lang/rust/issues/26805>.
//@ run-pass

struct NonOrd;

fn main() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Regression test for <https://github.com/rust-lang/rust/issues/27078>.

trait Foo {
const BAR: i32;
fn foo(self) -> &'static i32 {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0277]: the size for values of type `Self` cannot be known at compilation time
--> $DIR/issue-27078.rs:3:12
--> $DIR/trait-method-unsized-self-param.rs:5:12
|
LL | fn foo(self) -> &'static i32 {
| ^^^^ doesn't have a size known at compile-time
Expand Down
Loading