Skip to content

Commit bf4fbfb

Browse files
committed
Auto merge of rust-lang#155149 - danieljofficial:move-tests-deref, r=Kivooeo
Move deref tests from issues into deref folder Hi, Some deref tests, please look at them when you can r? @Kivooeo
2 parents 5f36a7f + cf98647 commit bf4fbfb

9 files changed

Lines changed: 17 additions & 1 deletion

tests/ui/issues/issue-4972.rs renamed to tests/ui/deref/box-pattern-trait-object-cannot-deref.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/4972
2+
13
#![feature(box_patterns)]
24

35
trait MyTrait {

tests/ui/issues/issue-4972.stderr renamed to tests/ui/deref/box-pattern-trait-object-cannot-deref.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0033]: type `Box<(dyn MyTrait + 'static)>` cannot be dereferenced
2-
--> $DIR/issue-4972.rs:13:25
2+
--> $DIR/box-pattern-trait-object-cannot-deref.rs:15:25
33
|
44
LL | TraitWrapper::A(box ref map) => map,
55
| ^^^^^^^^^^^ type `Box<(dyn MyTrait + 'static)>` cannot be dereferenced

tests/ui/issues/issue-27697.rs renamed to tests/ui/deref/deref-impl-for-dyn-trait.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/27697
2+
13
//@ check-pass
24

35
use std::ops::Deref;

tests/ui/issues/issue-16774.rs renamed to tests/ui/deref/deref-mut-closure-drop-order.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/16774
2+
13
//@ run-pass
24
#![feature(box_patterns)]
35

tests/ui/issues/issue-26205.rs renamed to tests/ui/deref/deref-mut-method-through-box.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/26205
2+
13
//@ check-pass
24
#![allow(dead_code)]
35
use std::ops::{Deref, DerefMut};

tests/ui/issues/issue-22992-2.rs renamed to tests/ui/deref/deref-newtype-method-call.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/22992
2+
13
//@ run-pass
24
struct A(B);
35
struct B;

tests/ui/issues/issue-24589.rs renamed to tests/ui/deref/deref-newtype-slice-coercion.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/24589
2+
13
//@ run-pass
24
pub struct _X([u8]);
35

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/38381
2+
13
//@ check-pass
24

35
use std::ops::Deref;

tests/ui/issues/issue-26186.rs renamed to tests/ui/deref/deref-to-dyn-fn-mut-callable.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/26186
2+
13
//@ check-pass
24
use std::sync::Mutex;
35
use std::cell::RefCell;

0 commit comments

Comments
 (0)