summaryrefslogtreecommitdiffstats
path: root/src/test/ui/cross
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/cross')
-rw-r--r--src/test/ui/cross/cross-borrow-trait.rs13
-rw-r--r--src/test/ui/cross/cross-borrow-trait.stderr14
-rw-r--r--src/test/ui/cross/cross-crate-macro-backtrace/auxiliary/extern_macro_crate.rs13
-rw-r--r--src/test/ui/cross/cross-crate-macro-backtrace/main.rs8
-rw-r--r--src/test/ui/cross/cross-crate-macro-backtrace/main.stderr10
-rw-r--r--src/test/ui/cross/cross-file-errors/main.rs7
-rw-r--r--src/test/ui/cross/cross-file-errors/main.stderr15
-rw-r--r--src/test/ui/cross/cross-file-errors/underscore.rs10
-rw-r--r--src/test/ui/cross/cross-fn-cache-hole.rs31
-rw-r--r--src/test/ui/cross/cross-fn-cache-hole.stderr12
10 files changed, 0 insertions, 133 deletions
diff --git a/src/test/ui/cross/cross-borrow-trait.rs b/src/test/ui/cross/cross-borrow-trait.rs
deleted file mode 100644
index 180a75e3d..000000000
--- a/src/test/ui/cross/cross-borrow-trait.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// Test that cross-borrowing (implicitly converting from `Box<T>` to `&T`) is
-// forbidden when `T` is a trait.
-
-struct Foo;
-trait Trait { fn foo(&self) {} }
-impl Trait for Foo {}
-
-pub fn main() {
- let x: Box<dyn Trait> = Box::new(Foo);
- let _y: &dyn Trait = x; //~ ERROR E0308
- //~| expected reference `&dyn Trait`
- //~| found struct `Box<dyn Trait>`
-}
diff --git a/src/test/ui/cross/cross-borrow-trait.stderr b/src/test/ui/cross/cross-borrow-trait.stderr
deleted file mode 100644
index 81f309eae..000000000
--- a/src/test/ui/cross/cross-borrow-trait.stderr
+++ /dev/null
@@ -1,14 +0,0 @@
-error[E0308]: mismatched types
- --> $DIR/cross-borrow-trait.rs:10:26
- |
-LL | let _y: &dyn Trait = x;
- | ---------- ^ expected `&dyn Trait`, found struct `Box`
- | |
- | expected due to this
- |
- = note: expected reference `&dyn Trait`
- found struct `Box<dyn Trait>`
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/ui/cross/cross-crate-macro-backtrace/auxiliary/extern_macro_crate.rs b/src/test/ui/cross/cross-crate-macro-backtrace/auxiliary/extern_macro_crate.rs
deleted file mode 100644
index fbda3dbe9..000000000
--- a/src/test/ui/cross/cross-crate-macro-backtrace/auxiliary/extern_macro_crate.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-#![crate_type = "dylib"]
-
-pub fn print(_args: std::fmt::Arguments) {}
-
-#[macro_export]
-macro_rules! myprint {
- ($($arg:tt)*) => ($crate::print(format_args!($($arg)*)));
-}
-
-#[macro_export]
-macro_rules! myprintln {
- ($fmt:expr) => (myprint!(concat!($fmt, "\n")));
-}
diff --git a/src/test/ui/cross/cross-crate-macro-backtrace/main.rs b/src/test/ui/cross/cross-crate-macro-backtrace/main.rs
deleted file mode 100644
index f7d4330ab..000000000
--- a/src/test/ui/cross/cross-crate-macro-backtrace/main.rs
+++ /dev/null
@@ -1,8 +0,0 @@
-// aux-build:extern_macro_crate.rs
-#[macro_use(myprintln, myprint)]
-extern crate extern_macro_crate;
-
-fn main() {
- myprintln!("{}");
- //~^ ERROR in format string
-}
diff --git a/src/test/ui/cross/cross-crate-macro-backtrace/main.stderr b/src/test/ui/cross/cross-crate-macro-backtrace/main.stderr
deleted file mode 100644
index 5bd4ea97e..000000000
--- a/src/test/ui/cross/cross-crate-macro-backtrace/main.stderr
+++ /dev/null
@@ -1,10 +0,0 @@
-error: 1 positional argument in format string, but no arguments were given
- --> $DIR/main.rs:6:5
- |
-LL | myprintln!("{}");
- | ^^^^^^^^^^^^^^^^
- |
- = note: this error originates in the macro `concat` which comes from the expansion of the macro `myprintln` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/cross/cross-file-errors/main.rs b/src/test/ui/cross/cross-file-errors/main.rs
deleted file mode 100644
index 4219f892d..000000000
--- a/src/test/ui/cross/cross-file-errors/main.rs
+++ /dev/null
@@ -1,7 +0,0 @@
-#[macro_use]
-mod underscore;
-
-fn main() {
- underscore!();
- //~^ ERROR `_` can only be used on the left-hand side of an assignment
-}
diff --git a/src/test/ui/cross/cross-file-errors/main.stderr b/src/test/ui/cross/cross-file-errors/main.stderr
deleted file mode 100644
index 293a300ed..000000000
--- a/src/test/ui/cross/cross-file-errors/main.stderr
+++ /dev/null
@@ -1,15 +0,0 @@
-error: in expressions, `_` can only be used on the left-hand side of an assignment
- --> $DIR/underscore.rs:8:9
- |
-LL | _
- | ^ `_` not allowed here
- |
- ::: $DIR/main.rs:5:5
- |
-LL | underscore!();
- | ------------- in this macro invocation
- |
- = note: this error originates in the macro `underscore` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/cross/cross-file-errors/underscore.rs b/src/test/ui/cross/cross-file-errors/underscore.rs
deleted file mode 100644
index 76e72a93f..000000000
--- a/src/test/ui/cross/cross-file-errors/underscore.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-// We want this file only so we can test cross-file error
-// messages, but we don't want it in an external crate.
-// ignore-test
-#![crate_type = "lib"]
-
-macro_rules! underscore {
- () => (
- _
- )
-}
diff --git a/src/test/ui/cross/cross-fn-cache-hole.rs b/src/test/ui/cross/cross-fn-cache-hole.rs
deleted file mode 100644
index c38a5001a..000000000
--- a/src/test/ui/cross/cross-fn-cache-hole.rs
+++ /dev/null
@@ -1,31 +0,0 @@
-// Check that when there are vacuous predicates in the environment
-// (which make a fn uncallable) we don't erroneously cache those and
-// then consider them satisfied elsewhere. The current technique for
-// doing this is to not use global caches when there is a chance that
-// the environment contains such a predicate.
-// We still error for `i32: Bar<u32>` pending #48214
-
-trait Foo<X,Y>: Bar<X> {
-}
-
-trait Bar<X> { }
-
-// We don't always check where clauses for sanity, but in this case
-// wfcheck does report an error here:
-fn vacuous<A>()
- where i32: Foo<u32, A> //~ ERROR the trait bound `i32: Bar<u32>` is not satisfied
-{
- // ... the original intention was to check that we don't use that
- // vacuous where clause (which could never be satisfied) to accept
- // the following line and then mess up calls elsewhere.
- require::<i32, u32>();
-}
-
-fn require<A,B>()
- where A: Bar<B>
-{
-}
-
-fn main() {
- require::<i32, u32>();
-}
diff --git a/src/test/ui/cross/cross-fn-cache-hole.stderr b/src/test/ui/cross/cross-fn-cache-hole.stderr
deleted file mode 100644
index 7e15562b0..000000000
--- a/src/test/ui/cross/cross-fn-cache-hole.stderr
+++ /dev/null
@@ -1,12 +0,0 @@
-error[E0277]: the trait bound `i32: Bar<u32>` is not satisfied
- --> $DIR/cross-fn-cache-hole.rs:16:11
- |
-LL | where i32: Foo<u32, A>
- | ^^^^^^^^^^^^^^^^ the trait `Bar<u32>` is not implemented for `i32`
- |
- = help: see issue #48214
- = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0277`.