about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/compile-fail/chalkify/chalk_initial_program.rs16
-rw-r--r--src/test/compile-fail/chalkify/generic_impls.rs18
-rw-r--r--src/test/compile-fail/chalkify/impl_wf.rs39
-rw-r--r--src/test/compile-fail/chalkify/recursive_where_clause_on_type.rs28
-rw-r--r--src/test/compile-fail/chalkify/type_wf.rs24
-rw-r--r--src/test/run-make-fulldeps/issue-69368/Makefile18
-rw-r--r--src/test/run-make-fulldeps/issue-69368/a.rs16
-rw-r--r--src/test/run-make-fulldeps/issue-69368/b.rs8
-rw-r--r--src/test/run-make-fulldeps/issue-69368/c.rs34
-rw-r--r--src/test/ui/allocator/custom.rs4
-rw-r--r--src/test/ui/allocator/xcrate-use.rs4
-rw-r--r--src/test/ui/associated-type-bounds/duplicate.stderr1
-rw-r--r--src/test/ui/chalkify/builtin-copy-clone.rs44
-rw-r--r--src/test/ui/chalkify/inherent_impl.rs42
-rw-r--r--src/test/ui/chalkify/lower_env1.rs14
-rw-r--r--src/test/ui/chalkify/lower_env1.stderr22
-rw-r--r--src/test/ui/chalkify/lower_env2.rs16
-rw-r--r--src/test/ui/chalkify/lower_env2.stderr23
-rw-r--r--src/test/ui/chalkify/lower_env3.rs16
-rw-r--r--src/test/ui/chalkify/lower_env3.stderr20
-rw-r--r--src/test/ui/chalkify/lower_impl.rs19
-rw-r--r--src/test/ui/chalkify/lower_impl.stderr18
-rw-r--r--src/test/ui/chalkify/lower_struct.rs8
-rw-r--r--src/test/ui/chalkify/lower_struct.stderr13
-rw-r--r--src/test/ui/chalkify/lower_trait.rs13
-rw-r--r--src/test/ui/chalkify/lower_trait.stderr24
-rw-r--r--src/test/ui/chalkify/lower_trait_higher_rank.rs10
-rw-r--r--src/test/ui/chalkify/lower_trait_higher_rank.stderr13
-rw-r--r--src/test/ui/chalkify/lower_trait_where_clause.rs17
-rw-r--r--src/test/ui/chalkify/lower_trait_where_clause.stderr15
-rw-r--r--src/test/ui/chalkify/projection.rs25
-rw-r--r--src/test/ui/chalkify/super_trait.rs19
-rw-r--r--src/test/ui/chalkify/trait_implied_bound.rs18
-rw-r--r--src/test/ui/chalkify/type_implied_bound.rs29
-rw-r--r--src/test/ui/chalkify/type_inference.rs26
-rw-r--r--src/test/ui/chalkify/type_inference.stderr23
-rw-r--r--src/test/ui/const-generics/issues/issue-65675.rs10
-rw-r--r--src/test/ui/const-generics/issues/issue-65675.stderr8
-rw-r--r--src/test/ui/error-codes/E0719.stderr1
-rw-r--r--src/test/ui/realloc-16687.rs12
-rw-r--r--src/test/ui/regions/regions-mock-codegen.rs14
41 files changed, 95 insertions, 647 deletions
diff --git a/src/test/compile-fail/chalkify/chalk_initial_program.rs b/src/test/compile-fail/chalkify/chalk_initial_program.rs
deleted file mode 100644
index df25bad622b..00000000000
--- a/src/test/compile-fail/chalkify/chalk_initial_program.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// compile-flags: -Z chalk
-
-trait Foo { }
-
-impl Foo for i32 { }
-
-impl Foo for u32 { }
-
-fn gimme<F: Foo>() { }
-
-// Note: this also tests that `std::process::Termination` is implemented for `()`.
-fn main() {
-    gimme::<i32>();
-    gimme::<u32>();
-    gimme::<f32>(); //~ERROR the trait bound `f32: Foo` is not satisfied
-}
diff --git a/src/test/compile-fail/chalkify/generic_impls.rs b/src/test/compile-fail/chalkify/generic_impls.rs
deleted file mode 100644
index d70c6f8055d..00000000000
--- a/src/test/compile-fail/chalkify/generic_impls.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-// compile-flags: -Z chalk
-
-trait Foo { }
-
-impl<T> Foo for (T, u32) { }
-
-fn gimme<F: Foo>() { }
-
-fn foo<T>() {
-    gimme::<(T, u32)>();
-    gimme::<(Option<T>, u32)>();
-    gimme::<(Option<T>, f32)>(); //~ ERROR
-}
-
-fn main() {
-    gimme::<(i32, u32)>();
-    gimme::<(i32, f32)>(); //~ ERROR
-}
diff --git a/src/test/compile-fail/chalkify/impl_wf.rs b/src/test/compile-fail/chalkify/impl_wf.rs
deleted file mode 100644
index 6bb4cf86e79..00000000000
--- a/src/test/compile-fail/chalkify/impl_wf.rs
+++ /dev/null
@@ -1,39 +0,0 @@
-// compile-flags: -Z chalk
-
-trait Foo: Sized { }
-
-trait Bar {
-    type Item: Foo;
-}
-
-impl Foo for i32 { }
-
-impl Foo for str { }
-//~^ ERROR the size for values of type `str` cannot be known at compilation time
-
-// Implicit `T: Sized` bound.
-impl<T> Foo for Option<T> { }
-
-impl Bar for () {
-    type Item = i32;
-}
-
-impl<T> Bar for Option<T> {
-    type Item = Option<T>;
-}
-
-impl Bar for f32 {
-//~^ ERROR the trait bound `f32: Foo` is not satisfied
-    type Item = f32;
-    //~^ ERROR the trait bound `f32: Foo` is not satisfied
-}
-
-trait Baz<U: ?Sized> where U: Foo { }
-
-impl Baz<i32> for i32 { }
-
-impl Baz<f32> for f32 { }
-//~^ ERROR the trait bound `f32: Foo` is not satisfied
-
-fn main() {
-}
diff --git a/src/test/compile-fail/chalkify/recursive_where_clause_on_type.rs b/src/test/compile-fail/chalkify/recursive_where_clause_on_type.rs
deleted file mode 100644
index 861f86e6165..00000000000
--- a/src/test/compile-fail/chalkify/recursive_where_clause_on_type.rs
+++ /dev/null
@@ -1,28 +0,0 @@
-// compile-flags: -Z chalk
-
-#![feature(trivial_bounds)]
-
-trait Bar {
-    fn foo();
-}
-trait Foo: Bar { }
-
-struct S where S: Foo;
-
-impl Foo for S {
-}
-
-fn bar<T: Bar>() {
-    T::foo();
-}
-
-fn foo<T: Foo>() {
-    bar::<T>()
-}
-
-fn main() {
-    // For some reason, the error is duplicated...
-
-    foo::<S>() //~ ERROR the type `S` is not well-formed (chalk)
-    //~^ ERROR the type `S` is not well-formed (chalk)
-}
diff --git a/src/test/compile-fail/chalkify/type_wf.rs b/src/test/compile-fail/chalkify/type_wf.rs
deleted file mode 100644
index d1aa975ddc2..00000000000
--- a/src/test/compile-fail/chalkify/type_wf.rs
+++ /dev/null
@@ -1,24 +0,0 @@
-// compile-flags: -Z chalk
-
-trait Foo { }
-
-struct S<T: Foo> {
-    x: T,
-}
-
-impl Foo for i32 { }
-impl<T> Foo for Option<T> { }
-
-fn main() {
-    let s = S {
-       x: 5,
-    };
-
-    let s = S { //~ ERROR the trait bound `{float}: Foo` is not satisfied
-        x: 5.0,
-    };
-
-    let s = S {
-        x: Some(5.0),
-    };
-}
diff --git a/src/test/run-make-fulldeps/issue-69368/Makefile b/src/test/run-make-fulldeps/issue-69368/Makefile
new file mode 100644
index 00000000000..dbb044d8f5d
--- /dev/null
+++ b/src/test/run-make-fulldeps/issue-69368/Makefile
@@ -0,0 +1,18 @@
+-include ../tools.mk
+
+# Test that previously triggered a linker failure with root cause
+# similar to one found in the issue #69368.
+#
+# The crate that provides oom lang item is missing some other lang
+# items. Necessary to prevent the use of start-group / end-group.
+#
+# The weak lang items are defined in a separate compilation units,
+# so that linker could omit them if not used.
+#
+# The crates that need those weak lang items are dependencies of
+# crates that provide them.
+
+all:
+	$(RUSTC) a.rs
+	$(RUSTC) b.rs
+	$(RUSTC) c.rs
diff --git a/src/test/run-make-fulldeps/issue-69368/a.rs b/src/test/run-make-fulldeps/issue-69368/a.rs
new file mode 100644
index 00000000000..726db874637
--- /dev/null
+++ b/src/test/run-make-fulldeps/issue-69368/a.rs
@@ -0,0 +1,16 @@
+#![crate_type = "rlib"]
+#![feature(lang_items)]
+#![feature(panic_unwind)]
+#![no_std]
+
+extern crate panic_unwind;
+
+#[panic_handler]
+pub fn panic_handler(_: &core::panic::PanicInfo) -> ! {
+    loop {}
+}
+
+#[no_mangle]
+extern "C" fn __rust_drop_panic() -> ! {
+    loop {}
+}
diff --git a/src/test/run-make-fulldeps/issue-69368/b.rs b/src/test/run-make-fulldeps/issue-69368/b.rs
new file mode 100644
index 00000000000..4d6af026656
--- /dev/null
+++ b/src/test/run-make-fulldeps/issue-69368/b.rs
@@ -0,0 +1,8 @@
+#![crate_type = "rlib"]
+#![feature(alloc_error_handler)]
+#![no_std]
+
+#[alloc_error_handler]
+pub fn error_handler(_: core::alloc::Layout) -> ! {
+    panic!();
+}
diff --git a/src/test/run-make-fulldeps/issue-69368/c.rs b/src/test/run-make-fulldeps/issue-69368/c.rs
new file mode 100644
index 00000000000..729c4249a05
--- /dev/null
+++ b/src/test/run-make-fulldeps/issue-69368/c.rs
@@ -0,0 +1,34 @@
+#![crate_type = "bin"]
+#![feature(start)]
+#![no_std]
+
+extern crate alloc;
+extern crate a;
+extern crate b;
+
+use alloc::vec::Vec;
+use core::alloc::*;
+
+struct Allocator;
+
+unsafe impl GlobalAlloc for Allocator {
+    unsafe fn alloc(&self, _: Layout) -> *mut u8 {
+        loop {}
+    }
+
+    unsafe fn dealloc(&self, _: *mut u8, _: Layout) {
+        loop {}
+    }
+}
+
+#[global_allocator]
+static ALLOCATOR: Allocator = Allocator;
+
+#[start]
+fn main(argc: isize, _argv: *const *const u8) -> isize {
+    let mut v = Vec::new();
+    for i in 0..argc {
+        v.push(i);
+    }
+    v.iter().sum()
+}
diff --git a/src/test/ui/allocator/custom.rs b/src/test/ui/allocator/custom.rs
index 0b1f6d5a96e..c275db14b42 100644
--- a/src/test/ui/allocator/custom.rs
+++ b/src/test/ui/allocator/custom.rs
@@ -37,7 +37,7 @@ fn main() {
     unsafe {
         let layout = Layout::from_size_align(4, 2).unwrap();
 
-        let ptr = Global.alloc(layout.clone()).unwrap();
+        let (ptr, _) = Global.alloc(layout.clone()).unwrap();
         helper::work_with(&ptr);
         assert_eq!(HITS.load(Ordering::SeqCst), n + 1);
         Global.dealloc(ptr, layout.clone());
@@ -49,7 +49,7 @@ fn main() {
         drop(s);
         assert_eq!(HITS.load(Ordering::SeqCst), n + 4);
 
-        let ptr = System.alloc(layout.clone()).unwrap();
+        let (ptr, _) = System.alloc(layout.clone()).unwrap();
         assert_eq!(HITS.load(Ordering::SeqCst), n + 4);
         helper::work_with(&ptr);
         System.dealloc(ptr, layout);
diff --git a/src/test/ui/allocator/xcrate-use.rs b/src/test/ui/allocator/xcrate-use.rs
index 37b28c195df..e4746d1a7ec 100644
--- a/src/test/ui/allocator/xcrate-use.rs
+++ b/src/test/ui/allocator/xcrate-use.rs
@@ -20,13 +20,13 @@ fn main() {
         let n = GLOBAL.0.load(Ordering::SeqCst);
         let layout = Layout::from_size_align(4, 2).unwrap();
 
-        let ptr = Global.alloc(layout.clone()).unwrap();
+        let (ptr, _) = Global.alloc(layout.clone()).unwrap();
         helper::work_with(&ptr);
         assert_eq!(GLOBAL.0.load(Ordering::SeqCst), n + 1);
         Global.dealloc(ptr, layout.clone());
         assert_eq!(GLOBAL.0.load(Ordering::SeqCst), n + 2);
 
-        let ptr = System.alloc(layout.clone()).unwrap();
+        let (ptr, _) = System.alloc(layout.clone()).unwrap();
         assert_eq!(GLOBAL.0.load(Ordering::SeqCst), n + 2);
         helper::work_with(&ptr);
         System.dealloc(ptr, layout);
diff --git a/src/test/ui/associated-type-bounds/duplicate.stderr b/src/test/ui/associated-type-bounds/duplicate.stderr
index df1151d876c..82b2d32d09d 100644
--- a/src/test/ui/associated-type-bounds/duplicate.stderr
+++ b/src/test/ui/associated-type-bounds/duplicate.stderr
@@ -728,3 +728,4 @@ LL | type TADyn3 = dyn Iterator<Item: 'static, Item: 'static>;
 
 error: aborting due to 96 previous errors
 
+For more information about this error, try `rustc --explain E0719`.
diff --git a/src/test/ui/chalkify/builtin-copy-clone.rs b/src/test/ui/chalkify/builtin-copy-clone.rs
deleted file mode 100644
index d403514b553..00000000000
--- a/src/test/ui/chalkify/builtin-copy-clone.rs
+++ /dev/null
@@ -1,44 +0,0 @@
-// run-pass
-// compile-flags: -Z chalk
-
-// Test that `Clone` is correctly implemented for builtin types.
-
-#[derive(Copy, Clone)]
-struct S(i32);
-
-fn test_clone<T: Clone>(arg: T) {
-    let _ = arg.clone();
-}
-
-fn test_copy<T: Copy>(arg: T) {
-    let _ = arg;
-    let _ = arg;
-}
-
-fn test_copy_clone<T: Copy + Clone>(arg: T) {
-    test_copy(arg);
-    test_clone(arg);
-}
-
-fn foo() { }
-
-fn main() {
-    test_copy_clone(foo);
-    let f: fn() = foo;
-    test_copy_clone(f);
-    // FIXME: add closures when they're considered WF
-    test_copy_clone([1; 56]);
-    test_copy_clone((1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1));
-    test_copy_clone((1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, true, 'a', 1.1));
-    test_copy_clone(());
-    test_copy_clone(((1, 1), (1, 1, 1), (1.1, 1, 1, 'a'), ()));
-
-    let a = (
-        (S(1), S(0)),
-        (
-            (S(0), S(0), S(1)),
-            S(0)
-        )
-    );
-    test_copy_clone(a);
-}
diff --git a/src/test/ui/chalkify/inherent_impl.rs b/src/test/ui/chalkify/inherent_impl.rs
deleted file mode 100644
index 44e120c1eeb..00000000000
--- a/src/test/ui/chalkify/inherent_impl.rs
+++ /dev/null
@@ -1,42 +0,0 @@
-// run-pass
-// compile-flags: -Z chalk
-
-trait Foo { }
-
-impl Foo for i32 { }
-
-struct S<T: Foo> {
-    x: T,
-}
-
-fn only_foo<T: Foo>(_x: &T) { }
-
-impl<T> S<T> {
-    // Test that we have the correct environment inside an inherent method.
-    fn dummy_foo(&self) {
-        only_foo(&self.x)
-    }
-}
-
-trait Bar { }
-impl Bar for u32 { }
-
-fn only_bar<T: Bar>() { }
-
-impl<T> S<T> {
-    // Test that the environment of `dummy_bar` adds up with the environment
-    // of the inherent impl.
-    fn dummy_bar<U: Bar>(&self) {
-        only_foo(&self.x);
-        only_bar::<U>();
-    }
-}
-
-fn main() {
-    let s = S {
-        x: 5,
-    };
-
-    s.dummy_foo();
-    s.dummy_bar::<u32>();
-}
diff --git a/src/test/ui/chalkify/lower_env1.rs b/src/test/ui/chalkify/lower_env1.rs
deleted file mode 100644
index afb6bddbf26..00000000000
--- a/src/test/ui/chalkify/lower_env1.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-#![feature(rustc_attrs)]
-#![allow(dead_code)]
-
-trait Foo { }
-
-#[rustc_dump_program_clauses] //~ ERROR program clause dump
-trait Bar where Self: Foo { }
-
-#[rustc_dump_env_program_clauses] //~ ERROR program clause dump
-fn bar<T: Bar + ?Sized>() {
-}
-
-fn main() {
-}
diff --git a/src/test/ui/chalkify/lower_env1.stderr b/src/test/ui/chalkify/lower_env1.stderr
deleted file mode 100644
index bc426e0707b..00000000000
--- a/src/test/ui/chalkify/lower_env1.stderr
+++ /dev/null
@@ -1,22 +0,0 @@
-error: program clause dump
-  --> $DIR/lower_env1.rs:6:1
-   |
-LL | #[rustc_dump_program_clauses]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: forall<Self> { FromEnv(Self: Foo) :- FromEnv(Self: Bar). }
-   = note: forall<Self> { Implemented(Self: Bar) :- FromEnv(Self: Bar). }
-   = note: forall<Self> { WellFormed(Self: Bar) :- Implemented(Self: Bar), WellFormed(Self: Foo). }
-
-error: program clause dump
-  --> $DIR/lower_env1.rs:9:1
-   |
-LL | #[rustc_dump_env_program_clauses]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: forall<Self> { FromEnv(Self: Foo) :- FromEnv(Self: Bar). }
-   = note: forall<Self> { Implemented(Self: Bar) :- FromEnv(Self: Bar). }
-   = note: forall<Self> { Implemented(Self: Foo) :- FromEnv(Self: Foo). }
-
-error: aborting due to 2 previous errors
-
diff --git a/src/test/ui/chalkify/lower_env2.rs b/src/test/ui/chalkify/lower_env2.rs
deleted file mode 100644
index a067575a9cf..00000000000
--- a/src/test/ui/chalkify/lower_env2.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-#![feature(rustc_attrs)]
-#![allow(dead_code)]
-
-trait Foo { }
-
-#[rustc_dump_program_clauses] //~ ERROR program clause dump
-struct S<'a, T: ?Sized> where T: Foo {
-    data: &'a T,
-}
-
-#[rustc_dump_env_program_clauses] //~ ERROR program clause dump
-fn bar<T: Foo>(_x: S<'_, T>) { // note that we have an implicit `T: Sized` bound
-}
-
-fn main() {
-}
diff --git a/src/test/ui/chalkify/lower_env2.stderr b/src/test/ui/chalkify/lower_env2.stderr
deleted file mode 100644
index 613a568a854..00000000000
--- a/src/test/ui/chalkify/lower_env2.stderr
+++ /dev/null
@@ -1,23 +0,0 @@
-error: program clause dump
-  --> $DIR/lower_env2.rs:6:1
-   |
-LL | #[rustc_dump_program_clauses]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: forall<'a, T> { FromEnv(T: Foo) :- FromEnv(S<'a, T>). }
-   = note: forall<'a, T> { TypeOutlives(T: 'a) :- FromEnv(S<'a, T>). }
-   = note: forall<'a, T> { WellFormed(S<'a, T>) :- WellFormed(T: Foo), TypeOutlives(T: 'a). }
-
-error: program clause dump
-  --> $DIR/lower_env2.rs:11:1
-   |
-LL | #[rustc_dump_env_program_clauses]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: forall<'a, T> { FromEnv(T: Foo) :- FromEnv(S<'a, T>). }
-   = note: forall<'a, T> { TypeOutlives(T: 'a) :- FromEnv(S<'a, T>). }
-   = note: forall<Self> { Implemented(Self: Foo) :- FromEnv(Self: Foo). }
-   = note: forall<Self> { Implemented(Self: std::marker::Sized) :- FromEnv(Self: std::marker::Sized). }
-
-error: aborting due to 2 previous errors
-
diff --git a/src/test/ui/chalkify/lower_env3.rs b/src/test/ui/chalkify/lower_env3.rs
deleted file mode 100644
index 61ed3cbb277..00000000000
--- a/src/test/ui/chalkify/lower_env3.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-#![feature(rustc_attrs)]
-#![allow(dead_code)]
-
-trait Foo {
-    #[rustc_dump_env_program_clauses] //~ ERROR program clause dump
-    fn foo(&self);
-}
-
-impl<T> Foo for T where T: Clone {
-    #[rustc_dump_env_program_clauses] //~ ERROR program clause dump
-    fn foo(&self) {
-    }
-}
-
-fn main() {
-}
diff --git a/src/test/ui/chalkify/lower_env3.stderr b/src/test/ui/chalkify/lower_env3.stderr
deleted file mode 100644
index a1fc83bfea8..00000000000
--- a/src/test/ui/chalkify/lower_env3.stderr
+++ /dev/null
@@ -1,20 +0,0 @@
-error: program clause dump
-  --> $DIR/lower_env3.rs:5:5
-   |
-LL |     #[rustc_dump_env_program_clauses]
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: forall<Self> { Implemented(Self: Foo) :- FromEnv(Self: Foo). }
-
-error: program clause dump
-  --> $DIR/lower_env3.rs:10:5
-   |
-LL |     #[rustc_dump_env_program_clauses]
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: forall<Self> { FromEnv(Self: std::marker::Sized) :- FromEnv(Self: std::clone::Clone). }
-   = note: forall<Self> { Implemented(Self: std::clone::Clone) :- FromEnv(Self: std::clone::Clone). }
-   = note: forall<Self> { Implemented(Self: std::marker::Sized) :- FromEnv(Self: std::marker::Sized). }
-
-error: aborting due to 2 previous errors
-
diff --git a/src/test/ui/chalkify/lower_impl.rs b/src/test/ui/chalkify/lower_impl.rs
deleted file mode 100644
index 1bd44a9f498..00000000000
--- a/src/test/ui/chalkify/lower_impl.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-#![feature(rustc_attrs)]
-
-trait Foo { }
-
-#[rustc_dump_program_clauses] //~ ERROR program clause dump
-impl<T: 'static> Foo for T where T: Iterator<Item = i32> { }
-
-trait Bar {
-    type Assoc;
-}
-
-impl<T> Bar for T where T: Iterator<Item = i32> {
-    #[rustc_dump_program_clauses] //~ ERROR program clause dump
-    type Assoc = Vec<T>;
-}
-
-fn main() {
-    println!("hello");
-}
diff --git a/src/test/ui/chalkify/lower_impl.stderr b/src/test/ui/chalkify/lower_impl.stderr
deleted file mode 100644
index d6827fbff3d..00000000000
--- a/src/test/ui/chalkify/lower_impl.stderr
+++ /dev/null
@@ -1,18 +0,0 @@
-error: program clause dump
-  --> $DIR/lower_impl.rs:5:1
-   |
-LL | #[rustc_dump_program_clauses]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: forall<T> { Implemented(T: Foo) :- ProjectionEq(<T as std::iter::Iterator>::Item == i32), TypeOutlives(T: 'static), Implemented(T: std::iter::Iterator), Implemented(T: std::marker::Sized). }
-
-error: program clause dump
-  --> $DIR/lower_impl.rs:13:5
-   |
-LL |     #[rustc_dump_program_clauses]
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: forall<T> { Normalize(<T as Bar>::Assoc -> std::vec::Vec<T>) :- Implemented(T: Bar). }
-
-error: aborting due to 2 previous errors
-
diff --git a/src/test/ui/chalkify/lower_struct.rs b/src/test/ui/chalkify/lower_struct.rs
deleted file mode 100644
index aecccea5c14..00000000000
--- a/src/test/ui/chalkify/lower_struct.rs
+++ /dev/null
@@ -1,8 +0,0 @@
-#![feature(rustc_attrs)]
-
-#[rustc_dump_program_clauses] //~ ERROR program clause dump
-struct Foo<'a, T> where Box<T>: Clone {
-    _x: std::marker::PhantomData<&'a T>,
-}
-
-fn main() { }
diff --git a/src/test/ui/chalkify/lower_struct.stderr b/src/test/ui/chalkify/lower_struct.stderr
deleted file mode 100644
index 0331c2fca16..00000000000
--- a/src/test/ui/chalkify/lower_struct.stderr
+++ /dev/null
@@ -1,13 +0,0 @@
-error: program clause dump
-  --> $DIR/lower_struct.rs:3:1
-   |
-LL | #[rustc_dump_program_clauses]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: forall<'a, T> { FromEnv(T: std::marker::Sized) :- FromEnv(Foo<'a, T>). }
-   = note: forall<'a, T> { FromEnv(std::boxed::Box<T>: std::clone::Clone) :- FromEnv(Foo<'a, T>). }
-   = note: forall<'a, T> { TypeOutlives(T: 'a) :- FromEnv(Foo<'a, T>). }
-   = note: forall<'a, T> { WellFormed(Foo<'a, T>) :- WellFormed(T: std::marker::Sized), WellFormed(std::boxed::Box<T>: std::clone::Clone), TypeOutlives(T: 'a). }
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/chalkify/lower_trait.rs b/src/test/ui/chalkify/lower_trait.rs
deleted file mode 100644
index 0e1956022f9..00000000000
--- a/src/test/ui/chalkify/lower_trait.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-#![feature(rustc_attrs)]
-
-trait Bar { }
-
-#[rustc_dump_program_clauses] //~ ERROR program clause dump
-trait Foo<S, T: ?Sized> {
-    #[rustc_dump_program_clauses] //~ ERROR program clause dump
-    type Assoc: Bar + ?Sized;
-}
-
-fn main() {
-    println!("hello");
-}
diff --git a/src/test/ui/chalkify/lower_trait.stderr b/src/test/ui/chalkify/lower_trait.stderr
deleted file mode 100644
index ed3bded398a..00000000000
--- a/src/test/ui/chalkify/lower_trait.stderr
+++ /dev/null
@@ -1,24 +0,0 @@
-error: program clause dump
-  --> $DIR/lower_trait.rs:5:1
-   |
-LL | #[rustc_dump_program_clauses]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: forall<Self, S, T> { FromEnv(<Self as Foo<S, T>>::Assoc: Bar) :- FromEnv(Self: Foo<S, T>). }
-   = note: forall<Self, S, T> { FromEnv(S: std::marker::Sized) :- FromEnv(Self: Foo<S, T>). }
-   = note: forall<Self, S, T> { Implemented(Self: Foo<S, T>) :- FromEnv(Self: Foo<S, T>). }
-   = note: forall<Self, S, T> { WellFormed(Self: Foo<S, T>) :- Implemented(Self: Foo<S, T>), WellFormed(S: std::marker::Sized), WellFormed(<Self as Foo<S, T>>::Assoc: Bar). }
-
-error: program clause dump
-  --> $DIR/lower_trait.rs:7:5
-   |
-LL |     #[rustc_dump_program_clauses]
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: forall<Self, S, T, ^3> { ProjectionEq(<Self as Foo<S, T>>::Assoc == ^3) :- Normalize(<Self as Foo<S, T>>::Assoc -> ^3). }
-   = note: forall<Self, S, T> { FromEnv(Self: Foo<S, T>) :- FromEnv(Unnormalized(<Self as Foo<S, T>>::Assoc)). }
-   = note: forall<Self, S, T> { ProjectionEq(<Self as Foo<S, T>>::Assoc == Unnormalized(<Self as Foo<S, T>>::Assoc)). }
-   = note: forall<Self, S, T> { WellFormed(Unnormalized(<Self as Foo<S, T>>::Assoc)) :- WellFormed(Self: Foo<S, T>). }
-
-error: aborting due to 2 previous errors
-
diff --git a/src/test/ui/chalkify/lower_trait_higher_rank.rs b/src/test/ui/chalkify/lower_trait_higher_rank.rs
deleted file mode 100644
index 715f09632bd..00000000000
--- a/src/test/ui/chalkify/lower_trait_higher_rank.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-#![feature(rustc_attrs)]
-
-#[rustc_dump_program_clauses] //~ ERROR program clause dump
-trait Foo<F: ?Sized> where for<'a> F: Fn(&'a (u8, u16)) -> &'a u8
-{
-}
-
-fn main() {
-    println!("hello");
-}
diff --git a/src/test/ui/chalkify/lower_trait_higher_rank.stderr b/src/test/ui/chalkify/lower_trait_higher_rank.stderr
deleted file mode 100644
index 79bbc9fa6b3..00000000000
--- a/src/test/ui/chalkify/lower_trait_higher_rank.stderr
+++ /dev/null
@@ -1,13 +0,0 @@
-error: program clause dump
-  --> $DIR/lower_trait_higher_rank.rs:3:1
-   |
-LL | #[rustc_dump_program_clauses]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: forall<'a, Self, F> { FromEnv(F: std::ops::Fn<(&'a (u8, u16),)>) :- FromEnv(Self: Foo<F>). }
-   = note: forall<'a, Self, F> { ProjectionEq(<F as std::ops::FnOnce<(&'a (u8, u16),)>>::Output == &'a u8) :- FromEnv(Self: Foo<F>). }
-   = note: forall<Self, F> { Implemented(Self: Foo<F>) :- FromEnv(Self: Foo<F>). }
-   = note: forall<Self, F> { WellFormed(Self: Foo<F>) :- Implemented(Self: Foo<F>), forall<'a> { WellFormed(F: std::ops::Fn<(&'a (u8, u16),)>) }, forall<'a> { ProjectionEq(<F as std::ops::FnOnce<(&'a (u8, u16),)>>::Output == &'a u8) }. }
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/chalkify/lower_trait_where_clause.rs b/src/test/ui/chalkify/lower_trait_where_clause.rs
deleted file mode 100644
index 78fa39f1dc1..00000000000
--- a/src/test/ui/chalkify/lower_trait_where_clause.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-#![feature(rustc_attrs)]
-
-use std::borrow::Borrow;
-
-#[rustc_dump_program_clauses] //~ ERROR program clause dump
-trait Foo<'a, 'b, T, U>
-where
-    T: Borrow<U> + ?Sized,
-    U: ?Sized + 'b,
-    'a: 'b,
-    Box<T>:, // NOTE(#53696) this checks an empty list of bounds.
-{
-}
-
-fn main() {
-    println!("hello");
-}
diff --git a/src/test/ui/chalkify/lower_trait_where_clause.stderr b/src/test/ui/chalkify/lower_trait_where_clause.stderr
deleted file mode 100644
index 408f3712a70..00000000000
--- a/src/test/ui/chalkify/lower_trait_where_clause.stderr
+++ /dev/null
@@ -1,15 +0,0 @@
-error: program clause dump
-  --> $DIR/lower_trait_where_clause.rs:5:1
-   |
-LL | #[rustc_dump_program_clauses]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: forall<'a, 'b, Self, T, U> { FromEnv(T: std::borrow::Borrow<U>) :- FromEnv(Self: Foo<'a, 'b, T, U>). }
-   = note: forall<'a, 'b, Self, T, U> { Implemented(Self: Foo<'a, 'b, T, U>) :- FromEnv(Self: Foo<'a, 'b, T, U>). }
-   = note: forall<'a, 'b, Self, T, U> { RegionOutlives('a: 'b) :- FromEnv(Self: Foo<'a, 'b, T, U>). }
-   = note: forall<'a, 'b, Self, T, U> { TypeOutlives(U: 'b) :- FromEnv(Self: Foo<'a, 'b, T, U>). }
-   = note: forall<'a, 'b, Self, T, U> { TypeOutlives(std::boxed::Box<T>: '<empty>) :- FromEnv(Self: Foo<'a, 'b, T, U>). }
-   = note: forall<'a, 'b, Self, T, U> { WellFormed(Self: Foo<'a, 'b, T, U>) :- Implemented(Self: Foo<'a, 'b, T, U>), WellFormed(T: std::borrow::Borrow<U>), TypeOutlives(U: 'b), RegionOutlives('a: 'b), TypeOutlives(std::boxed::Box<T>: '<empty>). }
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/chalkify/projection.rs b/src/test/ui/chalkify/projection.rs
deleted file mode 100644
index d6a8dd7a4a2..00000000000
--- a/src/test/ui/chalkify/projection.rs
+++ /dev/null
@@ -1,25 +0,0 @@
-// run-pass
-// compile-flags: -Z chalk
-
-trait Foo { }
-
-trait Bar {
-    type Item: Foo;
-}
-
-impl Foo for i32 { }
-impl Bar for i32 {
-    type Item = i32;
-}
-
-fn only_foo<T: Foo>() { }
-
-fn only_bar<T: Bar>() {
-    // `T` implements `Bar` hence `<T as Bar>::Item` must also implement `Bar`
-    only_foo::<T::Item>()
-}
-
-fn main() {
-    only_bar::<i32>();
-    only_foo::<<i32 as Bar>::Item>();
-}
diff --git a/src/test/ui/chalkify/super_trait.rs b/src/test/ui/chalkify/super_trait.rs
deleted file mode 100644
index eeff9fd9b80..00000000000
--- a/src/test/ui/chalkify/super_trait.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-// run-pass
-// compile-flags: -Z chalk
-
-trait Foo { }
-trait Bar: Foo { }
-
-impl Foo for i32 { }
-impl Bar for i32 { }
-
-fn only_foo<T: Foo>() { }
-
-fn only_bar<T: Bar>() {
-    // `T` implements `Bar` hence `T` must also implement `Foo`
-    only_foo::<T>()
-}
-
-fn main() {
-    only_bar::<i32>()
-}
diff --git a/src/test/ui/chalkify/trait_implied_bound.rs b/src/test/ui/chalkify/trait_implied_bound.rs
deleted file mode 100644
index 8a2e1cf5990..00000000000
--- a/src/test/ui/chalkify/trait_implied_bound.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-// run-pass
-// compile-flags: -Z chalk
-
-trait Foo { }
-trait Bar<U> where U: Foo { }
-
-impl Foo for i32 { }
-impl Bar<i32> for i32 { }
-
-fn only_foo<T: Foo>() { }
-
-fn only_bar<U, T: Bar<U>>() {
-    only_foo::<U>()
-}
-
-fn main() {
-    only_bar::<i32, i32>()
-}
diff --git a/src/test/ui/chalkify/type_implied_bound.rs b/src/test/ui/chalkify/type_implied_bound.rs
deleted file mode 100644
index 8673f5319bd..00000000000
--- a/src/test/ui/chalkify/type_implied_bound.rs
+++ /dev/null
@@ -1,29 +0,0 @@
-// run-pass
-// compile-flags: -Z chalk
-
-trait Eq { }
-trait Hash: Eq { }
-
-impl Eq for i32 { }
-impl Hash for i32 { }
-
-struct Set<T: Hash> {
-    _x: T,
-}
-
-fn only_eq<T: Eq>() { }
-
-fn take_a_set<T>(_: &Set<T>) {
-    // `Set<T>` is an input type of `take_a_set`, hence we know that
-    // `T` must implement `Hash`, and we know in turn that `T` must
-    // implement `Eq`.
-    only_eq::<T>()
-}
-
-fn main() {
-    let set = Set {
-        _x: 5,
-    };
-
-    take_a_set(&set);
-}
diff --git a/src/test/ui/chalkify/type_inference.rs b/src/test/ui/chalkify/type_inference.rs
deleted file mode 100644
index 62a53ec0317..00000000000
--- a/src/test/ui/chalkify/type_inference.rs
+++ /dev/null
@@ -1,26 +0,0 @@
-// compile-flags: -Z chalk
-
-trait Foo { }
-impl Foo for i32 { }
-
-trait Bar { }
-impl Bar for i32 { }
-impl Bar for u32 { }
-
-fn only_foo<T: Foo>(_x: T) { }
-
-fn only_bar<T: Bar>(_x: T) { }
-
-fn main() {
-    let x = 5.0;
-
-    // The only type which implements `Foo` is `i32`, so the chalk trait solver
-    // is expecting a variable of type `i32`. This behavior differs from the
-    // old-style trait solver. I guess this will change, that's why I'm
-    // adding that test.
-    only_foo(x); //~ ERROR mismatched types
-
-    // Here we have two solutions so we get back the behavior of the old-style
-    // trait solver.
-    only_bar(x); //~ ERROR the trait bound `{float}: Bar` is not satisfied
-}
diff --git a/src/test/ui/chalkify/type_inference.stderr b/src/test/ui/chalkify/type_inference.stderr
deleted file mode 100644
index b8152caf3d2..00000000000
--- a/src/test/ui/chalkify/type_inference.stderr
+++ /dev/null
@@ -1,23 +0,0 @@
-error[E0308]: mismatched types
-  --> $DIR/type_inference.rs:21:14
-   |
-LL |     only_foo(x);
-   |              ^ expected `i32`, found floating-point number
-
-error[E0277]: the trait bound `{float}: Bar` is not satisfied
-  --> $DIR/type_inference.rs:25:5
-   |
-LL | fn only_bar<T: Bar>(_x: T) { }
-   |    --------    --- required by this bound in `only_bar`
-...
-LL |     only_bar(x);
-   |     ^^^^^^^^ the trait `Bar` is not implemented for `{float}`
-   |
-   = help: the following implementations were found:
-             <i32 as Bar>
-             <u32 as Bar>
-
-error: aborting due to 2 previous errors
-
-Some errors have detailed explanations: E0277, E0308.
-For more information about an error, try `rustc --explain E0277`.
diff --git a/src/test/ui/const-generics/issues/issue-65675.rs b/src/test/ui/const-generics/issues/issue-65675.rs
deleted file mode 100644
index 3ca527313f9..00000000000
--- a/src/test/ui/const-generics/issues/issue-65675.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-// run-pass
-// compile-flags: -Z chalk
-
-#![feature(const_generics)]
-//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
-
-pub struct Foo<T, const N: usize>([T; N]);
-impl<T, const N: usize> Foo<T, {N}> {}
-
-fn main() {}
diff --git a/src/test/ui/const-generics/issues/issue-65675.stderr b/src/test/ui/const-generics/issues/issue-65675.stderr
deleted file mode 100644
index 60b388e6278..00000000000
--- a/src/test/ui/const-generics/issues/issue-65675.stderr
+++ /dev/null
@@ -1,8 +0,0 @@
-warning: the feature `const_generics` is incomplete and may cause the compiler to crash
-  --> $DIR/issue-65675.rs:4:12
-   |
-LL | #![feature(const_generics)]
-   |            ^^^^^^^^^^^^^^
-   |
-   = note: `#[warn(incomplete_features)]` on by default
-
diff --git a/src/test/ui/error-codes/E0719.stderr b/src/test/ui/error-codes/E0719.stderr
index a046fbfc3d0..0e4bbf083ba 100644
--- a/src/test/ui/error-codes/E0719.stderr
+++ b/src/test/ui/error-codes/E0719.stderr
@@ -16,3 +16,4 @@ LL | fn test() -> Box<dyn Iterator<Item = (), Item = Unit>> {
 
 error: aborting due to 2 previous errors
 
+For more information about this error, try `rustc --explain E0719`.
diff --git a/src/test/ui/realloc-16687.rs b/src/test/ui/realloc-16687.rs
index 425aa83e70a..eb6224ad1bb 100644
--- a/src/test/ui/realloc-16687.rs
+++ b/src/test/ui/realloc-16687.rs
@@ -41,13 +41,13 @@ unsafe fn test_triangle() -> bool {
             println!("allocate({:?})", layout);
         }
 
-        let ret = Global.alloc(layout).unwrap_or_else(|_| handle_alloc_error(layout));
+        let (ptr, _) = Global.alloc(layout).unwrap_or_else(|_| handle_alloc_error(layout));
 
         if PRINT {
-            println!("allocate({:?}) = {:?}", layout, ret);
+            println!("allocate({:?}) = {:?}", layout, ptr);
         }
 
-        ret.cast().as_ptr()
+        ptr.cast().as_ptr()
     }
 
     unsafe fn deallocate(ptr: *mut u8, layout: Layout) {
@@ -63,16 +63,16 @@ unsafe fn test_triangle() -> bool {
             println!("reallocate({:?}, old={:?}, new={:?})", ptr, old, new);
         }
 
-        let ret = Global.realloc(NonNull::new_unchecked(ptr), old, new.size())
+        let (ptr, _) = Global.realloc(NonNull::new_unchecked(ptr), old, new.size())
             .unwrap_or_else(|_| handle_alloc_error(
                 Layout::from_size_align_unchecked(new.size(), old.align())
             ));
 
         if PRINT {
             println!("reallocate({:?}, old={:?}, new={:?}) = {:?}",
-                     ptr, old, new, ret);
+                     ptr, old, new, ptr);
         }
-        ret.cast().as_ptr()
+        ptr.cast().as_ptr()
     }
 
     fn idx_to_size(i: usize) -> usize { (i+1) * 10 }
diff --git a/src/test/ui/regions/regions-mock-codegen.rs b/src/test/ui/regions/regions-mock-codegen.rs
index f50b1c8b17f..fe3a864fe4b 100644
--- a/src/test/ui/regions/regions-mock-codegen.rs
+++ b/src/test/ui/regions/regions-mock-codegen.rs
@@ -24,29 +24,29 @@ struct Ccx {
     x: isize
 }
 
-fn alloc<'a>(_bcx : &'a arena) -> &'a Bcx<'a> {
+fn alloc(_bcx: &arena) -> &Bcx<'_> {
     unsafe {
         let layout = Layout::new::<Bcx>();
-        let ptr = Global.alloc(layout).unwrap_or_else(|_| handle_alloc_error(layout));
+        let (ptr, _) = Global.alloc(layout).unwrap_or_else(|_| handle_alloc_error(layout));
         &*(ptr.as_ptr() as *const _)
     }
 }
 
-fn h<'a>(bcx : &'a Bcx<'a>) -> &'a Bcx<'a> {
+fn h<'a>(bcx: &'a Bcx<'a>) -> &'a Bcx<'a> {
     return alloc(bcx.fcx.arena);
 }
 
-fn g(fcx : &Fcx) {
-    let bcx = Bcx { fcx: fcx };
+fn g(fcx: &Fcx) {
+    let bcx = Bcx { fcx };
     let bcx2 = h(&bcx);
     unsafe {
         Global.dealloc(NonNull::new_unchecked(bcx2 as *const _ as *mut _), Layout::new::<Bcx>());
     }
 }
 
-fn f(ccx : &Ccx) {
+fn f(ccx: &Ccx) {
     let a = arena(());
-    let fcx = Fcx { arena: &a, ccx: ccx };
+    let fcx = Fcx { arena: &a, ccx };
     return g(&fcx);
 }