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,3 +1,5 @@
//! Regression test for <https://github.com/rust-lang/rust/issues/19037>.

//@ check-pass
#![allow(dead_code)]

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/19380>.

trait Qiz {
fn qiz();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
error[E0038]: the trait `Qiz` is not dyn compatible
--> $DIR/issue-19380.rs:11:29
--> $DIR/dyn-incompat-const-slice.rs:13:29
|
LL | foos: &'static [&'static (dyn Qiz + 'static)]
| ^^^^^^^^^^^^^^^^^ `Qiz` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/issue-19380.rs:2:6
--> $DIR/dyn-incompat-const-slice.rs:4:6
|
LL | trait Qiz {
| --- this trait is not dyn compatible...
Expand All @@ -23,14 +23,14 @@ LL | fn qiz() where Self: Sized;
| +++++++++++++++++

error[E0038]: the trait `Qiz` is not dyn compatible
--> $DIR/issue-19380.rs:16:31
--> $DIR/dyn-incompat-const-slice.rs:18:31
|
LL | const BAR : Bar = Bar { foos: &[&FOO]};
| ^^^^^^^ `Qiz` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $DIR/issue-19380.rs:2:6
--> $DIR/dyn-incompat-const-slice.rs:4:6
|
LL | trait Qiz {
| --- this trait is not dyn compatible...
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/19982>.

//@ check-pass

#![feature(fn_traits, unboxed_closures)]
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/19135>.

//@ run-pass
use std::marker::PhantomData;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//! Regression test for <https://github.com/rust-lang/rust/issues/19098>.
//! Tests that we don't ICE from unused lifetime in HRTB.

//@ check-pass
pub trait Handler {
fn handle(&self, _: &mut String);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
//! Regression test for <https://github.com/rust-lang/rust/issues/19367>.
//!
//! Make sure we don't reuse the same alloca when matching
//! on field of struct or tuple which we reassign in the match body.

//@ run-pass

#![allow(unused_assignments)]
Expand All @@ -6,9 +11,6 @@ struct S {
o: Option<String>
}

// Make sure we don't reuse the same alloca when matching
// on field of struct or tuple which we reassign in the match body.

fn main() {
let mut a = (0, Some("right".to_string()));
let b = match a.1 {
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/19086>.

use Foo::FooB;

enum Foo {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0532]: expected tuple struct or tuple variant, found variant `FooB`
--> $DIR/issue-19086.rs:10:9
--> $DIR/struct-variant-as-tuple-variant.rs:12:9
|
LL | FooB { x: i32, y: i32 }
| ----------------------- `FooB` defined here
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//! Regression test for <https://github.com/rust-lang/rust/issues/19811>.
//@ run-pass

fn main() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//! Regression test for <https://github.com/rust-lang/rust/issues/21332>.
//! Ensure multi-line error formatting for "method has incompatible type for trait" diagnostics.

struct S;

impl Iterator for S {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0053]: method `next` has an incompatible type for trait
--> $DIR/issue-21332.rs:5:27
--> $DIR/incompatible-method-multiline.rs:8:27
|
LL | fn next(&mut self) -> Result<i32, i32> { Ok(7) }
| ^^^^^^^^^^^^^^^^ expected `Option<i32>`, found `Result<i32, i32>`
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/19404>

//@ build-pass
#![allow(dead_code)]
#![allow(unused_variables)]
Expand Down
Loading