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/23073

#![feature(associated_type_defaults)]

trait Foo { type T; }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0223]: ambiguous associated type
--> $DIR/issue-23073.rs:6:17
--> $DIR/ambiguous-associated-type-default.rs:8:17
|
LL | type FooT = <<Self as Bar>::Foo>::T;
| ^^^^^^^^^^^^^^^^^^^^^^^
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/20803

//@ run-pass
use std::ops::Add;

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/37051

//@ check-pass

#![feature(associated_type_defaults)]
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/39970

trait Array<'a> {
type Element: 'a;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
error[E0271]: type mismatch resolving `<() as Array<'a>>::Element == ()`
--> $DIR/issue-39970.rs:19:6
--> $DIR/assoc-type-element-mismatch-in-hrtb.rs:21:6
|
LL | <() as Visit>::visit();
| ^^ type mismatch resolving `<() as Array<'a>>::Element == ()`
|
note: expected this to be `()`
--> $DIR/issue-39970.rs:10:20
--> $DIR/assoc-type-element-mismatch-in-hrtb.rs:12:20
|
LL | type Element = &'a ();
| ^^^^^^
note: required for `()` to implement `Visit`
--> $DIR/issue-39970.rs:13:6
--> $DIR/assoc-type-element-mismatch-in-hrtb.rs:15:6
|
LL | impl Visit for () where
| ^^^^^ ^^
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/28983

//@ run-pass
pub trait Test { type T; }

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/19632

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//@ build-pass

// Regression test for #20797.
// Regression test for https://github.com/rust-lang/rust/issues/20797

use std::default::Default;
use std::io;
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/26127

//@ run-pass
trait Tr { type T; }
impl Tr for u8 { type T=(); }
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/19631

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//@ run-pass
// Issue 36036: computing the layout of a type composed from another
// Regression test for https://github.com/rust-lang/rust/issues/36036
// computing the layout of a type composed from another
// trait's associated type caused compiler to ICE when the associated
// type was allowed to be unsized, even though the known instantiated
// type is itself sized.
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/23336

//@ run-pass
pub trait Data { fn doit(&self) {} }
impl<T> Data for T {}
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/17732

//@ check-pass
#![allow(dead_code)]
#![allow(non_camel_case_types)]
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/20009

//@ check-pass
// Check that associated types are `Sized`

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Regression test for Issue #20971.
// Regression test for Issue https://github.com/rust-lang/rust/issues/20971

//@ run-fail
//@ error-pattern:Hello, world!
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/19850

//@ check-pass
#![allow(unused_variables)]
// Test that `<Type as Trait>::Output` and `Self::Output` are accepted as type annotations in let
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/23406

//@ build-pass
#![allow(dead_code)]
trait Inner {
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/37109

//@ run-pass
trait ToRef<'a> {
type Ref: 'a;
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/23992

//@ run-pass
pub struct Outer<T: Trait>(T);
pub struct Inner<'a> { value: &'a bool }
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/21909

//@ check-pass

trait A<X> {
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/34839

//@ check-pass

trait RegularExpression: Sized {
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/35600

//@ run-pass
#![allow(non_camel_case_types)]
#![allow(unused_variables)]
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/27281

//@ check-pass
pub trait Trait<'a> {
type T;
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/18809

//@ check-pass
trait Tup {
type T0;
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/43357

//@ check-pass
#![allow(dead_code)]
trait Trait {
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/19842
// Test that a partially specified trait object with unspecified associated
// type does not type-check.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0191]: the value of the associated type `A` in `Foo` must be specified
--> $DIR/issue-19482.rs:10:16
--> $DIR/unspecified-assoc-type-in-trait-object.rs:11:16
|
LL | type A;
| ------ `A` defined here
Expand Down
Loading