Skip to content

Commit

Permalink
Added tests for issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Regueiro committed Jul 6, 2019
1 parent da44141 commit 11228ca
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 3 deletions.
File renamed without changes.
6 changes: 3 additions & 3 deletions src/test/ui/cast_char.stderr → src/test/ui/cast-char.stderr
@@ -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}'`
Expand Down
8 changes: 8 additions & 0 deletions src/test/ui/type-alias/issue-62263-self-in-atb.rs
@@ -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 changes: 4 additions & 0 deletions src/test/ui/type-alias/issue-62305-self-assoc-ty.rs
@@ -0,0 +1,4 @@
type Alias = Self::Target;
//~^ ERROR failed to resolve: use of undeclared type or module `Self` [E0433]

fn main() {}
8 changes: 8 additions & 0 deletions src/test/ui/type-alias/issue-62364-self-ty-arg.rs
@@ -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() {}

0 comments on commit 11228ca

Please sign in to comment.