Fix a couple resolve bugs from binder refactor
This commit is contained in:
parent
5c897d430d
commit
3ae5fed04c
5 changed files with 56 additions and 1 deletions
|
|
@ -0,0 +1,8 @@
|
|||
// check-fail
|
||||
|
||||
struct Foo {}
|
||||
impl Foo {
|
||||
fn bar(foo: Foo<Target = usize>) {}
|
||||
//~^ associated type bindings are not allowed here
|
||||
}
|
||||
fn main() {}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
error[E0229]: associated type bindings are not allowed here
|
||||
--> $DIR/issue-83753-invalid-associated-type-supertrait-hrtb.rs:5:21
|
||||
|
|
||||
LL | fn bar(foo: Foo<Target = usize>) {}
|
||||
| ^^^^^^^^^^^^^^ associated type not allowed here
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0229`.
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
// check-fail
|
||||
|
||||
static STATIC_VAR_FIVE: &One();
|
||||
//~^ cannot find type
|
||||
//~| free static item without body
|
||||
|
||||
fn main() {}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
error: free static item without body
|
||||
--> $DIR/issue-83907-invalid-fn-like-path.rs:3:1
|
||||
|
|
||||
LL | static STATIC_VAR_FIVE: &One();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
|
||||
| |
|
||||
| help: provide a definition for the static: `= <expr>;`
|
||||
|
||||
error[E0412]: cannot find type `One` in this scope
|
||||
--> $DIR/issue-83907-invalid-fn-like-path.rs:3:26
|
||||
|
|
||||
LL | static STATIC_VAR_FIVE: &One();
|
||||
| ^^^ not found in this scope
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0412`.
|
||||
Loading…
Add table
Add a link
Reference in a new issue