Skip to content

Commit 11228ca

Browse files
author
Alexander Regueiro
committed
Added tests for issues.
1 parent da44141 commit 11228ca

File tree

5 files changed

+23
-3
lines changed

5 files changed

+23
-3
lines changed
File renamed without changes.

src/test/ui/cast_char.stderr renamed to src/test/ui/cast-char.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
error: only `u8` can be cast into `char`
2-
--> $DIR/cast_char.rs:4:23
2+
--> $DIR/cast-char.rs:4:23
33
|
44
LL | const XYZ: char = 0x1F888 as char;
55
| ^^^^^^^^^^^^^^^ help: use a `char` literal instead: `'\u{1F888}'`
66
|
77
note: lint level defined here
8-
--> $DIR/cast_char.rs:1:9
8+
--> $DIR/cast-char.rs:1:9
99
|
1010
LL | #![deny(overflowing_literals)]
1111
| ^^^^^^^^^^^^^^^^^^^^
1212

1313
error: only `u8` can be cast into `char`
14-
--> $DIR/cast_char.rs:6:22
14+
--> $DIR/cast-char.rs:6:22
1515
|
1616
LL | const XY: char = 129160 as char;
1717
| ^^^^^^^^^^^^^^ help: use a `char` literal instead: `'\u{1F888}'`
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
pub trait Trait {
2+
type A;
3+
}
4+
5+
pub type Alias = dyn Trait<A = Self::A>;
6+
//~^ ERROR failed to resolve: use of undeclared type or module `Self` [E0433]
7+
8+
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
type Alias = Self::Target;
2+
//~^ ERROR failed to resolve: use of undeclared type or module `Self` [E0433]
3+
4+
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
struct Struct<P1> {
2+
field: P1,
3+
}
4+
5+
type Alias<'a> = Struct<&'a Self>;
6+
//~^ ERROR cannot find type `Self` in this scope [E0411]
7+
8+
fn main() {}

0 commit comments

Comments
 (0)