diff options
| author | Dylan DPC <dylan.dpc@gmail.com> | 2021-04-16 14:08:31 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-16 14:08:31 +0200 |
| commit | 8853aaeefc9739b497983912a6cddfddaaf01d58 (patch) | |
| tree | b09ec48f298e760c465c798c9b0c438c36d44903 /src/test | |
| parent | a5c68d7908dc970f2d51c0b2e3d2dd8f943f3357 (diff) | |
| parent | 3ae5fed04c94be2f8591c7f4ab76f78ec882cd32 (diff) | |
| download | rust-8853aaeefc9739b497983912a6cddfddaaf01d58.tar.gz rust-8853aaeefc9739b497983912a6cddfddaaf01d58.zip | |
Rollup merge of #83944 - jackh726:binder-refactor-fix2, r=lcnr
Fix a couple resolve bugs from binder refactor Fixes #83753 Fixes #83907
Diffstat (limited to 'src/test')
4 files changed, 41 insertions, 0 deletions
diff --git a/src/test/ui/lifetimes/issue-83753-invalid-associated-type-supertrait-hrtb.rs b/src/test/ui/lifetimes/issue-83753-invalid-associated-type-supertrait-hrtb.rs new file mode 100644 index 00000000000..7f0ea730dd3 --- /dev/null +++ b/src/test/ui/lifetimes/issue-83753-invalid-associated-type-supertrait-hrtb.rs @@ -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() {} diff --git a/src/test/ui/lifetimes/issue-83753-invalid-associated-type-supertrait-hrtb.stderr b/src/test/ui/lifetimes/issue-83753-invalid-associated-type-supertrait-hrtb.stderr new file mode 100644 index 00000000000..f7bdee6336e --- /dev/null +++ b/src/test/ui/lifetimes/issue-83753-invalid-associated-type-supertrait-hrtb.stderr @@ -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`. diff --git a/src/test/ui/lifetimes/issue-83907-invalid-fn-like-path.rs b/src/test/ui/lifetimes/issue-83907-invalid-fn-like-path.rs new file mode 100644 index 00000000000..604687ce711 --- /dev/null +++ b/src/test/ui/lifetimes/issue-83907-invalid-fn-like-path.rs @@ -0,0 +1,7 @@ +// check-fail + +static STATIC_VAR_FIVE: &One(); +//~^ cannot find type +//~| free static item without body + +fn main() {} diff --git a/src/test/ui/lifetimes/issue-83907-invalid-fn-like-path.stderr b/src/test/ui/lifetimes/issue-83907-invalid-fn-like-path.stderr new file mode 100644 index 00000000000..e57933da558 --- /dev/null +++ b/src/test/ui/lifetimes/issue-83907-invalid-fn-like-path.stderr @@ -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`. |
