-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make invalid_type_param_default lint show up in cargo future-compat r…
…eports and remove the feature gate that silenced the lint
- Loading branch information
Showing
7 changed files
with
47 additions
and
26 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
21 changes: 0 additions & 21 deletions
21
tests/ui/feature-gates/feature-gate-default_type_parameter_fallback.stderr
This file was deleted.
Oops, something went wrong.
File renamed without changes.
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,43 @@ | ||
error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions | ||
--> $DIR/default_type_parameter_in_fn_or_impl.rs:3:8 | ||
| | ||
LL | fn avg<T=i32>(_: T) {} | ||
| ^^^^^ | ||
| | ||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! | ||
= note: for more information, see issue #36887 <https://github.com/rust-lang/rust/issues/36887> | ||
= note: `#[deny(invalid_type_param_default)]` on by default | ||
|
||
error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions | ||
--> $DIR/default_type_parameter_in_fn_or_impl.rs:8:6 | ||
| | ||
LL | impl<T=i32> S<T> {} | ||
| ^^^^^ | ||
| | ||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! | ||
= note: for more information, see issue #36887 <https://github.com/rust-lang/rust/issues/36887> | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
Future incompatibility report: Future breakage diagnostic: | ||
error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions | ||
--> $DIR/default_type_parameter_in_fn_or_impl.rs:3:8 | ||
| | ||
LL | fn avg<T=i32>(_: T) {} | ||
| ^^^^^ | ||
| | ||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! | ||
= note: for more information, see issue #36887 <https://github.com/rust-lang/rust/issues/36887> | ||
= note: `#[deny(invalid_type_param_default)]` on by default | ||
|
||
Future breakage diagnostic: | ||
error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions | ||
--> $DIR/default_type_parameter_in_fn_or_impl.rs:8:6 | ||
| | ||
LL | impl<T=i32> S<T> {} | ||
| ^^^^^ | ||
| | ||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! | ||
= note: for more information, see issue #36887 <https://github.com/rust-lang/rust/issues/36887> | ||
= note: `#[deny(invalid_type_param_default)]` on by default | ||
|