diff options
| author | Dawer <7803845+iDawer@users.noreply.github.com> | 2021-07-31 19:17:08 +0500 |
|---|---|---|
| committer | Dawer <7803845+iDawer@users.noreply.github.com> | 2021-08-04 20:24:52 +0500 |
| commit | 98ae530f2a5da3837628543db8c811a6872f504c (patch) | |
| tree | dfbb5d0a67be25ef2c4b315a0f72cb937e4c755b | |
| parent | 0f6621fbfaa673ef924d51eee79aac385c41b7ab (diff) | |
| download | rust-98ae530f2a5da3837628543db8c811a6872f504c.tar.gz rust-98ae530f2a5da3837628543db8c811a6872f504c.zip | |
Fix missing ?Sized bounds in tests.
| -rw-r--r-- | crates/hir_ty/src/tests/traits.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/crates/hir_ty/src/tests/traits.rs b/crates/hir_ty/src/tests/traits.rs index fe4a1afeaf3..79ff84c633c 100644 --- a/crates/hir_ty/src/tests/traits.rs +++ b/crates/hir_ty/src/tests/traits.rs @@ -147,7 +147,7 @@ mod ops { pub use self::try_trait::Try; } -mov convert { +mod convert { pub trait From<T> {} impl<T> From<T> for T {} } @@ -567,8 +567,8 @@ fn deref_trait() { check_types( r#" //- minicore: deref -struct Arc<T>; -impl<T> core::ops::Deref for Arc<T> { +struct Arc<T: ?Sized>; +impl<T: ?Sized> core::ops::Deref for Arc<T> { type Target = T; } @@ -589,9 +589,9 @@ fn deref_trait_with_inference_var() { check_types( r#" //- minicore: deref -struct Arc<T>; -fn new_arc<T>() -> Arc<T> { Arc } -impl<T> core::ops::Deref for Arc<T> { +struct Arc<T: ?Sized>; +fn new_arc<T: ?Sized>() -> Arc<T> { Arc } +impl<T: ?Sized> core::ops::Deref for Arc<T> { type Target = T; } @@ -631,7 +631,7 @@ fn deref_trait_with_question_mark_size() { check_types( r#" //- minicore: deref -struct Arc<T>; +struct Arc<T: ?Sized>; impl<T: ?Sized> core::ops::Deref for Arc<T> { type Target = T; } @@ -2431,8 +2431,8 @@ fn dyn_trait_through_chalk() { check_types( r#" //- minicore: deref -struct Box<T> {} -impl<T> core::ops::Deref for Box<T> { +struct Box<T: ?Sized> {} +impl<T: ?Sized> core::ops::Deref for Box<T> { type Target = T; } trait Trait { |
