forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix associated type suggestion when -Zlower-impl-trait-in-trait-to-as…
…soc-ty
- Loading branch information
1 parent
54d6738
commit 6d99787
Showing
6 changed files
with
110 additions
and
14 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
27 changes: 27 additions & 0 deletions
27
tests/ui/feature-gates/feature-gate-return_type_notation.cfg_current.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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
error[E0658]: return type notation is experimental | ||
--> $DIR/feature-gate-return_type_notation.rs:17:17 | ||
| | ||
LL | fn foo<T: Trait<m(): Send>>() {} | ||
| ^^^^^^^^^ | ||
| | ||
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information | ||
= help: add `#![feature(return_type_notation)]` to the crate attributes to enable | ||
|
||
error: parenthesized generic arguments cannot be used in associated type constraints | ||
--> $DIR/feature-gate-return_type_notation.rs:17:17 | ||
| | ||
LL | fn foo<T: Trait<m(): Send>>() {} | ||
| ^-- | ||
| | | ||
| help: remove these parentheses | ||
|
||
error[E0220]: associated type `m` not found for `Trait` | ||
--> $DIR/feature-gate-return_type_notation.rs:17:17 | ||
| | ||
LL | fn foo<T: Trait<m(): Send>>() {} | ||
| ^ associated type `m` not found | ||
|
||
error: aborting due to 3 previous errors | ||
|
||
Some errors have detailed explanations: E0220, E0658. | ||
For more information about an error, try `rustc --explain E0220`. |
27 changes: 27 additions & 0 deletions
27
tests/ui/feature-gates/feature-gate-return_type_notation.cfg_next.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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
error[E0658]: return type notation is experimental | ||
--> $DIR/feature-gate-return_type_notation.rs:17:17 | ||
| | ||
LL | fn foo<T: Trait<m(): Send>>() {} | ||
| ^^^^^^^^^ | ||
| | ||
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information | ||
= help: add `#![feature(return_type_notation)]` to the crate attributes to enable | ||
|
||
error: parenthesized generic arguments cannot be used in associated type constraints | ||
--> $DIR/feature-gate-return_type_notation.rs:17:17 | ||
| | ||
LL | fn foo<T: Trait<m(): Send>>() {} | ||
| ^-- | ||
| | | ||
| help: remove these parentheses | ||
|
||
error[E0220]: associated type `m` not found for `Trait` | ||
--> $DIR/feature-gate-return_type_notation.rs:17:17 | ||
| | ||
LL | fn foo<T: Trait<m(): Send>>() {} | ||
| ^ associated type `m` not found | ||
|
||
error: aborting due to 3 previous errors | ||
|
||
Some errors have detailed explanations: E0220, E0658. | ||
For more information about an error, try `rustc --explain E0220`. |
13 changes: 13 additions & 0 deletions
13
tests/ui/feature-gates/feature-gate-return_type_notation.no_current.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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
warning: return type notation is experimental | ||
--> $DIR/feature-gate-return_type_notation.rs:17:17 | ||
| | ||
LL | fn foo<T: Trait<m(): Send>>() {} | ||
| ^^^^^^^^^ | ||
| | ||
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information | ||
= help: add `#![feature(return_type_notation)]` to the crate attributes to enable | ||
= warning: unstable syntax can change at any point in the future, causing a hard error! | ||
= note: for more information, see issue #65860 <https://github.com/rust-lang/rust/issues/65860> | ||
|
||
warning: 1 warning emitted | ||
|
13 changes: 13 additions & 0 deletions
13
tests/ui/feature-gates/feature-gate-return_type_notation.no_next.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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
warning: return type notation is experimental | ||
--> $DIR/feature-gate-return_type_notation.rs:17:17 | ||
| | ||
LL | fn foo<T: Trait<m(): Send>>() {} | ||
| ^^^^^^^^^ | ||
| | ||
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information | ||
= help: add `#![feature(return_type_notation)]` to the crate attributes to enable | ||
= warning: unstable syntax can change at any point in the future, causing a hard error! | ||
= note: for more information, see issue #65860 <https://github.com/rust-lang/rust/issues/65860> | ||
|
||
warning: 1 warning emitted | ||
|
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