diff options
| author | Michael Goulet <michael@errs.io> | 2022-08-16 22:01:51 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2022-08-16 22:30:56 +0000 |
| commit | 33212bf7f527798a8cfa2bbb38781742f4ca718a (patch) | |
| tree | c72e070ccfc570fa2159e6fbd49c8dd72f85e1d9 /src | |
| parent | 40336865fe7d4a01139a3336639c6971647e885c (diff) | |
Remove deferred sized checks
Diffstat (limited to 'src')
| -rw-r--r-- | src/test/incremental/const-generics/hash-tyvid-regression-1.rs | 1 | ||||
| -rw-r--r-- | src/test/ui/associated-types/associated-types-path-2.stderr | 4 | ||||
| -rw-r--r-- | src/test/ui/feature-gates/feature-gate-unsized_fn_params.stderr | 9 | ||||
| -rw-r--r-- | src/test/ui/iterators/issue-28098.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/iterators/issue-28098.stderr | 28 | ||||
| -rw-r--r-- | src/test/ui/on-unimplemented/multiple-impls.rs | 3 | ||||
| -rw-r--r-- | src/test/ui/on-unimplemented/multiple-impls.stderr | 39 | ||||
| -rw-r--r-- | src/test/ui/on-unimplemented/on-impl.rs | 1 | ||||
| -rw-r--r-- | src/test/ui/on-unimplemented/on-impl.stderr | 11 | ||||
| -rw-r--r-- | src/test/ui/unsized/issue-30355.stderr | 9 |
10 files changed, 27 insertions, 80 deletions
diff --git a/src/test/incremental/const-generics/hash-tyvid-regression-1.rs b/src/test/incremental/const-generics/hash-tyvid-regression-1.rs index 5ff7b19d894..53358b183cb 100644 --- a/src/test/incremental/const-generics/hash-tyvid-regression-1.rs +++ b/src/test/incremental/const-generics/hash-tyvid-regression-1.rs @@ -9,7 +9,6 @@ where use std::convert::TryFrom; <[T; N.get()]>::try_from(()) //~^ error: the trait bound - //~| error: the trait bound //~| error: mismatched types } diff --git a/src/test/ui/associated-types/associated-types-path-2.stderr b/src/test/ui/associated-types/associated-types-path-2.stderr index c37d469890c..66f1ab72692 100644 --- a/src/test/ui/associated-types/associated-types-path-2.stderr +++ b/src/test/ui/associated-types/associated-types-path-2.stderr @@ -33,7 +33,9 @@ error[E0277]: the trait bound `u32: Foo` is not satisfied --> $DIR/associated-types-path-2.rs:29:14 | LL | f1(2u32, 4u32); - | ^^^^ the trait `Foo` is not implemented for `u32` + | -- ^^^^ the trait `Foo` is not implemented for `u32` + | | + | required by a bound introduced by this call | = help: the trait `Foo` is implemented for `i32` diff --git a/src/test/ui/feature-gates/feature-gate-unsized_fn_params.stderr b/src/test/ui/feature-gates/feature-gate-unsized_fn_params.stderr index 0f7520ef7f8..0557340f792 100644 --- a/src/test/ui/feature-gates/feature-gate-unsized_fn_params.stderr +++ b/src/test/ui/feature-gates/feature-gate-unsized_fn_params.stderr @@ -15,11 +15,16 @@ error[E0277]: the size for values of type `(dyn Foo + 'static)` cannot be known --> $DIR/feature-gate-unsized_fn_params.rs:24:9 | LL | foo(*x); - | ^^ doesn't have a size known at compile-time + | --- ^^ doesn't have a size known at compile-time + | | + | required by a bound introduced by this call | = help: the trait `Sized` is not implemented for `(dyn Foo + 'static)` - = note: all function arguments must have a statically known size = help: unsized fn params are gated as an unstable feature +help: function arguments must have a statically known size, borrowed types always have a known size + | +LL | foo(&*x); + | + error: aborting due to 2 previous errors diff --git a/src/test/ui/iterators/issue-28098.rs b/src/test/ui/iterators/issue-28098.rs index 62a90d90d12..c4addaccefc 100644 --- a/src/test/ui/iterators/issue-28098.rs +++ b/src/test/ui/iterators/issue-28098.rs @@ -1,7 +1,6 @@ fn main() { let _ = Iterator::next(&mut ()); //~^ ERROR `()` is not an iterator - //~| ERROR `()` is not an iterator for _ in false {} //~^ ERROR `bool` is not an iterator @@ -17,7 +16,6 @@ pub fn other() { let _ = Iterator::next(&mut ()); //~^ ERROR `()` is not an iterator - //~| ERROR `()` is not an iterator let _ = Iterator::next(&mut ()); //~^ ERROR `()` is not an iterator diff --git a/src/test/ui/iterators/issue-28098.stderr b/src/test/ui/iterators/issue-28098.stderr index 3beb9929244..e7128248f93 100644 --- a/src/test/ui/iterators/issue-28098.stderr +++ b/src/test/ui/iterators/issue-28098.stderr @@ -9,7 +9,7 @@ LL | let _ = Iterator::next(&mut ()); = help: the trait `Iterator` is not implemented for `()` error[E0277]: `bool` is not an iterator - --> $DIR/issue-28098.rs:6:14 + --> $DIR/issue-28098.rs:5:14 | LL | for _ in false {} | ^^^^^ `bool` is not an iterator @@ -18,7 +18,7 @@ LL | for _ in false {} = note: required because of the requirements on the impl of `IntoIterator` for `bool` error[E0277]: `()` is not an iterator - --> $DIR/issue-28098.rs:9:28 + --> $DIR/issue-28098.rs:8:28 | LL | let _ = Iterator::next(&mut ()); | -------------- ^^^^^^^ `()` is not an iterator @@ -28,15 +28,7 @@ LL | let _ = Iterator::next(&mut ()); = help: the trait `Iterator` is not implemented for `()` error[E0277]: `()` is not an iterator - --> $DIR/issue-28098.rs:2:13 - | -LL | let _ = Iterator::next(&mut ()); - | ^^^^^^^^^^^^^^ `()` is not an iterator - | - = help: the trait `Iterator` is not implemented for `()` - -error[E0277]: `()` is not an iterator - --> $DIR/issue-28098.rs:18:28 + --> $DIR/issue-28098.rs:17:28 | LL | let _ = Iterator::next(&mut ()); | -------------- ^^^^^^^ `()` is not an iterator @@ -46,7 +38,7 @@ LL | let _ = Iterator::next(&mut ()); = help: the trait `Iterator` is not implemented for `()` error[E0277]: `()` is not an iterator - --> $DIR/issue-28098.rs:22:28 + --> $DIR/issue-28098.rs:20:28 | LL | let _ = Iterator::next(&mut ()); | -------------- ^^^^^^^ `()` is not an iterator @@ -56,7 +48,7 @@ LL | let _ = Iterator::next(&mut ()); = help: the trait `Iterator` is not implemented for `()` error[E0277]: `bool` is not an iterator - --> $DIR/issue-28098.rs:25:14 + --> $DIR/issue-28098.rs:23:14 | LL | for _ in false {} | ^^^^^ `bool` is not an iterator @@ -64,14 +56,6 @@ LL | for _ in false {} = help: the trait `Iterator` is not implemented for `bool` = note: required because of the requirements on the impl of `IntoIterator` for `bool` -error[E0277]: `()` is not an iterator - --> $DIR/issue-28098.rs:18:13 - | -LL | let _ = Iterator::next(&mut ()); - | ^^^^^^^^^^^^^^ `()` is not an iterator - | - = help: the trait `Iterator` is not implemented for `()` - -error: aborting due to 8 previous errors +error: aborting due to 6 previous errors For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/on-unimplemented/multiple-impls.rs b/src/test/ui/on-unimplemented/multiple-impls.rs index b74957ebcd4..79c40f650db 100644 --- a/src/test/ui/on-unimplemented/multiple-impls.rs +++ b/src/test/ui/on-unimplemented/multiple-impls.rs @@ -32,11 +32,8 @@ impl Index<Bar<usize>> for [i32] { fn main() { Index::index(&[] as &[i32], 2u32); //~^ ERROR E0277 - //~| ERROR E0277 Index::index(&[] as &[i32], Foo(2u32)); //~^ ERROR E0277 - //~| ERROR E0277 Index::index(&[] as &[i32], Bar(2u32)); //~^ ERROR E0277 - //~| ERROR E0277 } diff --git a/src/test/ui/on-unimplemented/multiple-impls.stderr b/src/test/ui/on-unimplemented/multiple-impls.stderr index 06e1a222af8..6e3601d7bf4 100644 --- a/src/test/ui/on-unimplemented/multiple-impls.stderr +++ b/src/test/ui/on-unimplemented/multiple-impls.stderr @@ -12,7 +12,7 @@ LL | Index::index(&[] as &[i32], 2u32); <[i32] as Index<Foo<usize>>> error[E0277]: the trait bound `[i32]: Index<Foo<u32>>` is not satisfied - --> $DIR/multiple-impls.rs:36:18 + --> $DIR/multiple-impls.rs:35:18 | LL | Index::index(&[] as &[i32], Foo(2u32)); | ------------ ^^^^^^^^^^^^^ on impl for Foo @@ -25,7 +25,7 @@ LL | Index::index(&[] as &[i32], Foo(2u32)); <[i32] as Index<Foo<usize>>> error[E0277]: the trait bound `[i32]: Index<Bar<u32>>` is not satisfied - --> $DIR/multiple-impls.rs:39:18 + --> $DIR/multiple-impls.rs:37:18 | LL | Index::index(&[] as &[i32], Bar(2u32)); | ------------ ^^^^^^^^^^^^^ on impl for Bar @@ -37,39 +37,6 @@ LL | Index::index(&[] as &[i32], Bar(2u32)); <[i32] as Index<Bar<usize>>> <[i32] as Index<Foo<usize>>> -error[E0277]: the trait bound `[i32]: Index<u32>` is not satisfied - --> $DIR/multiple-impls.rs:33:5 - | -LL | Index::index(&[] as &[i32], 2u32); - | ^^^^^^^^^^^^ trait message - | - = help: the trait `Index<u32>` is not implemented for `[i32]` - = help: the following other types implement trait `Index<Idx>`: - <[i32] as Index<Bar<usize>>> - <[i32] as Index<Foo<usize>>> - -error[E0277]: the trait bound `[i32]: Index<Foo<u32>>` is not satisfied - --> $DIR/multiple-impls.rs:36:5 - | -LL | Index::index(&[] as &[i32], Foo(2u32)); - | ^^^^^^^^^^^^ on impl for Foo - | - = help: the trait `Index<Foo<u32>>` is not implemented for `[i32]` - = help: the following other types implement trait `Index<Idx>`: - <[i32] as Index<Bar<usize>>> - <[i32] as Index<Foo<usize>>> - -error[E0277]: the trait bound `[i32]: Index<Bar<u32>>` is not satisfied - --> $DIR/multiple-impls.rs:39:5 - | -LL | Index::index(&[] as &[i32], Bar(2u32)); - | ^^^^^^^^^^^^ on impl for Bar - | - = help: the trait `Index<Bar<u32>>` is not implemented for `[i32]` - = help: the following other types implement trait `Index<Idx>`: - <[i32] as Index<Bar<usize>>> - <[i32] as Index<Foo<usize>>> - -error: aborting due to 6 previous errors +error: aborting due to 3 previous errors For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/on-unimplemented/on-impl.rs b/src/test/ui/on-unimplemented/on-impl.rs index ab3e67d01fe..b03e1f7c6a8 100644 --- a/src/test/ui/on-unimplemented/on-impl.rs +++ b/src/test/ui/on-unimplemented/on-impl.rs @@ -21,5 +21,4 @@ impl Index<usize> for [i32] { fn main() { Index::<u32>::index(&[1, 2, 3] as &[i32], 2u32); //~^ ERROR E0277 - //~| ERROR E0277 } diff --git a/src/test/ui/on-unimplemented/on-impl.stderr b/src/test/ui/on-unimplemented/on-impl.stderr index 769a3d77a57..396c062cfe2 100644 --- a/src/test/ui/on-unimplemented/on-impl.stderr +++ b/src/test/ui/on-unimplemented/on-impl.stderr @@ -9,15 +9,6 @@ LL | Index::<u32>::index(&[1, 2, 3] as &[i32], 2u32); = help: the trait `Index<u32>` is not implemented for `[i32]` = help: the trait `Index<usize>` is implemented for `[i32]` -error[E0277]: the trait bound `[i32]: Index<u32>` is not satisfied - --> $DIR/on-impl.rs:22:5 - | -LL | Index::<u32>::index(&[1, 2, 3] as &[i32], 2u32); - | ^^^^^^^^^^^^^^^^^^^ a usize is required to index into a slice - | - = help: the trait `Index<u32>` is not implemented for `[i32]` - = help: the trait `Index<usize>` is implemented for `[i32]` - -error: aborting due to 2 previous errors +error: aborting due to previous error For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/unsized/issue-30355.stderr b/src/test/ui/unsized/issue-30355.stderr index 71bbdf5dec7..d7af558eef4 100644 --- a/src/test/ui/unsized/issue-30355.stderr +++ b/src/test/ui/unsized/issue-30355.stderr @@ -2,11 +2,16 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation --> $DIR/issue-30355.rs:5:8 | LL | &X(*Y) - | ^^ doesn't have a size known at compile-time + | - ^^ doesn't have a size known at compile-time + | | + | required by a bound introduced by this call | = help: the trait `Sized` is not implemented for `[u8]` - = note: all function arguments must have a statically known size = help: unsized fn params are gated as an unstable feature +help: function arguments must have a statically known size, borrowed types always have a known size + | +LL | &X(&*Y) + | + error: aborting due to previous error |
