diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2021-11-02 23:48:47 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-02 23:48:47 +0100 |
| commit | bc487f7dd26d6a243bf63b4ac68bec9a7d9aa5a6 (patch) | |
| tree | c6cbddd716bce142f065028dd862420fc955cfbf /src | |
| parent | 40f01aaa56a591fd228d894cb8d1e679ca1293b3 (diff) | |
| parent | b40aa64e48836a8582fd949033342e5c1a20dae4 (diff) | |
| download | rust-bc487f7dd26d6a243bf63b4ac68bec9a7d9aa5a6.tar.gz rust-bc487f7dd26d6a243bf63b4ac68bec9a7d9aa5a6.zip | |
Rollup merge of #90417 - lcnr:stabilize-relaxed-struct-unsizing, r=wesleywiser
stabilize `relaxed_struct_unsize` closes #81793 the fcp is already complete.
Diffstat (limited to 'src')
3 files changed, 0 insertions, 25 deletions
diff --git a/src/test/ui/feature-gates/feature-gate-relaxed_struct_unsize.rs b/src/test/ui/feature-gates/feature-gate-relaxed_struct_unsize.rs deleted file mode 100644 index 0cfd0a0b978..00000000000 --- a/src/test/ui/feature-gates/feature-gate-relaxed_struct_unsize.rs +++ /dev/null @@ -1,10 +0,0 @@ -// Test that we allow unsizing even if there is an unchanged param in the -// field getting unsized. -struct A<T, U: ?Sized + 'static>(T, B<T, U>); -struct B<T, U: ?Sized>(T, U); - -fn main() { - let x: A<[u32; 1], [u32; 1]> = A([0; 1], B([0; 1], [0; 1])); - let y: &A<[u32; 1], [u32]> = &x; //~ ERROR mismatched types - assert_eq!(y.1.1.len(), 1); -} diff --git a/src/test/ui/feature-gates/feature-gate-relaxed_struct_unsize.stderr b/src/test/ui/feature-gates/feature-gate-relaxed_struct_unsize.stderr deleted file mode 100644 index f62def47726..00000000000 --- a/src/test/ui/feature-gates/feature-gate-relaxed_struct_unsize.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0308]: mismatched types - --> $DIR/feature-gate-relaxed_struct_unsize.rs:8:34 - | -LL | let y: &A<[u32; 1], [u32]> = &x; - | ------------------- ^^ expected slice `[u32]`, found array `[u32; 1]` - | | - | expected due to this - | - = note: expected reference `&A<[u32; 1], [u32]>` - found reference `&A<[u32; 1], [u32; 1]>` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/unsized/unchanged-param.rs b/src/test/ui/unsized/unchanged-param.rs index 83199e8112e..93c7af68ac3 100644 --- a/src/test/ui/unsized/unchanged-param.rs +++ b/src/test/ui/unsized/unchanged-param.rs @@ -1,4 +1,3 @@ -#![feature(relaxed_struct_unsize)] // run-pass // Test that we allow unsizing even if there is an unchanged param in the // field getting unsized. |
