Added tests for issues.

This commit is contained in:
Alexander Regueiro 2019-07-06 16:15:27 +01:00
parent da441412f5
commit 11228ca3a0
5 changed files with 23 additions and 3 deletions

View File

@ -1,17 +1,17 @@
error: only `u8` can be cast into `char`
--> $DIR/cast_char.rs:4:23
--> $DIR/cast-char.rs:4:23
|
LL | const XYZ: char = 0x1F888 as char;
| ^^^^^^^^^^^^^^^ help: use a `char` literal instead: `'\u{1F888}'`
|
note: lint level defined here
--> $DIR/cast_char.rs:1:9
--> $DIR/cast-char.rs:1:9
|
LL | #![deny(overflowing_literals)]
| ^^^^^^^^^^^^^^^^^^^^
error: only `u8` can be cast into `char`
--> $DIR/cast_char.rs:6:22
--> $DIR/cast-char.rs:6:22
|
LL | const XY: char = 129160 as char;
| ^^^^^^^^^^^^^^ help: use a `char` literal instead: `'\u{1F888}'`

View File

@ -0,0 +1,8 @@
pub trait Trait {
type A;
}
pub type Alias = dyn Trait<A = Self::A>;
//~^ ERROR failed to resolve: use of undeclared type or module `Self` [E0433]
fn main() {}

View File

@ -0,0 +1,4 @@
type Alias = Self::Target;
//~^ ERROR failed to resolve: use of undeclared type or module `Self` [E0433]
fn main() {}

View File

@ -0,0 +1,8 @@
struct Struct<P1> {
field: P1,
}
type Alias<'a> = Struct<&'a Self>;
//~^ ERROR cannot find type `Self` in this scope [E0411]
fn main() {}