Skip to content
Open
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/17959>.

extern crate core;

use core::ops::Drop;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
error[E0367]: `Drop` impl requires `T: Sized` but the struct it is implemented for does not
--> $DIR/issue-17959.rs:11:6
--> $DIR/drop-impl-sized-bound-mismatch.rs:13:6
|
LL | impl<T> Drop for G<T> {
| ^
|
note: the implementor must specify the same requirement
--> $DIR/issue-17959.rs:7:1
--> $DIR/drop-impl-sized-bound-mismatch.rs:9:1
|
LL | struct G<T: ?Sized> {
| ^^^^^^^^^^^^^^^^^^^
Expand Down
Comment thread
Kivooeo marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Regression test for <https://github.com/rust-lang/rust/issues/17905>.

//@ run-pass

#[derive(Debug)]
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/18183>.

pub struct Foo<Bar=Bar>(Bar); //~ ERROR E0128
pub struct Baz(Foo);
fn main() {}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0128]: generic parameter defaults cannot reference parameters before they are declared
--> $DIR/issue-18183.rs:1:20
--> $DIR/type-param-self-reference.rs:3:20
|
LL | pub struct Foo<Bar=Bar>(Bar);
| ^^^ cannot reference `Bar` before it is declared
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/18107>.

pub trait AbstractRenderer {}

fn _create_render(_: &()) ->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0746]: return type cannot be a trait object without pointer indirection
--> $DIR/issue-18107.rs:4:5
--> $DIR/bare-trait-object-return.rs:6:5
|
LL | dyn AbstractRenderer
| ^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
Expand Down
13 changes: 0 additions & 13 deletions tests/ui/issues/issue-18446-2.rs

This file was deleted.

Comment thread
Kivooeo marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Regression test for <https://github.com/rust-lang/rust/issues/17905>.

#[derive(Debug)]
struct Pair<T, V> (T, V);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
error[E0308]: mismatched `self` parameter type
--> $DIR/issue-17905-2.rs:8:18
--> $DIR/elided-lifetime-mismatch-in-self-type.rs:10:18
|
LL | fn say(self: &Pair<&str, isize>) {
| ^^^^^^^^^^^^^^^^^^ lifetime mismatch
|
= note: expected struct `Pair<&_, _>`
found struct `Pair<&_, _>`
note: the anonymous lifetime defined here...
--> $DIR/issue-17905-2.rs:8:24
--> $DIR/elided-lifetime-mismatch-in-self-type.rs:10:24
|
LL | fn say(self: &Pair<&str, isize>) {
| ^^^^
note: ...does not necessarily outlive the anonymous lifetime as defined here
--> $DIR/issue-17905-2.rs:5:5
--> $DIR/elided-lifetime-mismatch-in-self-type.rs:7:5
|
LL | &str,
| ^

error[E0308]: mismatched `self` parameter type
--> $DIR/issue-17905-2.rs:8:18
--> $DIR/elided-lifetime-mismatch-in-self-type.rs:10:18
|
LL | fn say(self: &Pair<&str, isize>) {
| ^^^^^^^^^^^^^^^^^^ lifetime mismatch
|
= note: expected struct `Pair<&_, _>`
found struct `Pair<&_, _>`
note: the anonymous lifetime as defined here...
--> $DIR/issue-17905-2.rs:5:5
--> $DIR/elided-lifetime-mismatch-in-self-type.rs:7:5
|
LL | &str,
| ^
note: ...does not necessarily outlive the anonymous lifetime defined here
--> $DIR/issue-17905-2.rs:8:24
--> $DIR/elided-lifetime-mismatch-in-self-type.rs:10:24
|
LL | fn say(self: &Pair<&str, isize>) {
| ^^^^
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/18232>.

//@ run-pass

struct Cursor<'a>(::std::marker::PhantomData<&'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/17999>.

#![deny(unused_variables)]

fn main() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
error: unused variable: `x`
--> $DIR/issue-17999.rs:5:13
--> $DIR/unused-variables-in-loop.rs:7:13
|
LL | let x = ();
| ^ help: if this is intentional, prefix it with an underscore: `_x`
|
note: the lint level is defined here
--> $DIR/issue-17999.rs:1:9
--> $DIR/unused-variables-in-loop.rs:3:9
|
LL | #![deny(unused_variables)]
| ^^^^^^^^^^^^^^^^

error: unused variable: `a`
--> $DIR/issue-17999.rs:7:13
--> $DIR/unused-variables-in-loop.rs:9:13
|
LL | a => {}
| ^ help: if this is intentional, prefix it with an underscore: `_a`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Test that name clashes between the method in an impl for the type
// and the method in the trait when both are in the same scope.
//! Regression test for <https://github.com/rust-lang/rust/issues/18446>.
//! Test that name clashes between the method in an impl for the type
//! and the method in the trait when both are in the same scope.

trait T {
fn foo(&self);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
error[E0034]: multiple applicable items in scope
--> $DIR/issue-18446.rs:18:7
--> $DIR/call-ambig-trait-object-method.rs:19:7
|
LL | x.foo();
| ^^^ multiple `foo` found
|
note: candidate #1 is defined in the trait `T`
--> $DIR/issue-18446.rs:5:5
--> $DIR/call-ambig-trait-object-method.rs:6:5
|
LL | fn foo(&self);
| ^^^^^^^^^^^^^^
note: candidate #2 is defined in an impl for the type `(dyn T + 'a)`
--> $DIR/issue-18446.rs:9:5
--> $DIR/call-ambig-trait-object-method.rs:10:5
|
LL | fn foo(&self) {}
| ^^^^^^^^^^^^^
Expand Down
16 changes: 16 additions & 0 deletions tests/ui/methods/inherent-method-on-dyn-with-default.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//! Regression test for <https://github.com/rust-lang/rust/issues/18446>.
//! Tests that an inherent method on a trait object with existing default method
//! doesn't emit a duplicate definition error.

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

trait T {
fn foo(&self) -> i32 { 0 }
}

impl<'a> dyn T + 'a {
fn foo(&self) -> i32 { 1 }
}

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

//@ check-pass
trait Foo {
type T;
Expand Down
Loading