-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Delay a bug and mark precise_capturing as not incomplete
- Loading branch information
1 parent
7290e24
commit c3c1bbf
Showing
33 changed files
with
50 additions
and
205 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,8 @@ | ||
warning: the feature `precise_capturing` is incomplete and may not be safe to use and/or cause compiler crashes | ||
--> $DIR/apit.rs:1:12 | ||
| | ||
LL | #![feature(precise_capturing)] | ||
| ^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: see issue #123432 <https://github.com/rust-lang/rust/issues/123432> for more information | ||
= note: `#[warn(incomplete_features)]` on by default | ||
|
||
error: `use<...>` precise capturing syntax not allowed in argument-position `impl Trait` | ||
--> $DIR/apit.rs:4:26 | ||
--> $DIR/apit.rs:3:26 | ||
| | ||
LL | fn hello(_: impl Sized + use<>) {} | ||
| ^^^^^ | ||
|
||
error: aborting due to 1 previous error; 1 warning emitted | ||
error: aborting due to 1 previous error | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
#![feature(precise_capturing)] | ||
//~^ WARN the feature `precise_capturing` is incomplete | ||
|
||
trait Tr { | ||
type Assoc; | ||
|
15 changes: 3 additions & 12 deletions
15
tests/ui/impl-trait/precise-capturing/capture-parent-arg.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,18 @@ | ||
warning: the feature `precise_capturing` is incomplete and may not be safe to use and/or cause compiler crashes | ||
--> $DIR/capture-parent-arg.rs:1:12 | ||
| | ||
LL | #![feature(precise_capturing)] | ||
| ^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: see issue #123432 <https://github.com/rust-lang/rust/issues/123432> for more information | ||
= note: `#[warn(incomplete_features)]` on by default | ||
|
||
error: `impl Trait` captures lifetime parameter, but it is not mentioned in `use<...>` precise captures list | ||
--> $DIR/capture-parent-arg.rs:28:31 | ||
--> $DIR/capture-parent-arg.rs:27:31 | ||
| | ||
LL | impl<'a> W<'a> { | ||
| -- this lifetime parameter is captured | ||
LL | fn bad1() -> impl Into<<W<'a> as Tr>::Assoc> + use<> {} | ||
| -------------^^------------------------ lifetime captured due to being mentioned in the bounds of the `impl Trait` | ||
|
||
error: `impl Trait` captures lifetime parameter, but it is not mentioned in `use<...>` precise captures list | ||
--> $DIR/capture-parent-arg.rs:34:18 | ||
--> $DIR/capture-parent-arg.rs:33:18 | ||
| | ||
LL | impl<'a> W<'a> { | ||
| -- this lifetime parameter is captured | ||
LL | fn bad2() -> impl Into<<Self as Tr>::Assoc> + use<> {} | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime captured due to being mentioned in the bounds of the `impl Trait` | ||
|
||
error: aborting due to 2 previous errors; 1 warning emitted | ||
error: aborting due to 2 previous errors | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 2 additions & 11 deletions
13
tests/ui/impl-trait/precise-capturing/duplicated-use.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,8 @@ | ||
error: duplicate `use<...>` precise capturing syntax | ||
--> $DIR/duplicated-use.rs:4:32 | ||
--> $DIR/duplicated-use.rs:3:32 | ||
| | ||
LL | fn hello<'a>() -> impl Sized + use<'a> + use<'a> {} | ||
| ^^^^^^^ ------- second `use<...>` here | ||
|
||
warning: the feature `precise_capturing` is incomplete and may not be safe to use and/or cause compiler crashes | ||
--> $DIR/duplicated-use.rs:1:12 | ||
| | ||
LL | #![feature(precise_capturing)] | ||
| ^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: see issue #123432 <https://github.com/rust-lang/rust/issues/123432> for more information | ||
= note: `#[warn(incomplete_features)]` on by default | ||
|
||
error: aborting due to 1 previous error; 1 warning emitted | ||
error: aborting due to 1 previous error | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
tests/ui/impl-trait/precise-capturing/forgot-to-capture-const.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
tests/ui/impl-trait/precise-capturing/forgot-to-capture-lifetime.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
tests/ui/impl-trait/precise-capturing/forgot-to-capture-type.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 0 additions & 11 deletions
11
tests/ui/impl-trait/precise-capturing/higher-ranked.stderr
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.