mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-07 17:18:32 +03:00
Added tests for issues.
This commit is contained in:
@@ -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}'`
|
||||
@@ -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() {}
|
||||
@@ -0,0 +1,4 @@
|
||||
type Alias = Self::Target;
|
||||
//~^ ERROR failed to resolve: use of undeclared type or module `Self` [E0433]
|
||||
|
||||
fn main() {}
|
||||
@@ -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() {}
|
||||
Reference in New Issue
Block a user