diff options
| author | lcnr <rust@lcnr.de> | 2022-03-15 16:32:52 +0100 |
|---|---|---|
| committer | lcnr <rust@lcnr.de> | 2022-03-30 11:23:58 +0200 |
| commit | 983c12f7f6a51c10d41c825921e962b0b74e4bca (patch) | |
| tree | b2b1de13b10b95961d5ff434a748e88101fca8f9 | |
| parent | bef6f3e895beede5bfd5ba4bb12898615c156d59 (diff) | |
update ui tests
| -rw-r--r-- | src/test/rustdoc/intra-doc/prim-self.rs | 1 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0118-2.rs | 8 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0118-2.stderr | 12 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0118.rs | 8 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0118.stderr | 11 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0390.stderr | 8 | ||||
| -rw-r--r-- | src/test/ui/kinds-of-primitive-impl.rs | 6 | ||||
| -rw-r--r-- | src/test/ui/kinds-of-primitive-impl.stderr | 43 | ||||
| -rw-r--r-- | src/test/ui/lang-items/lang-item-correct-generics.rs | 28 | ||||
| -rw-r--r-- | src/test/ui/single-primitive-inherent-impl.rs | 11 | ||||
| -rw-r--r-- | src/test/ui/single-primitive-inherent-impl.stderr | 13 |
11 files changed, 23 insertions, 126 deletions
diff --git a/src/test/rustdoc/intra-doc/prim-self.rs b/src/test/rustdoc/intra-doc/prim-self.rs index 7a65723d77b..5b9e41231e3 100644 --- a/src/test/rustdoc/intra-doc/prim-self.rs +++ b/src/test/rustdoc/intra-doc/prim-self.rs @@ -1,4 +1,5 @@ #![deny(rustdoc::broken_intra_doc_links)] +#![rustc_coherence_is_core] #![allow(incomplete_features)] // inherent_associated_types #![feature(lang_items)] #![feature(no_core)] diff --git a/src/test/ui/error-codes/E0118-2.rs b/src/test/ui/error-codes/E0118-2.rs deleted file mode 100644 index fe04190162a..00000000000 --- a/src/test/ui/error-codes/E0118-2.rs +++ /dev/null @@ -1,8 +0,0 @@ -struct Foo; - -impl &mut Foo { - //~^ ERROR E0118 - fn bar(self) {} -} - -fn main() {} diff --git a/src/test/ui/error-codes/E0118-2.stderr b/src/test/ui/error-codes/E0118-2.stderr deleted file mode 100644 index 2a1fe231116..00000000000 --- a/src/test/ui/error-codes/E0118-2.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0118]: no nominal type found for inherent implementation - --> $DIR/E0118-2.rs:3:6 - | -LL | impl &mut Foo { - | ^^^^^^^^ impl requires a nominal type - | - = note: either implement a trait on it or create a newtype to wrap it instead - = note: you could also try moving the reference to uses of `Foo` (such as `self`) within the implementation - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0118`. diff --git a/src/test/ui/error-codes/E0118.rs b/src/test/ui/error-codes/E0118.rs deleted file mode 100644 index 7bf36210f3a..00000000000 --- a/src/test/ui/error-codes/E0118.rs +++ /dev/null @@ -1,8 +0,0 @@ -impl (u8, u8) { //~ ERROR E0118 - fn get_state(&self) -> String { - String::new() - } -} - -fn main() { -} diff --git a/src/test/ui/error-codes/E0118.stderr b/src/test/ui/error-codes/E0118.stderr deleted file mode 100644 index 2693a93213a..00000000000 --- a/src/test/ui/error-codes/E0118.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0118]: no nominal type found for inherent implementation - --> $DIR/E0118.rs:1:6 - | -LL | impl (u8, u8) { - | ^^^^^^^^ impl requires a nominal type - | - = note: either implement a trait on it or create a newtype to wrap it instead - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0118`. diff --git a/src/test/ui/error-codes/E0390.stderr b/src/test/ui/error-codes/E0390.stderr index be47e93d19a..4a3f4660070 100644 --- a/src/test/ui/error-codes/E0390.stderr +++ b/src/test/ui/error-codes/E0390.stderr @@ -1,10 +1,10 @@ -error[E0390]: only a single inherent implementation marked with `#[lang = "mut_ptr"]` is allowed for the `*mut T` primitive - --> $DIR/E0390.rs:5:1 +error[E0390]: cannot define inherent `impl` for primitive types + --> $DIR/E0390.rs:5:6 | LL | impl *mut Foo {} - | ^^^^^^^^^^^^^^^^ + | ^^^^^^^^ | - = help: consider using a trait + = help: consider using a trait instead error: aborting due to previous error diff --git a/src/test/ui/kinds-of-primitive-impl.rs b/src/test/ui/kinds-of-primitive-impl.rs index b045b050d77..9eba72e7627 100644 --- a/src/test/ui/kinds-of-primitive-impl.rs +++ b/src/test/ui/kinds-of-primitive-impl.rs @@ -1,16 +1,16 @@ impl u8 { -//~^ error: only a single inherent implementation marked with `#[lang = "u8"]` is allowed for the `u8` primitive +//~^ error: cannot define inherent `impl` for primitive types pub const B: u8 = 0; } impl str { -//~^ error: only a single inherent implementation marked with `#[lang = "str"]` is allowed for the `str` primitive +//~^ error: cannot define inherent `impl` for primitive types fn foo() {} fn bar(self) {} } impl char { -//~^ error: only a single inherent implementation marked with `#[lang = "char"]` is allowed for the `char` primitive +//~^ error: cannot define inherent `impl` for primitive types pub const B: u8 = 0; pub const C: u8 = 0; fn foo() {} diff --git a/src/test/ui/kinds-of-primitive-impl.stderr b/src/test/ui/kinds-of-primitive-impl.stderr index f1fb2953083..c49396a53a8 100644 --- a/src/test/ui/kinds-of-primitive-impl.stderr +++ b/src/test/ui/kinds-of-primitive-impl.stderr @@ -1,39 +1,26 @@ -error[E0390]: only a single inherent implementation marked with `#[lang = "u8"]` is allowed for the `u8` primitive - --> $DIR/kinds-of-primitive-impl.rs:1:1 +error[E0390]: cannot define inherent `impl` for primitive types + --> $DIR/kinds-of-primitive-impl.rs:1:6 | -LL | / impl u8 { -LL | | -LL | | pub const B: u8 = 0; -LL | | } - | |_^ +LL | impl u8 { + | ^^ | - = help: consider using a trait to implement this constant + = help: consider using a trait instead -error[E0390]: only a single inherent implementation marked with `#[lang = "str"]` is allowed for the `str` primitive - --> $DIR/kinds-of-primitive-impl.rs:6:1 +error[E0390]: cannot define inherent `impl` for primitive types + --> $DIR/kinds-of-primitive-impl.rs:6:6 | -LL | / impl str { -LL | | -LL | | fn foo() {} -LL | | fn bar(self) {} -LL | | } - | |_^ +LL | impl str { + | ^^^ | - = help: consider using a trait to implement these methods + = help: consider using a trait instead -error[E0390]: only a single inherent implementation marked with `#[lang = "char"]` is allowed for the `char` primitive - --> $DIR/kinds-of-primitive-impl.rs:12:1 +error[E0390]: cannot define inherent `impl` for primitive types + --> $DIR/kinds-of-primitive-impl.rs:12:6 | -LL | / impl char { -LL | | -LL | | pub const B: u8 = 0; -LL | | pub const C: u8 = 0; -LL | | fn foo() {} -LL | | fn bar(self) {} -LL | | } - | |_^ +LL | impl char { + | ^^^^ | - = help: consider using a trait to implement these associated items + = help: consider using a trait instead error: aborting due to 3 previous errors diff --git a/src/test/ui/lang-items/lang-item-correct-generics.rs b/src/test/ui/lang-items/lang-item-correct-generics.rs deleted file mode 100644 index a3287db74e7..00000000000 --- a/src/test/ui/lang-items/lang-item-correct-generics.rs +++ /dev/null @@ -1,28 +0,0 @@ -// build-pass - -#![feature(lang_items,no_core)] -#![no_core] -#![crate_type="lib"] - -#[lang = "sized"] -trait MySized {} - -#[lang = "copy"] -trait MyCopy {} - -#[lang = "drop"] -trait MyDrop<T> {} - -struct S; - -impl<T> MyDrop<T> for S {} - -#[lang = "i32"] -impl<'a> i32 { - fn foo() {} -} - -fn bar() { - i32::foo(); - S; -} diff --git a/src/test/ui/single-primitive-inherent-impl.rs b/src/test/ui/single-primitive-inherent-impl.rs deleted file mode 100644 index 75c62feec32..00000000000 --- a/src/test/ui/single-primitive-inherent-impl.rs +++ /dev/null @@ -1,11 +0,0 @@ -#![crate_type = "lib"] -#![feature(lang_items)] -#![no_std] - -// OK -#[lang = "str_alloc"] -impl str {} - -impl str { -//~^ error: only a single inherent implementation marked with `#[lang = "str"]` is allowed for the `str` primitive -} diff --git a/src/test/ui/single-primitive-inherent-impl.stderr b/src/test/ui/single-primitive-inherent-impl.stderr deleted file mode 100644 index 349a12eac05..00000000000 --- a/src/test/ui/single-primitive-inherent-impl.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error[E0390]: only a single inherent implementation marked with `#[lang = "str"]` is allowed for the `str` primitive - --> $DIR/single-primitive-inherent-impl.rs:9:1 - | -LL | / impl str { -LL | | -LL | | } - | |_^ - | - = help: consider using a trait - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0390`. |
