mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-07 20:43:03 +00:00
Added tests for issues.
This commit is contained in:
parent
da441412f5
commit
11228ca3a0
@ -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}'`
|
8
src/test/ui/type-alias/issue-62263-self-in-atb.rs
Normal file
8
src/test/ui/type-alias/issue-62263-self-in-atb.rs
Normal 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() {}
|
4
src/test/ui/type-alias/issue-62305-self-assoc-ty.rs
Normal file
4
src/test/ui/type-alias/issue-62305-self-assoc-ty.rs
Normal file
@ -0,0 +1,4 @@
|
||||
type Alias = Self::Target;
|
||||
//~^ ERROR failed to resolve: use of undeclared type or module `Self` [E0433]
|
||||
|
||||
fn main() {}
|
8
src/test/ui/type-alias/issue-62364-self-ty-arg.rs
Normal file
8
src/test/ui/type-alias/issue-62364-self-ty-arg.rs
Normal 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() {}
|
Loading…
Reference in New Issue
Block a user